public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>, Pavel Machek <pavel@ucw.cz>
Cc: <linux-pm@lists.linux-foundation.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/1] vmstat-use-our-own-timer-events-fix
Date: Tue,  8 May 2007 16:30:55 +0200 (CEST)	[thread overview]
Message-ID: <735170251589527543@wsc.cz> (raw)
In-Reply-To: <20070508142025.GB1105@tv-sign.ru>

Oleg Nesterov wrote:
> On 05/08, Oleg Nesterov wrote:
> >
> > On 05/08, Jiri Slaby wrote:
> >
> > This should not happen because we are doing cancel_rearming_delayed_work()
> > below, however:
> > 
> > > +       case CPU_DOWN_PREPARE:
> > > +       case CPU_DOWN_PREPARE_FROZEN:
> > > +               cancel_rearming_delayed_work(&per_cpu(vmstat_work, cpu));
> > > +               per_cpu(vmstat_work, cpu).work.func = NULL;
> > > +       case CPU_DOWN_FAILED:
> > > +       case CPU_DOWN_FAILED_FROZEN:
> > > +               start_cpu_timer(cpu);
> > 
> > we need a "break;" before "case CPU_DOWN_FAILED", otherwise we re-start
> > vmstat_update() immediately.
> > 
> > This is a bug, but I am not sure is this the only problem.
> 
> In case I was not clear, this _can_ explain the problem. Because an extra
> start_cpu_timer() (due to missed "break;") re-initializes dwork, and clears
> _PENDING.

Yes, it helped, thanks. If no objections, please apply the patch below.

--

vmstat-use-our-own-timer-events-fix

add missing break

Cc: Christoph Lameter <clameter@sgi.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>

---
commit e0fe3cf4776a3c16ac7625ce9eae75ea42eb9b4e
tree c9a4277860e2cea03911b3d73c9386c9284d991b
parent b1034323f7e57642eee59a0f5e77c50bc26982c5
author Jiri Slaby <jirislaby@gmail.com> Tue, 08 May 2007 16:25:28 +0200
committer Jiri Slaby <jirislaby@gmail.com> Tue, 08 May 2007 16:25:28 +0200

 mm/vmstat.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/mm/vmstat.c b/mm/vmstat.c
index 709e2f0..fac05e8 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -677,6 +677,7 @@ static int __cpuinit vmstat_cpuup_callback(struct notifier_block *nfb,
 	case CPU_DOWN_PREPARE_FROZEN:
 		cancel_rearming_delayed_work(&per_cpu(vmstat_work, cpu));
 		per_cpu(vmstat_work, cpu).work.func = NULL;
+		break;
 	case CPU_DOWN_FAILED:
 	case CPU_DOWN_FAILED_FROZEN:
 		start_cpu_timer(cpu);

  reply	other threads:[~2007-05-08 14:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-08  8:57 2.6.21-mm1 hwsusp: BUG at workqueue.c:106 Jiri Slaby
2007-05-08  9:11 ` Andrew Morton
2007-05-08 10:55   ` Oleg Nesterov
2007-05-08 11:09     ` Jiri Slaby
2007-05-08 12:00       ` Jiri Slaby
2007-05-08 13:48         ` Oleg Nesterov
2007-05-08 14:20           ` Oleg Nesterov
2007-05-08 14:30             ` Jiri Slaby [this message]
2007-05-08 14:42               ` [PATCH 1/1] vmstat-use-our-own-timer-events-fix Oleg Nesterov
2007-05-08 16:08               ` Christoph Lameter
2007-05-08 12:12     ` 2.6.21-mm1 hwsusp: BUG at workqueue.c:106 Jarek Poplawski
2007-05-08 12:40       ` Oleg Nesterov
2007-05-08 10:51 ` Jarek Poplawski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=735170251589527543@wsc.cz \
    --to=jirislaby@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox