removal of BKL from drivers ..

From: Rick Lindsley (ricklind@us.ibm.com)
Date: Wed Nov 07 2001 - 18:40:33 EST


As an outgrowth of the locking document I did a few months ago
(http://lse.sourceforge.net/lockhier), Dave Hansen (haveblue) and I
have been looking at the use of the BKL in the release() functions of
drivers to see if it was really needed. This isn't so much a
performance thing (although you can never really tell with the BKL :)
as a cleanliness thing. It would appear that while some of those
drivers could stand some SMP locking, using the BKL in the release
function (only) doesn't provide it. We've identified over 50 drivers
in which this can be removed, and are working on the patches (and
planning to contact the maintainers, per usual). We'll select a small
number of them and apply safe SMP locking to them as examples for those
who like to cut 'n' paste their drivers for new devices.

The advantage of these changes will be to aid any developer trying to
determine how the BKL may or may not interact with their code. With
these patches, there will be 50+ less cases to consider.

At the time, it appears that most of these lock/unlock pairs were
created just in case they were needed, since there wasn't time to
inspect each driver or contact each maintainer. Before we post these
patches, I thought I'd ask if in the time since Al Viro moved this out
here (July 2000) if anybody (especially him!) has found a *legitimate*
use of the BKL in the release() functions. (We have not found one.)

Rick

PS The patches, available in about a week or so barring complications,
   will also be posted to the above sourceforge website.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Nov 07 2001 - 21:00:37 EST