Messages in this thread |  | | Date | Fri, 8 Nov 1996 19:58:22 +0300 | From | "A.N.Kuznetsov" <> | Subject | Re: proc_generic - cool new stuff |
| |
In article <XFMail.961107004852.rriggs@tesser.com> you wrote:
: On 07-Nov-96 alan@lxorguk.ukuu.org.uk wrote: : >>> therefore must be OK to sleep in. It definitely cannot use cli/sti : >> to lock it's tables. Anything still relying on cli/sti will need : >> to be cached. (And hopefully some of these will be fixed by Keith : >> Owens soon.) : > : >You mean like the routing tables. We cannot sleep in the routing handling : >end of story. The current code just builds a kernel buffer, unlocks and : >feeds that out. That should work fine with your changes
: I don't understand. In my code, when operating in non-cached : mode, proc_write() is not buffered, but writes directly into the : user buffer. This may require the kernel to swap, right? (Which : means we sleep, right?). So, what we _really_ need is buffered, : non-cached operation. OK... I think I finally get it.
Bob was right. I deliberately constructed FIB handling routines, so that you are ALLOWED TO SLEEP between fib_lock() and fib_unlock(). It is OK to dump FIB directly to user space. Really, I tested this trick when ran BGP, but read not via proc, but via special ioctl(SIOCRTDUMP..).
(Certainly, this note is not applicable to /proc/net/rt_cache)
Alexey Kuznetsov.
|  |