From: Thomas Gleixner <tglx@linutronix.de>
To: Peter Zijlstra <peterz@infradead.org>
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] smp/hotplug annotations
Date: Tue, 5 Sep 2017 15:36:11 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1709051534010.1900@nanos> (raw)
In-Reply-To: <alpine.DEB.2.20.1709051034000.1900@nanos>
On Tue, 5 Sep 2017, Thomas Gleixner wrote:
> On Tue, 5 Sep 2017, Peter Zijlstra wrote:
>
> > These two patches appear to make hotplug work again without tripping lockdep.
>
> They cover the case where the plug/unplug succeeds, but they will not work
> when a plug/unplug operation fails, because after a fail it rolls back
> automatically, so in case UP fails, it will go down again, but the
> initiator side still waits on the 'UP' completion. Same issue on down.
>
> I think that extra lockdep magic can be avoided completely by splitting the
> completions into a 'up' and a 'down' completion, but that only solves a
> part of the problem. The current failure handling does an automated
> rollback, so if UP fails somewhere the AP rolls back, which means it
> invokes the down callbacks. DOWN the other way round.
>
> We can solve that by changing the way how rollback is handled so it does
> not automatically roll back.
>
> if (callback() < 0) {
> store_state();
> complete(UP);
> wait_for_being_kicked_again()
> }
>
> and on the control side have
>
> wait_for_completion(UP);
>
> if (UP->failed) {
> kick(DOWN);
> wait_for_completion(DOWN);
> }
>
> It's not entirely trivial, but I haven't seen a real problem with it yet.
Now I found one. It's the multi instance rollback. This is a nested
rollback mechanism deep in the call chain. Seperating that one is going to
be a major pain.
Thanks,
tglx
next prev parent reply other threads:[~2017-09-05 13:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-05 7:52 [PATCH 0/2] smp/hotplug annotations Peter Zijlstra
2017-09-05 7:52 ` [PATCH 1/2] smp/hotplug,lockdep: Annotate st->done Peter Zijlstra
2017-09-05 7:52 ` [PATCH 2/2] smp/hotplug,lockdep: Annotate cpuhp_state Peter Zijlstra
2017-09-05 12:59 ` Mike Galbraith
2017-09-19 17:57 ` Paul E. McKenney
2017-09-05 13:31 ` [PATCH 0/2] smp/hotplug annotations Thomas Gleixner
2017-09-05 13:36 ` Thomas Gleixner [this message]
2017-09-06 17:08 ` Peter Zijlstra
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=alpine.DEB.2.20.1709051534010.1900@nanos \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).