mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[PATCH] call mm/page-writeback.c:set_ratelimit() when new pages are hot-added
ratelimit_pages in page-writeback.c is recalculated (in set_ratelimit()) every time a CPU is hot-added/removed. But this value is not recalculated when new pages are hot-added. This patch fixes that problem by calling set_ratelimit() when new pages are hot-added. [[email protected]: cleanups] Signed-off-by: Chandra Seetharaman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
40c99aae23
commit
2d1d43f6a4
3 changed files with 6 additions and 3 deletions
|
|
@ -501,7 +501,7 @@ void laptop_sync_completion(void)
|
|||
* will write six megabyte chunks, max.
|
||||
*/
|
||||
|
||||
static void set_ratelimit(void)
|
||||
void writeback_set_ratelimit(void)
|
||||
{
|
||||
ratelimit_pages = vm_total_pages / (num_online_cpus() * 32);
|
||||
if (ratelimit_pages < 16)
|
||||
|
|
@ -513,7 +513,7 @@ static void set_ratelimit(void)
|
|||
static int __cpuinit
|
||||
ratelimit_handler(struct notifier_block *self, unsigned long u, void *v)
|
||||
{
|
||||
set_ratelimit();
|
||||
writeback_set_ratelimit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -546,7 +546,7 @@ void __init page_writeback_init(void)
|
|||
vm_dirty_ratio = 1;
|
||||
}
|
||||
mod_timer(&wb_timer, jiffies + dirty_writeback_interval);
|
||||
set_ratelimit();
|
||||
writeback_set_ratelimit();
|
||||
register_cpu_notifier(&ratelimit_nb);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue