From 200e3565550263cafd07bd71afa88a4e2273fb70 Mon Sep 17 00:00:00 2001 From: bobijam Date: Wed, 6 Aug 2008 02:17:08 +0000 Subject: [PATCH] Branch b1_6 b=16205 i=joahnn, adilger low-memory tunings for BlueGene/L. --- lustre/include/lustre_dlm.h | 5 +++++ lustre/llite/llite_lib.c | 9 +++++++-- lustre/obdclass/class_obd.c | 9 +++++++-- lustre/obdfilter/filter_internal.h | 2 +- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/lustre/include/lustre_dlm.h b/lustre/include/lustre_dlm.h index 2aa9080..967cc96 100644 --- a/lustre/include/lustre_dlm.h +++ b/lustre/include/lustre_dlm.h @@ -59,7 +59,12 @@ struct obd_device; #define OBD_LDLM_DEVICENAME "ldlm" +#ifdef HAVE_BGL_SUPPORT +/* 1.5 times the maximum 128 tasks available in VN mode */ +#define LDLM_DEFAULT_LRU_SIZE 196 +#else #define LDLM_DEFAULT_LRU_SIZE (100 * num_online_cpus()) +#endif #define LDLM_DEFAULT_MAX_ALIVE (cfs_time_seconds(36000)) typedef enum { diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index f18eb7c..ff3f128 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -90,10 +90,15 @@ static struct ll_sb_info *ll_init_sbi(void) si_meminfo(&si); pages = si.totalram - si.totalhigh; - if (pages >> (20 - CFS_PAGE_SHIFT) < 512) + if (pages >> (20 - CFS_PAGE_SHIFT) < 512) { +#ifdef HAVE_BGL_SUPPORT + sbi->ll_async_page_max = pages / 4; +#else sbi->ll_async_page_max = pages / 2; - else +#endif + } else { sbi->ll_async_page_max = (pages / 4) * 3; + } sbi->ll_ra_info.ra_max_pages = min(pages / 32, SBI_DEFAULT_READAHEAD_MAX); sbi->ll_ra_info.ra_max_read_ahead_whole_pages = diff --git a/lustre/obdclass/class_obd.c b/lustre/obdclass/class_obd.c index a3208f8..e5cdd9a 100644 --- a/lustre/obdclass/class_obd.c +++ b/lustre/obdclass/class_obd.c @@ -570,8 +570,13 @@ int init_obdclass(void) for (i = 0; i < class_devno_max(); i++) obd_devs[i] = NULL; - /* Default the dirty page cache cap to 1/2 of system memory */ - obd_max_dirty_pages = num_physpages / 2; + /* Default the dirty page cache cap to 1/2 of system memory. + * For clients with less memory, a larger fraction is needed + * for other purposes (mostly for BGL). */ + if (num_physpages <= 512 << (20 - CFS_PAGE_SHIFT)) + obd_max_dirty_pages = num_physpages / 4; + else + obd_max_dirty_pages = num_physpages / 2; err = obd_init_caches(); if (err) diff --git a/lustre/obdfilter/filter_internal.h b/lustre/obdfilter/filter_internal.h index 65a46b7..668b3d4 100644 --- a/lustre/obdfilter/filter_internal.h +++ b/lustre/obdfilter/filter_internal.h @@ -79,7 +79,7 @@ struct filter_mod_data { int fmd_refcount; /* reference counter - list holds 1 */ }; -#ifdef BGL_SUPPORT +#ifdef HAVE_BGL_SUPPORT #define FILTER_FMD_MAX_NUM_DEFAULT 128 /* many active files per client on BGL */ #else #define FILTER_FMD_MAX_NUM_DEFAULT 32 -- 1.8.3.1