[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070827135212.6a5a847e.akpm@linux-foundation.org>
Date: Mon, 27 Aug 2007 13:52:12 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Hugh Dickins <hugh@...itas.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fix bogus hotplug cpu warning
On Mon, 27 Aug 2007 21:37:14 +0100 (BST)
Hugh Dickins <hugh@...itas.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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists