Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp5131864ima; Tue, 5 Feb 2019 06:54:32 -0800 (PST) X-Google-Smtp-Source: AHgI3IZtxMfTUBkhlQbSmy1e5Sh0QwNPN+IxTnLXMBjgYZM8bkCQEqvKekB7Zu+KXzmSr0eNejAG X-Received: by 2002:a63:1e17:: with SMTP id e23mr135337pge.130.1549378472594; Tue, 05 Feb 2019 06:54:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549378472; cv=none; d=google.com; s=arc-20160816; b=y66O93+8hO/7tr95hkenxWV1LpnA2EygUvN2017MxNhaYN6JaDnSfPPOUDAywOA57+ NRTabZTIrwIBe07WME5UU48YPYIM111IpZS4geTF2ysAaCabeTYQIeSqM4WY1heVyeEO oPVBpqVmXIef4vy4W/21Gv/BSKsTB6W2l0rxLjWAJ3uX8Hgmk/IQ+sLkHXMPm0oSKWis N7ZU7MQgOxYrjn3NdyaNyAWDP04o5jsznpJFuWrMAWr6Yna/8jd1mSO+I28zEvszjsLP o9s9wrJc0XThhaAIPfFkvnZKUNgAm5w0G9oEgzlL01KDn6+hWE81bBDxIpRlsJ67dXyY SKBA== 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=9oh87e4Sutky0IGAX9PTu5gGNotE7P+367b6NceP6Ow=; b=w/PHmRJtW2R4BDqZ/KOMmiaZeqwg+K7dne6Scf4p8/O5qMpzY2Od2XKpFdShifCoyK p3Gi2ImQVH6fISMnOc2oRAtcDxEbOHNHl/N9ouAJPU3bJNUWiKfXrT+MJv6cGRBFb461 1BNtFmNrU+r/PCqcbB9vfL3ZmWAMCrh0Op+mRB64Dx3JNsic29bojVvA8j9yDSsN0X+F y6QrkVuLQ4jC5UohVDcIweHxORteYxdEOKbGEqI89pirZkqf519wSH4qOCKOghjJitC2 611Aog24dx3ctjqCESnVMtn+aCDw+2+pYFSVYEN9xO9RYdMns155MRbv3C7HeNSifu+G gKXg== 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 p23si3314392plo.7.2019.02.05.06.54.16; Tue, 05 Feb 2019 06:54:32 -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 S1728890AbfBEOxT (ORCPT + 99 others); Tue, 5 Feb 2019 09:53:19 -0500 Received: from mga02.intel.com ([134.134.136.20]:49613 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726098AbfBEOxS (ORCPT ); Tue, 5 Feb 2019 09:53:18 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Feb 2019 06:53:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,564,1539673200"; d="scan'208";a="316492544" Received: from unknown (HELO localhost.localdomain) ([10.232.112.69]) by fmsmga006.fm.intel.com with ESMTP; 05 Feb 2019 06:53:17 -0800 Date: Tue, 5 Feb 2019 07:52:44 -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: <20190205145244.GB28023@localhost.localdomain> References: <20190129154433.GF15302@localhost.localdomain> <757902fc-a9ea-090b-7853-89944a0ce1b5@huawei.com> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42d149c5-0380-c357-8811-81015159ac04@huawei.com> 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 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.