From: Jens Axboe <jens.axboe@oracle.com>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
npiggin@suse.de, torvalds@linux-foundation.org,
peterz@infradead.org, sam@ravnborg.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: Re: [PATCH 11/11] s390: convert to generic helpers for IPI function calls
Date: Wed, 23 Apr 2008 13:54:31 +0200 [thread overview]
Message-ID: <20080423115430.GK12774@kernel.dk> (raw)
In-Reply-To: <20080423114744.GA29422@osiris.boeblingen.de.ibm.com>
On Wed, Apr 23 2008, Heiko Carstens wrote:
> > > > Your generic patch changes semantics of smp_call_function(). At least the
> > > > s390 version of smp_call_function() mask used to not return unless all IPIs
> > > > where received on the target cpus.
> > > > Your patch changes that. It will already return as soon as all IPIs have
> > > > been sent. Unfortunately Martin's etr code in arch/s390/kernel/time.c
> > >
> > > Yep, this is what I mentioned in the intro mail.
> > >
> > > > relies on exactly the old semantics.
> > >
> > > OK, I could not see anything which relied on that and I did think that
> > > it was a somewhat odd interface. By the time that smp_call_function()
> > > stops waiting for startups, we could easily be in the condition that the
> > > N-1 CPUs executed the function part a long time ago. I just didn't see
> > > much usefulness in that, you may as well just set wait == 1 in that
> > > case.
> > >
> > > > Since this seems to be an s390 only issue, could you just drop the s390
> > > > conversion patch? We'll have to think about how to change the err code
> > > > and convert later I guess.
> > >
> > > I'll drop the s390 bits. I can easily add something like
> > > smp_call_function_foo() that has this behaviour.
> >
> > I added an smp_call_function_sync() for this purpose and kept the s390
> > conversion, I would very much appreciate if you could look it over. I
> > wont post the full patchset again today, but you can inspect it here:
> >
> > http://git.kernel.dk/?p=linux-2.6-block.git;a=shortlog;h=refs/heads/generic-ipi
> >
> > The interesting bits are patch #1 for the generic bits and patch #11 for
> > the s390 part. Thanks!
>
> I don't think that works: the old code also relied on the fact that there
> could be only one cpu sending an smp_call_* IPI (serialized by call_lock).
> The current etr code exploits that to serialize all cpus:
>
> Do smp_call_function() to force all other cpus into clock_sync_cpu_start()
> where they sort of busy wait(!). Then the master cpu is syncing the clock
> and when it finished the other cpus may continue again and finally leave
> the smp_call_function interrupt handler.
>
> Your patch series however doesn't make sure anymore that there is only
> one cpu doing an smp_call_function*, so we may deadlock as soon as two
> cpus are trying to synchronize all cpus this way.
> After all I think the etr code should be converted to use stop_machine_run
> instead. However that doesn't allow for master/slave cpus.
You are right. I'll drop the code again, it would be nice to get rid of
this interface, I guess s390 can do that when they convert to the
generic helpers.
--
Jens Axboe
next prev parent reply other threads:[~2008-04-23 11:54 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-22 18:50 [PATCH 0/11] Generic smp_call_function() #2 Jens Axboe
2008-04-22 18:50 ` [PATCH 1/11] Add generic helpers for arch IPI function calls Jens Axboe
2008-04-22 20:17 ` Peter Zijlstra
2008-04-23 6:07 ` Jens Axboe
2008-04-23 6:32 ` Peter Zijlstra
2008-04-23 7:49 ` Jens Axboe
2008-04-23 7:50 ` Peter Zijlstra
2008-04-24 22:01 ` Russell King
2008-04-25 7:18 ` Jens Axboe
2008-04-26 6:28 ` Jeremy Fitzhardinge
2008-04-28 7:38 ` Jes Sorensen
2008-04-26 6:11 ` Andrew Morton
2008-04-26 14:13 ` James Bottomley
2008-04-27 0:58 ` Paul E. McKenney
2008-04-27 10:36 ` Jens Axboe
2008-04-27 10:30 ` Jens Axboe
2008-04-28 14:25 ` David Howells
2008-04-28 14:43 ` James Bottomley
2008-04-22 18:50 ` [PATCH 2/11] x86: convert to generic helpers for " Jens Axboe
2008-04-22 19:03 ` Linus Torvalds
2008-04-22 19:12 ` Ingo Molnar
2008-04-22 19:22 ` Linus Torvalds
2008-04-22 19:26 ` Ingo Molnar
2008-04-22 19:50 ` Linus Torvalds
2008-04-23 1:11 ` Nick Piggin
2008-04-23 1:22 ` Linus Torvalds
2008-04-23 1:36 ` Nick Piggin
2008-04-23 7:08 ` Jens Axboe
2008-04-23 12:54 ` Jens Axboe
2008-04-26 6:44 ` Jeremy Fitzhardinge
2008-04-27 10:23 ` Jens Axboe
2008-04-27 15:18 ` Jeremy Fitzhardinge
2008-04-22 18:50 ` [PATCH 3/11] powerpc: " Jens Axboe
2008-04-22 18:50 ` [PATCH 4/11] ia64: " Jens Axboe
2008-04-22 18:50 ` [PATCH 5/11] alpha: " Jens Axboe
2008-04-22 18:50 ` [PATCH 6/11] arm: " Jens Axboe
2008-04-22 18:50 ` [PATCH 7/11] m32r: " Jens Axboe
2008-04-22 18:50 ` [PATCH 8/11] mips: " Jens Axboe
2008-04-22 23:18 ` Ralf Baechle
2008-04-23 7:18 ` Jens Axboe
2008-04-22 18:50 ` [PATCH 9/11] parisc: " Jens Axboe
2008-04-22 18:50 ` [PATCH 10/11] sh: " Jens Axboe
2008-04-25 8:56 ` Paul Mundt
2008-04-25 9:16 ` Jens Axboe
2008-04-22 18:50 ` [PATCH 11/11] s390: " Jens Axboe
2008-04-23 7:58 ` Heiko Carstens
2008-04-23 8:11 ` Jens Axboe
2008-04-23 11:21 ` Jens Axboe
2008-04-23 11:47 ` Heiko Carstens
2008-04-23 11:54 ` Jens Axboe [this message]
2008-04-23 12:42 ` Martin Schwidefsky
2008-04-23 15:56 ` Rusty Russell
-- strict thread matches above, loose matches on Subject: below --
2008-04-22 7:57 [PATCH 0/11] Generic smp_call_function() and friends Jens Axboe
2008-04-22 7:57 ` [PATCH 11/11] s390: convert to generic helpers for IPI function calls Jens Axboe
2008-04-22 8:04 ` Martin Schwidefsky
2008-04-22 8:07 ` Jens Axboe
2008-04-22 7:57 ` Jens Axboe
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=20080423115430.GK12774@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@suse.de \
--cc=peterz@infradead.org \
--cc=sam@ravnborg.org \
--cc=schwidefsky@de.ibm.com \
--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
Powered by JetHome