--168455872-403620456-982527447=:11260
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hi Neil, all,
The nfs daemons run holding the global kernel lock. They still hold
this lock over calls to file_op's read and write.
The file system kernel interface (FSKI) doesn't require the kernel lock
to be held over these read/write calls. The nfs daemons do not require
that the reads or writes do not block (would be v silly if they did), so
they have no guarantee the lock isn't dropped and retaken during
blocking. ie. they aren't using it as a guard across the calls.
Dropping the kernel lock around read and write in fs/nfsd/vfs.c is a
_big_ SMP scalability win!
Attached patch is against 2.4.1-ac18, but should apply to most recent
kernel versions.
Mark
--168455872-403620456-982527447=:11260
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="nfsd.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.21.0102182017270.11260@alloc>
Content-Description: nfsd.patch
Content-Disposition: attachment; filename="nfsd.patch"
LS0tIHZhbmlsbGEtMi40LjEtYWMxOC9mcy9uZnNkL3Zmcy5jCVN1biBGZWIg
MTggMTU6MDY6MjcgMjAwMQ0KKysrIG1hcmtoZS0yLjQuMS1hYzE4L2ZzL25m
c2QvdmZzLmMJU3VuIEZlYiAxOCAxOTozMjoxOCAyMDAxDQpAQCAtMzAsNiAr
MzAsNyBAQA0KICNpbmNsdWRlIDxsaW51eC9uZXQuaD4NCiAjaW5jbHVkZSA8
bGludXgvdW5pc3RkLmg+DQogI2luY2x1ZGUgPGxpbnV4L3NsYWIuaD4NCisj
aW5jbHVkZSA8bGludXgvc21wX2xvY2suaD4NCiAjaW5jbHVkZSA8bGludXgv
aW4uaD4NCiAjZGVmaW5lIF9fTk9fVkVSU0lPTl9fDQogI2luY2x1ZGUgPGxp
bnV4L21vZHVsZS5oPg0KQEAgLTYwMiwxMiArNjAzLDI4IEBADQogCQlmaWxl
LmZfcmFsZW4gPSByYS0+cF9yYWxlbjsNCiAJCWZpbGUuZl9yYXdpbiA9IHJh
LT5wX3Jhd2luOw0KIAl9DQorDQorCS8qDQorCSAqIFRoZSBuZnMgZGFlbW9u
cyByd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DQorCXNldF9mcyhvbGRmcyk7DQorDQorCWxvY2tfa2VybmVsKCk7DQor
DQogCWlmIChlcnIgPj0gMCkNCiAJCW5mc2RzdGF0cy5pb193cml0ZSArPSBj
bnQ7DQotCXNldF9mcyhvbGRmcyk7DQogDQogCS8qIGNsZWFyIHNldHVpZC9z
ZXRnaWQgZmxhZyBhZnRlciB3cml0ZSAqLw0KIAlpZiAoZXJyID49IDAgJiYg
KGlub2RlLT5pX21vZGUgJiAoU19JU1VJRCB8IFNfSVNHSUQpKSkgew0K
--168455872-403620456-982527447=:11260--
-
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/