On Sat, Jun 14, 2008 at 9:16 PM, Henning Brauer <[EMAIL PROTECTED]> wrote: > * David Higgs <[EMAIL PROTECTED]> [2008-06-15 01:59]: >> On Sat, Jun 14, 2008 at 1:11 PM, Henning Brauer <[EMAIL PROTECTED]> wrote: >> > * Toni Mueller <[EMAIL PROTECTED]> [2008-06-14 11:29]: >> >> Would it be possible to walk along the live table, without copying the >> >> table, or would the continuous stream of route inserts and deletes lead >> >> to a corrupted view and/or access to the wrong parts of the system's >> >> memory (which must to be prevented), or would this be such a >> >> performance hit that this is unfeasible? >> > >> > userland can walk a kernel table since when exactly? >> > (leave dirty /dev/mem style hacks aside) >> >> If the kernel table is kept in an ordered state, userland could >> provide a "starting value" or key. The kernel can then return the >> requested chunk (up to the size requested) starting at the "next" >> table item that comes after the key. > > wow. you completely miss the point. > userland cannot poke in kernel memory. > (footnote: ok, it can, but assuming it can't is better)
I knew that, but I explained myself poorly. I was thinking something along the lines of making a different route sysctl (other than NET_RT_DUMP) that can copy out smaller portions of the routing table at a time. Userland programs could then iterate their way through the routing table. Depending on the structures being copied out, this might be completely unworkable. On top of that, you'd at best just push back the limits on available real memory. Best to wait for a restartable route sysctl. Apologies for the noise and my out-loud musings. --david