LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: David Miller <davem@davemloft.net>
Cc: akpm@osdl.org, mingo@elte.hu, ak@suse.de, jan.glauber@de.ibm.com,
	schwidefsky@de.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [patch] i386/x86_64: smp_call_function locking inconsistency
Date: Fri, 9 Feb 2007 09:42:21 +0100	[thread overview]
Message-ID: <20070209084221.GA8259@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20070208.124328.88477956.davem@davemloft.net>

On Thu, Feb 08, 2007 at 12:43:28PM -0800, David Miller wrote:
> From: Heiko Carstens <heiko.carstens@de.ibm.com>
> Date: Thu, 8 Feb 2007 21:32:10 +0100
>  
> > So either all spin_lock_bh's should be converted to spin_lock,
> > which would limit smp_call_function()/smp_call_function_single()
> > to process context & irqs enabled.
> > Or the spin_lock's could be converted to spin_lock_bh which would
> > make it possible to call these two functions even if in softirq
> > context. AFAICS this should be safe.
> [...]
> In short, it's a mess :-)
>  
> I think it's logically simpler if we disallow smp_call_function*()
> from any kind of asynchronous context.  But I'm sure your driver
> has a true need for this for some reason.

I just want to avoid that s390 has different semantics for
smp_call_functiom*() than any other architecture. But then again it
will probably not hurt since we allow more.
Another thing that comes into my mind is smp_call_function together
with cpu hotplug. Who is responsible that preemption and with that
cpu hotplug is disabled?
Is it the caller or smp_call_function itself?
If it's smp_call_function then s390 would be broken, since
then we would have
int cpus = num_online_cpus()-1;
in preemptible context... I agree: what a mess :)

  reply	other threads:[~2007-02-09  8:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-08 20:32 Heiko Carstens
2007-02-08 20:43 ` David Miller
2007-02-09  8:42   ` Heiko Carstens [this message]
2007-02-09 12:57     ` Jan Glauber
2007-06-07 14:07       ` Satyam Sharma
2007-06-07 16:27         ` Heiko Carstens
2007-06-07 16:54           ` Satyam Sharma
2007-06-07 17:18             ` Satyam Sharma
2007-06-07 17:22               ` Avi Kivity
2007-06-07 17:33                 ` Satyam Sharma
2007-06-10  7:38                   ` Avi Kivity
2007-06-08 19:43             ` Andi Kleen
2007-06-08 19:42         ` Andi Kleen
2007-02-09  7:40 ` Andi Kleen

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=20070209084221.GA8259@osiris.boeblingen.de.ibm.com \
    --to=heiko.carstens@de.ibm.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=davem@davemloft.net \
    --cc=jan.glauber@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=schwidefsky@de.ibm.com \
    --subject='Re: [patch] i386/x86_64: smp_call_function locking inconsistency' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).