Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1845199rdf; Sun, 5 Nov 2023 17:16:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IGTPt9BAUfGUGj9/DbngXQxEJfLjb10OFH8VfBlXWHmemvesVV30GBJCHxGNJLG/Yp8+W7y X-Received: by 2002:a05:6a21:3e02:b0:180:d33d:9256 with SMTP id bk2-20020a056a213e0200b00180d33d9256mr16838052pzc.58.1699233370105; Sun, 05 Nov 2023 17:16:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699233370; cv=none; d=google.com; s=arc-20160816; b=TqF/vf3A/PMNAQNSYIAOzWgmtpYeqZzluYwyhNQch4JWBsdAvsO+WKTYfZpWtNWtmK 084HusVBDW0HmzHZFeV13I+cvEk3+TJ7EjJGeA2aIm5iqSd4k+dItBKmq3qseSFoOUN0 4+H+oeQJqRhc33NMsywJZA3HYXgRkD2QrrIjihjAntuKe5lFy+aN89aCJ+o3sKR177BL wSLzwAW5Z3nXT2vVzowdArUd45j8rPDq1upKnbt9fMZyZ/M//mEJhGC2aVqKY4banvUs 3Tj/82yekdKU4qimuYItUXCRFaQ06Uf8aXZZAo32LqxkPYjPowQmoY0eOVr4cCsNrYkX /dJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=I1DllSt6fTArQRMX3GewORWveJZhIv9vhXbNXa37doI=; fh=hLWGDtMeQFGcxHaOIH5pmA28ouCbVQeWEGyVG40Qqq4=; b=nygPQi3XO+T6W3ZRTW7GEOG3jEdEDCb++/RL3vFfX3zdgZHUFkHKBu2afZ4lE+G+9j L/h7kstQa4P7qI01/WLuFJPgz13FrxHWDesH08mI9UMzkb9lwTXeiijFSWHb1aVAysbS lTVg4TzRiumgPISAc84WfNqrOpdqMvIONCoZjHfDZ8VLVK4WvhUXsmnYfjUJGzZ41jtf tNkzXUdxnKvT3dkMpfywzwhiCDRGHVoELgOCcW3ciVX2+3trTitSuWVweIZra1/w0SMP wkBhKptfNGQVbGlMpduNPYll1VHlJocCAXedaS9APtNZroS7xmIzV0u41dkgIfm/x24Q LJrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CpMcV5oT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id u17-20020a17090abb1100b002773363d105si6967541pjr.188.2023.11.05.17.16.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 17:16:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CpMcV5oT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8B00680309C7; Sun, 5 Nov 2023 17:16:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230022AbjKFBQI (ORCPT + 99 others); Sun, 5 Nov 2023 20:16:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229485AbjKFBQG (ORCPT ); Sun, 5 Nov 2023 20:16:06 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EE71FA for ; Sun, 5 Nov 2023 17:15:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699233314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=I1DllSt6fTArQRMX3GewORWveJZhIv9vhXbNXa37doI=; b=CpMcV5oTvMoJd8CiUjsbz1FHViFiZ8TAevJfjd9zqWf32Mmtj17HGW01/B+KaZrWk4OxrI QTrEHRVwPX70i9nxHMGO/VXq0y/78wG9bZHuDzclhdsA3x2fiIwzY62t6MYnP1tSz+9I7K BaA6HNrZ6CyPvL6oucQobBvDiJsnjjg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-583-FAXzbPVoOsqT7G56Up_RQw-1; Sun, 05 Nov 2023 20:15:08 -0500 X-MC-Unique: FAXzbPVoOsqT7G56Up_RQw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EF626811E7D; Mon, 6 Nov 2023 01:15:07 +0000 (UTC) Received: from fedora (unknown [10.72.120.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 430E5492BE7; Mon, 6 Nov 2023 01:15:01 +0000 (UTC) Date: Mon, 6 Nov 2023 09:14:57 +0800 From: Ming Lei To: Jens Axboe Cc: linux-block@vger.kernel.org, Tejun Heo , linux-kernel@vger.kernel.org, Juri Lelli , Andrew Theurer , Joe Mario , Sebastian Jug , Frederic Weisbecker , Bart Van Assche , ming.lei@redhat.com Subject: Re: [PATCH V3] blk-mq: don't schedule block kworker on isolated CPUs Message-ID: References: <20231025025737.358756-1-ming.lei@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231025025737.358756-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 05 Nov 2023 17:16:08 -0800 (PST) On Wed, Oct 25, 2023 at 10:57:37AM +0800, Ming Lei wrote: > Kernel parameter of `isolcpus=` or 'nohz_full=' are used for isolating CPUs > for specific task, and user often won't want block IO to disturb these CPUs, > also long IO latency may be caused if blk-mq kworker is scheduled on these > isolated CPUs. > > Kernel workqueue only respects this limit for WQ_UNBOUND, for bound wq, > the responsibility should be on wq user. > > So don't not run block kworker on isolated CPUs by ruling out isolated CPUs > from hctx->cpumask. Meantime in cpuhp handler, use queue map to check if > all CPUs in this hw queue are offline, this way can avoid any cost in fast > IO code path. > > Cc: Juri Lelli > Cc: Andrew Theurer > Cc: Joe Mario > Cc: Sebastian Jug > Cc: Frederic Weisbecker > Cc: Bart Van Assche > Signed-off-by: Ming Lei > --- > > V3: > - avoid to check invalid cpu as reported by Bart > - take current cpu(to be offline, not done yet) into account > - simplify blk_mq_hctx_has_online_cpu() Hello Jens and Guys, Ping... thanks, Ming