From: Rusty Russell <rusty@rustcorp.com.au>
To: Pavel Machek <pavel@ucw.cz>
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org,
sfr@canb.auug.org.au
Subject: Re: [PATCH] Hotplug CPU prep V: x86 non-linear CPU numbers
Date: Thu, 16 May 2002 09:14:47 +1000 [thread overview]
Message-ID: <E1787yp-0000RO-00@wagner.rustcorp.com.au> (raw)
In-Reply-To: Your message of "Wed, 15 May 2002 12:13:14 +0200." <20020515101314.GA1152@elf.ucw.cz>
In message <20020515101314.GA1152@elf.ucw.cz> you write:
> > @@ -1585,7 +1581,7 @@
> >
> > p = buf;
> >
> > - if ((smp_num_cpus == 1) &&
> > + if ((num_online_cpus() == 1) &&
> > !(error = apm_get_power_status(&bx, &cx, &dx))) {
> > ac_line_status = (bx >> 8) & 0xff;
> > battery_status = bx & 0xff;
>
> Are you sure? What if you add another CPU just after the test?
APM is special: what it *really* wants to know is if only CPU 0 is
online (this test will almost certainly fail miserably if the single
online CPU is CPU 1, which previously wasn't possible).
I'll check with the APM maintainer what guarantees he needs: we may
actually need to grab to cpu control lock here. Anyway apparently I
broke something else in APM.
(BTW, in general, we use magic to avoid locks around num_online_cpus()
et al: we make changes then wait for everyone to voluntarily schedule
before exposing it).
Cheers,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
next prev parent reply other threads:[~2002-05-15 23:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-09 8:58 Rusty Russell
2002-05-15 10:13 ` Pavel Machek
2002-05-15 23:14 ` Rusty Russell [this message]
2002-05-16 0:29 ` Alan Cox
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=E1787yp-0000RO-00@wagner.rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=sfr@canb.auug.org.au \
--cc=torvalds@transmeta.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
all inboxes | Powered by JetHome®