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

On 05/08, Jiri Slaby wrote:
>
> 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.

Great! Thanks.

> 
> 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:42 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             ` [PATCH 1/1] vmstat-use-our-own-timer-events-fix Jiri Slaby
2007-05-08 14:42               ` Oleg Nesterov [this message]
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=20070508144224.GA1138@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.com \
    --cc=clameter@sgi.com \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    /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

all inboxes | Powered by JetHome®