Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp5154317ima; Tue, 5 Feb 2019 07:12:19 -0800 (PST) X-Google-Smtp-Source: AHgI3IY4Johpaxrs7bMqQrxDVOyLL6JSao9He0LLSF54Jh77cTND8+eDvd1VeIzn4O5UIn7RXDMS X-Received: by 2002:a17:902:7c93:: with SMTP id y19mr5508987pll.41.1549379539921; Tue, 05 Feb 2019 07:12:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549379539; cv=none; d=google.com; s=arc-20160816; b=xKgdR5pUybnoONlB3c6b+yyicd1PZ2Yc9q5PcLUAC4ke7L3T/K1270JoH9wdHJ9veF Ukz6jWLoVzDBuNH9EO46pOZhUj8GjUjFxl5PPgcY1HZcoZ30KXG8axzKcivTb0eOo4mx MkOtSaV4YBm3vYBZqdbuEg8epWMl5a/hqDHblqFZwh0rgZ12RDAeBuYmKl62oSQJm5U+ AXhKtWMsph1fDWqYtAQPIneqj3Zl3nI0IVcLi02HIHTGS1cmr7ggs/hNEPiJ2qy/t6kV urKmK4xM6bOB5N1O69KPVMUUFcwKHjW30feSdKM49YaOiFglt8+10ypIRMjSrO8SfyMk 0LAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=aaB834oEQWTL4Orh/iYAstcsrfMcZniCHNHBnxdVHzw=; b=DsZBIGaanDp+b4EEF+2ILHfXKjUJ06J0/a0IOFAQyZdEVlcoEWRUWejMSQ+Qw4ToGA 4r7Dq8Bd/NWvkXwSAr7H4Cr1DB6/TnAFTP3UHCOm3bFzUa+FQjPOXsW6J7Xl6pEoOlXU eHkkBL5QfpO8FuJjW37F0X7II0nYisJv3USyhrJItjsE9cJyo+iD0lEPgCBbL3AXgScj WhrtoGxlvZROuoD+khQCCQtfCrTAVWC3pm0hVBHORf9EuI7crNlDGLpBnMIF0JXHTMJg 2MlWs1JihO65QSfzHHwUrX6WciXv0DDfJclETptWtTg9++XB0V4vQDa4fdiGkNeilJLE jfZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3si3281730pgq.139.2019.02.05.07.12.04; Tue, 05 Feb 2019 07:12:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729658AbfBEPLz (ORCPT + 99 others); Tue, 5 Feb 2019 10:11:55 -0500 Received: from mga09.intel.com ([134.134.136.24]:25492 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729184AbfBEPLy (ORCPT ); Tue, 5 Feb 2019 10:11:54 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Feb 2019 07:11:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,564,1539673200"; d="scan'208";a="136069744" Received: from unknown (HELO localhost.localdomain) ([10.232.112.69]) by orsmga001.jf.intel.com with ESMTP; 05 Feb 2019 07:11:48 -0800 Date: Tue, 5 Feb 2019 08:11:15 -0700 From: Keith Busch To: John Garry Cc: Hannes Reinecke , Thomas Gleixner , Christoph Hellwig , Marc Zyngier , "axboe@kernel.dk" , Peter Zijlstra , Michael Ellerman , Linuxarm , "linux-kernel@vger.kernel.org" , Hannes Reinecke , "linux-scsi@vger.kernel.org" , "linux-block@vger.kernel.org" Subject: Re: Question on handling managed IRQs when hotplugging CPUs Message-ID: <20190205151115.GC28023@localhost.localdomain> References: <20190129172059.GC17132@localhost.localdomain> <3fe63dab-0791-f476-69c4-9866b70e8520@huawei.com> <86d5028d-44ab-3696-f7fe-828d7655faa9@huawei.com> <745609be-b215-dd2d-c31f-0bd84572f49f@suse.de> <42d149c5-0380-c357-8811-81015159ac04@huawei.com> <20190205145244.GB28023@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 05, 2019 at 03:09:28PM +0000, John Garry wrote: > On 05/02/2019 14:52, Keith Busch wrote: > > On Tue, Feb 05, 2019 at 05:24:11AM -0800, John Garry wrote: > > > On 04/02/2019 07:12, Hannes Reinecke wrote: > > > > > > 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? > > > > Whichever layer dispatched the IO to a CPU specific context should > > be the one to wait for its completion. That should be blk-mq for most > > block drivers. > > For SCSI devices, unfortunately not all IO sent to the HW originates from > blk-mq or any other single entity. Then they'll need to register their own CPU notifiers and handle the ones they dispatched.