From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Hocko Subject: [PATCH v3 2/3] vmpressure: do not check for pending work to prevent from new work Date: Mon, 15 Jul 2013 12:30:32 +0200 Message-ID: <1373884233-32441-2-git-send-email-mhocko@suse.cz> References: <20130711154408.GA9229@mtj.dyndns.org> <1373884233-32441-1-git-send-email-mhocko@suse.cz> Return-path: In-Reply-To: <1373884233-32441-1-git-send-email-mhocko@suse.cz> Sender: owner-linux-mm@kvack.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: cgroups@vger.kernel.org Cc: Tejun Heo , Li Zefan , Anton Vorontsov , Johannes Weiner , KAMEZAWA Hiroyuki , KOSAKI Motohiro , linux-mm@kvack.org because it is racy and it doesn't give us much anyway as schedule_work handles this case already. Brought-up-by: Tejun Heo Signed-off-by: Michal Hocko --- mm/vmpressure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmpressure.c b/mm/vmpressure.c index f4ee6a1..192f973 100644 --- a/mm/vmpressure.c +++ b/mm/vmpressure.c @@ -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); } -- 1.8.3.2 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org