Skip to content

Commit

Permalink
vmstat: make vmstat_update deferrable
Browse files Browse the repository at this point in the history
Commit 0eb77e9 ("vmstat: make vmstat_updater deferrable again and
shut down on idle") made vmstat_shepherd deferrable.  vmstat_update
itself is still useing standard timer which might interrupt idle task.
This is possible because "mm, vmstat: make quiet_vmstat lighter" removed
cancel_delayed_work from the quiet_vmstat.

Change vmstat_work to use DEFERRABLE_WORK to prevent from pointless
wakeups from the idle context.

Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Michal Hocko <mhocko@suse.com>
Cc: Mike Galbraith <umgwanakikbuti@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Michal Hocko authored and Linus Torvalds committed Feb 6, 2016
1 parent f01f17d commit ccde8bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/vmstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1512,7 +1512,7 @@ static void __init start_shepherd_timer(void)
int cpu;

for_each_possible_cpu(cpu)
INIT_DELAYED_WORK(per_cpu_ptr(&vmstat_work, cpu),
INIT_DEFERRABLE_WORK(per_cpu_ptr(&vmstat_work, cpu),
vmstat_update);

if (!alloc_cpumask_var(&cpu_stat_off, GFP_KERNEL))
Expand Down

0 comments on commit ccde8bd

Please sign in to comment.