Besides, /proc/net/routes is special. It has 128-byte records, and reading
any particular record twice (or not at all) is not a problem because
usually, the table stays stable, and the code which reads the table must be
able to deal with the problem (because on other systems, it reads kernel
memory or similar, where there are no guarantees either).
> - My goal is to actually eliminate some of the kernel bloat
> by making generic proc routines that most of the current proc
> code can be easily modified to use. The end result will be
> make Linux a little leaner.
>
Which is a very good idea, actually. It just doesn't work for some of these
files in /proc.
> That being said, I need to know where this patch will cause problems
> and what I need to watch out for. I am also a little concerned by
> how long it would take the kernel to write out 40K worth of route
> information (using Alan's example) since many proc routines just
> use cli/sti to lock down the tables that they are operating on.
>
Don't Do That. Copying a couple of MBytes under cli() is out of the
question. Really.
-- In 1910 a radical new engine was produced. The inventor said, "Diesel be very good." -- "On This Day in History"-- Matthias Urlichs \ noris network GmbH / Xlink-POP Nürnberg Schleiermacherstraße 12 \ Linux+Internet / EMail: urlichs@noris.de 90491 Nürnberg (Germany) \ Consulting+Programming+Networking+etc'ing PGP: 1024/4F578875 1B 89 E2 1C 43 EA 80 44 15 D2 29 CF C6 C7 E0 DE Click <A HREF="http://info.noris.de/~smurf/finger">here</A>. 42