linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Hannes Reinecke <hare@suse.de>, Thomas Gleixner <tglx@linutronix.de>
Cc: Keith Busch <keith.busch@intel.com>,
	Christoph Hellwig <hch@lst.de>,
	"Marc Zyngier" <marc.zyngier@arm.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"Peter Zijlstra" <peterz@infradead.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Linuxarm <linuxarm@huawei.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Hannes Reinecke <hare@suse.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: Question on handling managed IRQs when hotplugging CPUs
Date: Tue, 5 Feb 2019 13:24:11 +0000	[thread overview]
Message-ID: <42d149c5-0380-c357-8811-81015159ac04@huawei.com> (raw)
In-Reply-To: <d93ff049-e96d-36ce-7e58-ec97cbb27ed0@suse.de>

On 04/02/2019 07:12, Hannes Reinecke wrote:
> On 2/1/19 10:57 PM, Thomas Gleixner wrote:
>> On Fri, 1 Feb 2019, Hannes Reinecke wrote:
>>> Thing is, if we have _managed_ CPU hotplug (ie if the hardware
>>> provides some
>>> means of quiescing the CPU before hotplug) then the whole thing is
>>> trivial;
>>> disable SQ and wait for all outstanding commands to complete.
>>> Then trivially all requests are completed and the issue is resolved.
>>> Even with todays infrastructure.
>>>
>>> And I'm not sure if we can handle surprise CPU hotplug at all, given
>>> all the
>>> possible race conditions.
>>> But then I might be wrong.
>>
>> The kernel would completely fall apart when a CPU would vanish by
>> surprise,
>> i.e. uncontrolled by the kernel. Then the SCSI driver exploding would be
>> the least of our problems.
>>
> Hehe. As I thought.

Hi Hannes,

>
> So, as the user then has to wait for the system to declars 'ready for
> CPU remove', why can't we just disable the SQ and wait for all I/O to
> complete?
> We can make it more fine-grained by just waiting on all outstanding I/O
> on that SQ to complete, but waiting for all I/O should be good as an
> initial try.
> With that we wouldn't need to fiddle with driver internals, and could
> make it pretty generic.

I don't fully understand this idea - specifically, at which layer would 
we be waiting for all the IO to complete?

> And we could always add more detailed logic if the driver has the means
> for doing so.
>

Thanks,
John

> Cheers,
>
> Hannes



  reply	other threads:[~2019-02-05 13:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f6f6e031-8b79-439d-c2af-8d3e76f30710@huawei.com>
     [not found] ` <20190129154433.GF15302@localhost.localdomain>
     [not found]   ` <757902fc-a9ea-090b-7853-89944a0ce1b5@huawei.com>
     [not found]     ` <20190129172059.GC17132@localhost.localdomain>
     [not found]       ` <3fe63dab-0791-f476-69c4-9866b70e8520@huawei.com>
     [not found]         ` <alpine.DEB.2.21.1901301338170.5537@nanos.tec.linutronix.de>
2019-01-31 17:48           ` Question on handling managed IRQs when hotplugging CPUs John Garry
2019-02-01 15:56             ` Hannes Reinecke
2019-02-01 21:57               ` Thomas Gleixner
2019-02-04  7:12                 ` Hannes Reinecke
2019-02-05 13:24                   ` John Garry [this message]
2019-02-05 14:52                     ` Keith Busch
2019-02-05 15:09                       ` John Garry
2019-02-05 15:11                         ` Keith Busch
2019-02-05 15:15                         ` Hannes Reinecke
2019-02-05 15:27                           ` John Garry
2019-02-05 18:23                         ` Christoph Hellwig
2019-02-06  9:21                           ` John Garry
2019-02-06 13:34                             ` Benjamin Block
2019-02-05 15:10                       ` Hannes Reinecke
2019-02-05 15:16                         ` Keith Busch

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=42d149c5-0380-c357-8811-81015159ac04@huawei.com \
    --to=john.garry@huawei.com \
    --cc=axboe@kernel.dk \
    --cc=hare@suse.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=marc.zyngier@arm.com \
    --cc=mpe@ellerman.id.au \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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).