From: Andrew Morton <akpm@digeo.com>
To: Dave Hansen <haveblue@us.ibm.com>,
lkml <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Ingo Molnar <mingo@redhat.com>
Subject: Re: 2.5.40-mm2
Date: Sun, 06 Oct 2002 15:07:30 -0700 [thread overview]
Message-ID: <3DA0B422.C23B23D4@digeo.com> (raw)
In-Reply-To: 3DA0B151.6EF8C8D9@digeo.com
Andrew Morton wrote:
>
> ...
> int del_timer_sync(timer_t *timer)
> {
> - tvec_base_t *base = tvec_bases;
> int i, ret;
>
> ret = del_timer(timer);
>
> for (i = 0; i < NR_CPUS; i++) {
> + tvec_base_t *base;
> +
> if (!cpu_online(i))
> continue;
> + base = tvec_bases + i;
> if (base->running_timer == timer) {
> - while (base->running_timer == timer) {
> + while (base->running_timer == timer)
> cpu_relax();
> - preempt_disable();
> - preempt_enable();
> - }
> break;
> }
> base++;
Oh, OK. There's a base++ hidden at the end there :(
So the code as-is will work OK if all your online CPUs are
adjacent, starting at CPU0. It is incorrect if you have
gaps in your online map.
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@digeo.com>
To: Dave Hansen <haveblue@us.ibm.com>,
lkml <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Ingo Molnar <mingo@redhat.com>
Subject: Re: 2.5.40-mm2
Date: Sun, 06 Oct 2002 15:07:30 -0700 [thread overview]
Message-ID: <3DA0B422.C23B23D4@digeo.com> (raw)
In-Reply-To: 3DA0B151.6EF8C8D9@digeo.com
Andrew Morton wrote:
>
> ...
> int del_timer_sync(timer_t *timer)
> {
> - tvec_base_t *base = tvec_bases;
> int i, ret;
>
> ret = del_timer(timer);
>
> for (i = 0; i < NR_CPUS; i++) {
> + tvec_base_t *base;
> +
> if (!cpu_online(i))
> continue;
> + base = tvec_bases + i;
> if (base->running_timer == timer) {
> - while (base->running_timer == timer) {
> + while (base->running_timer == timer)
> cpu_relax();
> - preempt_disable();
> - preempt_enable();
> - }
> break;
> }
> base++;
Oh, OK. There's a base++ hidden at the end there :(
So the code as-is will work OK if all your online CPUs are
adjacent, starting at CPU0. It is incorrect if you have
gaps in your online map.
--
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/
next prev parent reply other threads:[~2002-10-06 22:02 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-06 18:47 2.5.40-mm2 Andrew Morton
2002-10-06 18:47 ` 2.5.40-mm2 Andrew Morton
2002-10-06 20:47 ` 2.5.40-mm2 Dave Hansen
2002-10-06 20:47 ` 2.5.40-mm2 Dave Hansen
2002-10-06 21:55 ` 2.5.40-mm2 Andrew Morton
2002-10-06 21:55 ` 2.5.40-mm2 Andrew Morton
2002-10-06 22:07 ` Andrew Morton [this message]
2002-10-06 22:07 ` 2.5.40-mm2 Andrew Morton
2002-10-06 22:11 ` 2.5.40-mm2 Andrew Morton
2002-10-06 22:11 ` 2.5.40-mm2 Andrew Morton
2002-10-07 5:46 ` 2.5.40-mm2 Dave Hansen
2002-10-07 5:46 ` 2.5.40-mm2 Dave Hansen
2002-10-06 22:23 ` 2.5.40-mm2 Robert Love
2002-10-06 22:23 ` 2.5.40-mm2 Robert Love
2002-10-06 22:33 ` 2.5.40-mm2 Andrew Morton
2002-10-06 22:33 ` 2.5.40-mm2 Andrew Morton
2002-10-06 22:38 ` 2.5.40-mm2 Robert Love
2002-10-06 22:38 ` 2.5.40-mm2 Robert Love
2002-10-08 11:05 ` 2.5.40-mm2 Ingo Molnar
2002-10-08 11:05 ` 2.5.40-mm2 Ingo Molnar
2002-10-08 16:23 ` 2.5.40-mm2 Dave Hansen
2002-10-08 16:23 ` 2.5.40-mm2 Dave Hansen
2002-10-08 16:43 ` 2.5.40-mm2 Dave Hansen
2002-10-08 16:43 ` 2.5.40-mm2 Dave Hansen
2002-10-08 16:56 ` 2.5.40-mm2 Andrew Morton
2002-10-08 16:56 ` 2.5.40-mm2 Andrew Morton
2002-10-09 8:12 ` 2.5.40-mm2 Ingo Molnar
2002-10-09 8:12 ` 2.5.40-mm2 Ingo Molnar
2002-10-07 17:45 ` 2.5.40-mm2 Badari Pulavarty
2002-10-07 17:45 ` 2.5.40-mm2 Badari Pulavarty
2002-10-07 17:55 ` 2.5.40-mm2 Jens Axboe
2002-10-07 17:55 ` 2.5.40-mm2 Jens Axboe
2002-10-07 18:23 ` 2.5.40-mm2 Andrew Morton
2002-10-07 18:23 ` 2.5.40-mm2 Andrew Morton
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=3DA0B422.C23B23D4@digeo.com \
--to=akpm@digeo.com \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.