Whamcloud - gitweb
LU-50 kernel: configurable BH LRU size
[fs/lustre-release.git] / lustre / kernel_patches / patches / bh_lru_size_config.patch
1 --- linux-2.6.32-131.6.1/fs/buffer.c
2 +++ linux-2.6.32-131.6.1-pdo/fs/buffer.c
3 @@ -1250,8 +1250,7 @@
4   * The LRUs themselves only need locking against invalidate_bh_lrus.  We use
5   * a local interrupt disable for that.
6   */
7 -
8 -#define BH_LRU_SIZE    8
9 +#define BH_LRU_SIZE    CONFIG_BH_LRU_SIZE
10  
11  struct bh_lru {
12         struct buffer_head *bhs[BH_LRU_SIZE];
13 --- linux-2.6.32-131.6.1/fs/Kconfig
14 +++ linux-2.6.32-131.6.1-pdo/fs/Kconfig
15 @@ -253,4 +253,13 @@
16  source "fs/nls/Kconfig"
17  source "fs/dlm/Kconfig"
18  
19 +config BH_LRU_SIZE
20 +      int "buffer head per-CPU LRU size"
21 +      range 8 64
22 +      default "8"
23 +      help
24 +        This sets the per-CPU LRU size for buffer heads in memory.
25 +        More complex filesystems may be modiyfing multiple blocks
26 +        within a single transaction, so keeping the buffer heads in
27 +        CPU-local cache speeds up modifations significantly.
28  endmenu