Skip to content

Commit

Permalink
vmpressure: do not check for pending work to prevent from new work
Browse files Browse the repository at this point in the history
because it is racy and it doesn't give us much anyway as schedule_work
handles this case already.

Signed-off-by: Michal Hocko <[email protected]>
Reported-by: Tejun Heo <[email protected]>
Cc: Anton Vorontsov <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Cc: Li Zefan <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Michal Hocko authored and torvalds committed Jul 31, 2013
1 parent 22f2020 commit 8e0ed44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/vmpressure.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ void vmpressure(gfp_t gfp, struct mem_cgroup *memcg,
scanned = vmpr->scanned;
spin_unlock(&vmpr->sr_lock);

if (scanned < vmpressure_win || work_pending(&vmpr->work))
if (scanned < vmpressure_win)
return;
schedule_work(&vmpr->work);
}
Expand Down

0 comments on commit 8e0ed44

Please sign in to comment.