As kernel community did not want a complicated way of
modifying BH_LRU_SIZE, it was proposed to directly set it
to 16. This has been accepted.
This patch is merged in the upstream kernel:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/
linux.git/commit/?id=
86cf78d73de8c6bfa89804b91ee0ace71a459961
Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I71fb455de9ec70ed90f86d402ae76ecfba1e1e61
Reviewed-on: http://review.whamcloud.com/12577
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
+++ /dev/null
-Allow increasing the buffer-head per-CPU LRU size to allow efficient
-filesystem operations that access many blocks for each transaction.
-For example, creating a file in a large ext4 directory with quota
-enabled will accesses multiple buffer heads and will overflow the LRU
-at the default 8-block LRU size:
-
-* parent directory inode table block (ctime, nlinks for subdirs)
-* new inode bitmap
-* inode table block
-* 2 quota blocks
-* directory leaf block (not reused, but pollutes one cache entry)
-* 2 levels htree blocks (only one is reused, other pollutes cache)
-* 2 levels indirect/index blocks (only one is reused)
-
-Signed-off-by: Liang Zhen <liang@whamcoud.com>
-Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
-
---- linux-2.6.32-131.6.1/fs/buffer.c
-+++ linux-2.6.32-131.6.1-pdo/fs/buffer.c
-@@ -1250,8 +1250,7 @@
- * The LRUs themselves only need locking against invalidate_bh_lrus. We use
- * a local interrupt disable for that.
- */
--
--#define BH_LRU_SIZE 8
-+#define BH_LRU_SIZE CONFIG_BH_LRU_SIZE
-
- struct bh_lru {
- struct buffer_head *bhs[BH_LRU_SIZE];
---- linux-2.6.32-131.6.1/fs/Kconfig
-+++ linux-2.6.32-131.6.1-pdo/fs/Kconfig
-@@ -253,4 +253,13 @@
- source "fs/nls/Kconfig"
- source "fs/dlm/Kconfig"
-
-+config BH_LRU_SIZE
-+ int "buffer head per-CPU LRU size"
-+ range 8 64
-+ default "16"
-+ help
-+ This sets the per-CPU LRU size for buffer heads in memory.
-+ More complex filesystems may be modiyfing multiple blocks
-+ within a single transaction, so keeping the buffer heads in
-+ CPU-local cache speeds up modifations significantly.
- endmenu
--- /dev/null
+Increase the buffer-head per-CPU LRU size to allow efficient
+filesystem operations that access many blocks for each transaction.
+For example, creating a file in a large ext4 directory with quota
+enabled will access multiple buffer heads and will overflow the LRU
+at the default 8-block LRU size:
+
+* parent directory inode table block (ctime, nlinks for subdirs)
+* new inode bitmap
+* inode table block
+* 2 quota blocks
+* directory leaf block (not reused, but pollutes one cache entry)
+* 2 levels htree blocks (only one is reused, other pollutes cache)
+* 2 levels indirect/index blocks (only one is reused)
+
+The buffer-head per-CPU LRU size is raised to 16, as it shows in
+metadata performance benchmarks up to 10% gain for create,
+4% for lookup and 7% for destroy.
+
+Signed-off-by: Liang Zhen <liang.zhen@intel.com>
+Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
+Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
+---
+ fs/buffer.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/fs/buffer.c b/fs/buffer.c
+index 6024877..a6468f2 100644
+--- a/fs/buffer.c
++++ b/fs/buffer.c
+@@ -1256,7 +1256,7 @@ static struct buffer_head *__bread_slow(struct buffer_head *bh)
+ * a local interrupt disable for that.
+ */
+
+-#define BH_LRU_SIZE 8
++#define BH_LRU_SIZE 16
+
+ struct bh_lru {
+ struct buffer_head *bhs[BH_LRU_SIZE];
+--
+1.7.1
+
raid5-mmp-unplug-dev-rhel6.patch
dev_read_only-2.6.32-rhel6.patch
blkdev_tunables-2.6-rhel6.patch
-bh_lru_size_config.patch
+bh_lru_size_increase.patch
quota-replace-dqptr-sem.patch
quota-avoid-dqget-calls.patch
jbd2-log_wait_for_space-2.6-rhel6.patch
raid5-mmp-unplug-dev-sles11sp1.patch
dev_read_only-2.6.32-sles11.patch
-bh_lru_size_config.patch
+bh_lru_size_increase.patch
quota-replace-dqptr-sem-sles11.patch
quota-avoid-dqget-calls.patch
quota-replace-dqptr-sem-sles11sp2.patch
quota-avoid-dqget-calls-sles11sp2.patch
blkdev_tunables-3.0-sles11.patch
-bh_lru_size_config.patch
+bh_lru_size_increase.patch
jbd2-log_wait_for_space-2.6-rhel6.patch
quota-replace-dqptr-sem-sles11sp2.patch
quota-avoid-dqget-calls-sles11sp2.patch
blkdev_tunables-3.0-sles11sp3.patch
-bh_lru_size_config.patch
+bh_lru_size_increase.patch
jbd2-log_wait_for_space-2.6-rhel6.patch
raid5-mmp-unplug-dev-3.7.patch
dev_read_only-3.7.patch
blkdev_tunables-3.7.patch
-bh_lru_size_config.patch
+bh_lru_size_increase.patch
raid5-mmp-unplug-dev-3.7.patch
dev_read_only-3.7.patch
blkdev_tunables-3.7.patch
-bh_lru_size_config.patch
+bh_lru_size_increase.patch