diff options
author | Fengguang Wu <fengguang.wu@intel.com> | 2012-05-06 07:21:42 +0200 |
---|---|---|
committer | Fengguang Wu <fengguang.wu@intel.com> | 2012-05-06 07:41:58 +0200 |
commit | 68809c7108b9a75baf2a888b1c19ce1a4680f600 (patch) | |
tree | 72dac532abb4f42d197023a0495952c387c835ce /mm/page-writeback.c | |
parent | fs: remove 8 bytes of padding from struct writeback_control on 64 bit builds (diff) | |
download | linux-68809c7108b9a75baf2a888b1c19ce1a4680f600.tar.xz linux-68809c7108b9a75baf2a888b1c19ce1a4680f600.zip |
writeback: initialize global_dirty_limit
This prevents global_dirty_limit from remaining 0 (the initial value)
for long time, since it's only updated in update_dirty_limit() when
above the dirty freerun area.
It will avoid unexpected consequences when some random code use it as a
convenient approximation of the global dirty threshold.
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Diffstat (limited to '')
-rw-r--r-- | mm/page-writeback.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 9dec97fee375..93d8d2f7108c 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -1568,6 +1568,7 @@ void writeback_set_ratelimit(void) unsigned long background_thresh; unsigned long dirty_thresh; global_dirty_limits(&background_thresh, &dirty_thresh); + global_dirty_limit = dirty_thresh; ratelimit_pages = dirty_thresh / (num_online_cpus() * 32); if (ratelimit_pages < 16) ratelimit_pages = 16; |