public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RFC] Fasync BKL removal
@ 2009-02-07 20:06 Jonathan Corbet
  2009-02-07 20:06 ` [PATCH 1/4] Rename struct file->f_ep_lock Jonathan Corbet
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Jonathan Corbet @ 2009-02-07 20:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andi Kleen, Oleg Nesterov, Andrew Morton, Al Viro, Davide Libenzi,
	David Miller, Christoph Hellwig, Alan Cox, Matt Mackall

With any luck at all, this is my final attempt at removing the BKL from the
fasync() path and providing proper protection for struct file->f_flags.
This week's episode includes these patches:

1) Rename f_ep_lock to f_lock and move it out of CONFIG_EPOLL.  Epoll
   remains the only user, but the lock is now available for others.

2) Use f_lock to protect f_flags.  This provides better protection to the
   flags than we've had before and allows the removal of the BKL in places
   where its only purpose was protecting accesses to this field.

3) Move FASYNC bit handling into ->fasync(): this is how changes to that
   bit and calls to f_op->fasync() are kept atomic in the absence of the
   BKL.  Almost every FASYNC implementation uses fasync_helper(), so the
   actual bit manipulation is done there.  The one exception (for sockets)
   has been fixed up.  At this point, there is no more BKL in these paths.

4) Rationalize fasync_helper() return value handling.  Some drivers mapped
   positive return values from fasync_helper() onto zero, most others did
   not bother.  This optional cleanup patch moves that mapping into the VFS
   code, making things consistent and enabling the removal of some 50 lines
   of code.

Parts 3 and 4 are essentially the same as the last time around.

Once again, this code works for me and, if there's any regressions here,
the LTP test suite cannot find them.

Thanks to all who have looked at this interminable stream of patches...

jon



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-02-10  2:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-07 20:06 [PATCH/RFC] Fasync BKL removal Jonathan Corbet
2009-02-07 20:06 ` [PATCH 1/4] Rename struct file->f_ep_lock Jonathan Corbet
2009-02-08  8:56   ` Christoph Hellwig
2009-02-08 19:51   ` Davide Libenzi
2009-02-07 20:06 ` [PATCH 2/4] Use f_lock to protect f_flags Jonathan Corbet
2009-02-08  9:02   ` Christoph Hellwig
2009-02-07 20:06 ` [PATCH 3/4] Move FASYNC bit handling to f_op->fasync() Jonathan Corbet
2009-02-08  9:05   ` Christoph Hellwig
2009-02-10  2:41     ` Jonathan Corbet
2009-02-07 20:06 ` [PATCH 4/4] Rationalize fasync return values Jonathan Corbet
2009-02-07 20:28 ` [PATCH/RFC] Fasync BKL removal Matt Mackall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox