Whamcloud - gitweb
LU-3974 libcfs: replace num_physpages with totalram_pages
[fs/lustre-release.git] / lustre / obdclass / class_obd.c
index 7df4950..8d2c1ac 100644 (file)
@@ -588,10 +588,10 @@ int init_obdclass(void)
         /* 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 - PAGE_CACHE_SHIFT))
-               obd_max_dirty_pages = num_physpages / 4;
+       if (totalram_pages <= 512 << (20 - PAGE_CACHE_SHIFT))
+               obd_max_dirty_pages = totalram_pages / 4;
        else
-               obd_max_dirty_pages = num_physpages / 2;
+               obd_max_dirty_pages = totalram_pages / 2;
 
         err = obd_init_caches();
         if (err)