lkml.org 
[lkml]   [1996]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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.

\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.029 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site