mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Hugh Dickins <hugh@veritas.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix bogus hotplug cpu warning
Date: Mon, 27 Aug 2007 13:52:12 -0700	[thread overview]
Message-ID: <20070827135212.6a5a847e.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0708272126050.29594@blonde.wat.veritas.com>

On Mon, 27 Aug 2007 21:37:14 +0100 (BST)
Hugh Dickins <hugh@veritas.com> wrote:

> > So I agree with the patch, but not with its description.
> 
> I don't see which part of the description you disagree with, but please
> do improve it if you can.

I'd change the description to


current_is_keventd() is a stupid load of crap.  It does

int current_is_keventd(void)
{
	struct cpu_workqueue_struct *cwq;
	int cpu = smp_processor_id();	/* preempt-safe: keventd is per-cpu */

but that comment (and the code itself) only make sense when
current_is_keventd() is called by keventd.  In which case thers is no point
in the function even existing!

We need to use raw_smp_processor_id() so that non-keventd (or, more
specifically, non-pinned-to-one-cpu) callers won't generate "using
smp_processor_id() in preemptible" warnings.


  reply	other threads:[~2007-08-27 20:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-27 15:06 Hugh Dickins
2007-08-27 18:18 ` Andrew Morton
2007-08-27 20:37   ` Hugh Dickins
2007-08-27 20:52     ` Andrew Morton [this message]
2007-08-27 21:09       ` Hugh Dickins

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=20070827135212.6a5a847e.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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®