mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: paulmck@us.ibm.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: Fw: [RFC] Strange code in cpu_idle()
Date: Mon, 6 Dec 2004 11:16:34 +1100	[thread overview]
Message-ID: <20041206111634.44d6d29c.sfr@canb.auug.org.au> (raw)
In-Reply-To: <20041205004557.GA2028@us.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]

Hi Paul,

On Sat, 4 Dec 2004 16:45:57 -0800 "Paul E. McKenney" <paulmck@us.ibm.com> wrote:
>
> OK, I believe I found the other end of this:
> 
> static void __exit apm_exit(void)
> {
> 	int	error;
> 
> 	if (set_pm_idle) {
> 		pm_idle = original_pm_idle;
> 		/*
> 		 * We are about to unload the current idle thread pm callback
> 		 * (pm_idle), Wait for all processors to update cached/local
> 		 * copies of pm_idle before proceeding.
> 		 */
> 		synchronize_kernel();
> 	}
> 
> Unfortunately, the idle loop is a quiescent state, so it is
> possible for synchronize_kernel() to return before the idle threads
> have returned.  So I don't believe RCU is useful here.  One other
> approach would be to keep a cpu mask, in which apm_exit() sets all
> bits, and pm_idle() clears its CPU's bit only if it is set.
> Then apm_exit() could wait for all CPU's bits to clear.
> 
> There is probably a better way to do this, but that is what comes
> to mind immediately.
> 
> Thoughts?

None, sorry :-)

I don't even remember that piece of code going in (I certainly didn't
write it), though I can see what it was trying to do.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-12-06  0:16 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-05  0:45 Paul E. McKenney
2004-12-06  0:16 ` Stephen Rothwell [this message]
2004-12-06  6:46   ` Stephen Rothwell
2004-12-06 10:00     ` Zwane Mwaikambo
2004-12-06  7:20   ` Andrew Morton
2004-12-06  9:38     ` Zwane Mwaikambo
2004-12-06 16:04       ` Paul E. McKenney
2004-12-06 16:47         ` Zwane Mwaikambo
2004-12-06 19:22           ` Paul E. McKenney
2004-12-11 15:07             ` Zwane Mwaikambo
2004-12-12  4:54               ` [PATCH] Remove RCU abuse " Zwane Mwaikambo
2004-12-12  5:06                 ` Zwane Mwaikambo
2004-12-12  5:49                   ` Zwane Mwaikambo
2004-12-13  6:13                     ` Andrew Morton
2004-12-13  6:22                       ` Zwane Mwaikambo
2004-12-13  6:32                         ` Andrew Morton
2004-12-13  7:09                           ` Zwane Mwaikambo
2004-12-13  6:41                         ` Andrew Morton
2004-12-13  7:13                           ` Zwane Mwaikambo
2004-12-19  2:40                     ` Nish Aravamudan
2004-12-20  0:59                       ` Zwane Mwaikambo
2004-12-20  1:15                         ` Nick Piggin
2004-12-20  1:44                           ` Zwane Mwaikambo
2004-12-20  1:56                             ` Nick Piggin
2004-12-20  2:10                               ` Zwane Mwaikambo
2004-12-20  2:30                                 ` Nish Aravamudan
2004-12-20 18:27                                 ` Nishanth Aravamudan
2004-12-20 22:57                                   ` Zwane Mwaikambo
2004-12-20 23:15                                     ` Andrew Morton
2004-12-20 23:16                                       ` Zwane Mwaikambo
2004-12-20 23:26                                     ` Nishanth Aravamudan
2004-12-20  2:26                               ` Nish Aravamudan

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=20041206111634.44d6d29c.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@us.ibm.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®