Re: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn

2013-09-12 Thread Michal Hocko
On Wed 11-09-13 13:04:33, Hugh Dickins wrote: > On Wed, 11 Sep 2013, Michal Hocko wrote: [...] > > From 888745909da34f8aee8a208a82d467236b828d0d Mon Sep 17 00:00:00 2001 > > From: Michal Hocko > > Date: Wed, 11 Sep 2013 17:48:10 +0200 > > Subject: [PATCH]

Re: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn

2013-09-12 Thread Michal Hocko
On Wed 11-09-13 13:04:33, Hugh Dickins wrote: On Wed, 11 Sep 2013, Michal Hocko wrote: [...] From 888745909da34f8aee8a208a82d467236b828d0d Mon Sep 17 00:00:00 2001 From: Michal Hocko mho...@suse.cz Date: Wed, 11 Sep 2013 17:48:10 +0200 Subject: [PATCH] vmpressure: fix divide-by-0

Re: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn

2013-09-11 Thread Hugh Dickins
k > > The patch below. I find it little bit nicer than Hugh's original one > because having the two checks sounds more confusing. > What do you think Hugh, Anton? > > > or moving the work into its own WQ_NON_REENTRANT queue. > > That sounds like an overkill. > &

Re: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn

2013-09-11 Thread Michal Hocko
_REENTRANT queue. That sounds like an overkill. --- >From 888745909da34f8aee8a208a82d467236b828d0d Mon Sep 17 00:00:00 2001 From: Michal Hocko Date: Wed, 11 Sep 2013 17:48:10 +0200 Subject: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn Hugh Dickins has reported a division by 0 whe

Re: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn

2013-09-11 Thread Anton Vorontsov
; --- > From 888745909da34f8aee8a208a82d467236b828d0d Mon Sep 17 00:00:00 2001 > From: Michal Hocko > Date: Wed, 11 Sep 2013 17:48:10 +0200 > Subject: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn > > Hugh Dickins has reported a division by 0 when a vmpressure event is > proces

Re: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn

2013-09-11 Thread Anton Vorontsov
On Mon, Sep 09, 2013 at 01:08:47PM +0200, Michal Hocko wrote: > On Fri 06-09-13 22:59:16, Hugh Dickins wrote: > > Hit divide-by-0 in vmpressure_work_fn(): checking vmpr->scanned before > > taking the lock is not enough, we must check scanned afterwards too. > > As vmpressure_work_fn seems the be

Re: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn

2013-09-11 Thread Anton Vorontsov
On Mon, Sep 09, 2013 at 01:08:47PM +0200, Michal Hocko wrote: On Fri 06-09-13 22:59:16, Hugh Dickins wrote: Hit divide-by-0 in vmpressure_work_fn(): checking vmpr-scanned before taking the lock is not enough, we must check scanned afterwards too. As vmpressure_work_fn seems the be the only

Re: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn

2013-09-11 Thread Anton Vorontsov
888745909da34f8aee8a208a82d467236b828d0d Mon Sep 17 00:00:00 2001 From: Michal Hocko mho...@suse.cz Date: Wed, 11 Sep 2013 17:48:10 +0200 Subject: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn Hugh Dickins has reported a division by 0 when a vmpressure event is processed. The reason

Re: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn

2013-09-11 Thread Michal Hocko
Subject: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn Hugh Dickins has reported a division by 0 when a vmpressure event is processed. The reason for the exception is that a single vmpressure work item (which is per memcg) might be processed by multiple CPUs because it is enqueued

Re: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn

2013-09-11 Thread Hugh Dickins
:00 2001 From: Michal Hocko mho...@suse.cz Date: Wed, 11 Sep 2013 17:48:10 +0200 Subject: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn Hugh Dickins has reported a division by 0 when a vmpressure event is processed. The reason for the exception is that a single vmpressure work

Re: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn

2013-09-10 Thread Anton Vorontsov
On Fri, Sep 06, 2013 at 10:59:16PM -0700, Hugh Dickins wrote: > Hit divide-by-0 in vmpressure_work_fn(): checking vmpr->scanned before > taking the lock is not enough, we must check scanned afterwards too. > > Signed-off-by: Hugh Dickins > Cc: sta...@vger.kernel.org Hm... Just trying to

Re: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn

2013-09-10 Thread Anton Vorontsov
On Fri, Sep 06, 2013 at 10:59:16PM -0700, Hugh Dickins wrote: Hit divide-by-0 in vmpressure_work_fn(): checking vmpr-scanned before taking the lock is not enough, we must check scanned afterwards too. Signed-off-by: Hugh Dickins hu...@google.com Cc: sta...@vger.kernel.org Hm... Just trying

Re: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn

2013-09-09 Thread Michal Hocko
On Fri 06-09-13 22:59:16, Hugh Dickins wrote: > Hit divide-by-0 in vmpressure_work_fn(): checking vmpr->scanned before > taking the lock is not enough, we must check scanned afterwards too. As vmpressure_work_fn seems the be the only place where we set scanned to 0 (except for the rare occasion

Re: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn

2013-09-09 Thread Michal Hocko
On Fri 06-09-13 22:59:16, Hugh Dickins wrote: Hit divide-by-0 in vmpressure_work_fn(): checking vmpr-scanned before taking the lock is not enough, we must check scanned afterwards too. As vmpressure_work_fn seems the be the only place where we set scanned to 0 (except for the rare occasion when

Re: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn

2013-09-07 Thread David Rientjes
On Fri, 6 Sep 2013, Hugh Dickins wrote: > Hit divide-by-0 in vmpressure_work_fn(): checking vmpr->scanned before > taking the lock is not enough, we must check scanned afterwards too. > > Signed-off-by: Hugh Dickins > Cc: sta...@vger.kernel.org Acked-by: David Rientjes -- To unsubscribe from

[PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn

2013-09-07 Thread Hugh Dickins
Hit divide-by-0 in vmpressure_work_fn(): checking vmpr->scanned before taking the lock is not enough, we must check scanned afterwards too. Signed-off-by: Hugh Dickins Cc: sta...@vger.kernel.org --- mm/vmpressure.c |3 +++ 1 file changed, 3 insertions(+) --- 3.11/mm/vmpressure.c

[PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn

2013-09-07 Thread Hugh Dickins
Hit divide-by-0 in vmpressure_work_fn(): checking vmpr-scanned before taking the lock is not enough, we must check scanned afterwards too. Signed-off-by: Hugh Dickins hu...@google.com Cc: sta...@vger.kernel.org --- mm/vmpressure.c |3 +++ 1 file changed, 3 insertions(+) ---

Re: [PATCH] vmpressure: fix divide-by-0 in vmpressure_work_fn

2013-09-07 Thread David Rientjes
On Fri, 6 Sep 2013, Hugh Dickins wrote: Hit divide-by-0 in vmpressure_work_fn(): checking vmpr-scanned before taking the lock is not enough, we must check scanned afterwards too. Signed-off-by: Hugh Dickins hu...@google.com Cc: sta...@vger.kernel.org Acked-by: David Rientjes