public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "David C. Hansen" <haveblue@us.ibm.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	Alexander Viro <viro@math.psu.edu>,
	Rick Lindsley <ricklind@us.ibm.com>
Subject: [PATCH] Remove needless BKL from release functions
Date: Wed, 21 Nov 2001 15:32:42 -0800	[thread overview]
Message-ID: <3BFC399A.3040101@us.ibm.com> (raw)

  The following is a patch which removes the BKL from quite a few 
drivers' release functions.  The release functions are already 
serialized in the VFS code by an atomic_t which guarantees that each 
function will be called only once, after all file descriptors have been 
closed.  In addition, in these drivers, the BKL was _only_ held in the 
release function and nowhere else in the driver where it might be needed.

Many of these patches simply remove the BKL from the file.  This causes 
no harm because the BKL was not really protecting anything, anyway.  
Other patches try to actually fix the locking.  Some do this by making 
use of atomic operations with the atomic_* functions, or the 
(test|set)_bit functions.  Most of these patches replace uses of normal 
integers which were used to keep open counts in the drivers.  In other 
some cases, a spinlock was added when the atomic operations could not 
guarantee proper serialization by themselves.  And, in very few cases, 
the existing locking was extended to protect more things.  These cases 
are very uncommon because locking is very uncommon in most of these drivers.

Special care has been taken not to introduce more locking issues into 
the drivers (do no harm). They're available as one big patch which is 
against 2.4.14.  The big patch is about 50k, so, instead of attaching 
it, here is a link: http://lse.sourceforge.net/lockhier/patches/bkl.rollup
Here is documentation describing some of the patches and other locking 
issues in the drivers: http://lse.sourceforge.net/lockhier/
The patch applies against 2.4.14.

--
David C. Hansen
haveblue@us.ibm.com



             reply	other threads:[~2001-11-21 23:33 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-21 23:32 David C. Hansen [this message]
2001-11-22 10:12 ` [PATCH] Remove needless BKL from release functions Oliver Neukum
2001-11-22 12:11   ` Christoph Hellwig
2001-11-22 12:30     ` Horst von Brand
2001-11-22 13:05       ` Christoph Hellwig
2001-11-23  9:44       ` Rick Lindsley
2001-11-23 10:10         ` Oliver.Neukum
2001-11-23 10:47           ` Christoph Hellwig
2001-11-23 11:24             ` Oliver Neukum
2001-11-26 17:46             ` David C. Hansen
2001-11-26 19:41               ` Flavio Stanchina
2001-11-26 19:53                 ` David C. Hansen
2001-11-23 12:08           ` Rick Lindsley
     [not found] <adilger@turbolabs.com>
2001-11-06 20:04 ` [PATCH] lp.c, eexpress.c jiffies cleanup Tim Schmielau
2001-11-06 21:15   ` Andreas Dilger
2001-11-06 21:37     ` Philip Blundell
2001-11-07  0:10       ` Andreas Dilger
2001-11-06 23:58         ` Tim Hockin
  -- strict thread matches above, loose matches on Subject: below --
2001-09-20 20:07 XFS to main kernel source Gonyou, Austin
2001-09-20 20:14 ` Alan Cox
2001-09-20 20:16   ` Steve Lord
2001-09-20 20:25     ` Alan Cox
2001-09-20 20:26     ` Christoph Hellwig
2001-09-20 21:31       ` Steve Lord
2001-09-21  3:12         ` Andreas Dilger
2001-09-21  3:25           ` Steve Lord
2001-09-21  4:42             ` Nathan Scott
2001-09-21  5:58         ` Christoph Hellwig
2001-09-21  8:40           ` Narancs v1
2001-09-21 14:19         ` Alexander Viro
2001-09-21 14:45           ` Steve Lord
2001-09-20 20:40     ` Alexander Viro
2001-09-21 18:03       ` Steve Lord
2001-09-20 20:29 ` Horst von Brand
2001-09-20 20:50   ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BFC399A.3040101@us.ibm.com \
    --to=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ricklind@us.ibm.com \
    --cc=torvalds@transmeta.com \
    --cc=viro@math.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox