Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1726739

Re: [PATCH 0/2] smp/hotplug annotations

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH 0/2] smp/hotplug annotations
Date 2017-09-05 15:40 +0200
Message-ID <ummf9-3dY-51@gated-at.bofh.it> (permalink)
References <umh5L-b3-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] smp/hotplug annotations Peter Zijlstra <peterz@infradead.org> - 2017-09-05 10:10 +0200
  [PATCH 2/2] smp/hotplug,lockdep: Annotate cpuhp_state Peter Zijlstra <peterz@infradead.org> - 2017-09-05 10:10 +0200
    Re: [PATCH 2/2] smp/hotplug,lockdep: Annotate cpuhp_state Mike Galbraith <efault@gmx.de> - 2017-09-05 15:10 +0200
  [PATCH 1/2] smp/hotplug,lockdep: Annotate st->done Peter Zijlstra <peterz@infradead.org> - 2017-09-05 10:10 +0200
  Re: [PATCH 0/2] smp/hotplug annotations Thomas Gleixner <tglx@linutronix.de> - 2017-09-05 15:40 +0200
    Re: [PATCH 0/2] smp/hotplug annotations Peter Zijlstra <peterz@infradead.org> - 2017-09-06 19:10 +0200
  Re: [PATCH 0/2] smp/hotplug annotations Thomas Gleixner <tglx@linutronix.de> - 2017-09-05 15:40 +0200

csiph-web