lkml.org 
[lkml]   [1999]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: RFC: BSD system call revoke?


On Fri, 25 Jun 1999, Bernhard Kaindl wrote:

> for (filp = inuse_filps; filp; filp = filp->f_next)
^^^^^^^^^^^^^^^^
He's dead, Jim. Common inuse_filps sucks boulders through the straw - it
makes open("/dev/tty",O_RDWR); O(number of opened files) long. It's
horribly bad. It becomes untolerable on SMP - you can't do anything with
the list (i.e. add/remove struct file) while you are scanning the bloody
thing. Proposed scheme (see the posted patch) being: per-fs list +
anything that driver might want + anonymous list for pipes and sockets. In
other words, correct code would open the file, grab the file->f_list->fl_lock
and scan file->f_list->fl_list (with the lock being held). Then release
the spinlock.
Please, look at the patch at ftp.math.psu.edu/pub/viro/smp-patch-11.gz.
It's not a final version by any means, but it's pretty much final wrt
struct file handling. Whether Linux will accept is another question,
indeed, but *any* scanning of the global list will bite us hard wrt big
lock lifting.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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