Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2021029rda; Tue, 24 Oct 2023 09:53:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFdVAyPzQXJcUWaU5kfVwUJRzrtANlP/VYNuXfGdvFWYkJlKVHDVW6ZpSkYRBLVrKSsOngt X-Received: by 2002:a17:903:434e:b0:1bc:6861:d746 with SMTP id lo14-20020a170903434e00b001bc6861d746mr8240841plb.58.1698166438915; Tue, 24 Oct 2023 09:53:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698166438; cv=none; d=google.com; s=arc-20160816; b=C1TZJW2zIc2QnpFRY+esOoAa5T8uma1FP+VCB44R9A/useXxLuFK7p9RL7L2R2jqeG wLmzYcczQV1/goG1H28Uod9aelfB9aQNzV1On037DvekFlcbgR5KHol5jOh906xDyj7d fcl1w72/8dSzHfTXvwKGfL+Ff+DWr56zlpnhMXIA0jTQimbOXyds4o7ouHR0y0UzlDTg 11wEY08J5pvuszzATPL1q4YZtTC1PazjI3rpYp0h3emC57BBefevKzp7V20D+fDjSwaM h+Ek9sRBVN3VBSJBd1eEK/d4meJm42Acg9foXO0BH1Axllszpy/QB9cMKHi6NIs8hldO e3iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=21+/3OMeV0g7LIWMnvWxRg2TMggNtT9PBLq3wQT7afE=; fh=5N9i4AioUSYmQR+z7ROHaF+SCQJuBt3lKDzICmtlIDk=; b=ssQ03/C1WS59xhYIt6kfVOehKV908H/6BC9q7a/71W1n5mUfZ0sRlJALPhObuWQhel O7NwnIdoqxLJ1xsFiRnkF1sDABX5ABpNSpG0LVStagnqKgcNtDsOkJCjVwoNvvnyDcx2 aGKr7euFWvbhMnr3s5nh7UUEEVLhVCmt3Q2gu+xerGSOsi05Y4QChL10o72BJDxMOyQm u6X8KyGgFVecPLEZrze4wabEaPcS/Nvtw9VcJbE9sXYkVFYZm60JVKKHkRzyUIV8ZXpT BETD9Ll/Fq+cu9R+RGQwZVPGFBOF/FmVVM2+0VcS7pv0zX7QU6CL5YO7t++Ar3Ca2Hew ZYhQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b3-20020a170903228300b001cae5779ed3si4627016plh.493.2023.10.24.09.53.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 09:53:58 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C5C86802A6DB; Tue, 24 Oct 2023 09:53:57 -0700 (PDT) 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 S233233AbjJXQx4 (ORCPT + 99 others); Tue, 24 Oct 2023 12:53:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344029AbjJXQxy (ORCPT ); Tue, 24 Oct 2023 12:53:54 -0400 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FFE79C; Tue, 24 Oct 2023 09:53:53 -0700 (PDT) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1cab2c24ecdso29837455ad.0; Tue, 24 Oct 2023 09:53:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698166432; x=1698771232; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=21+/3OMeV0g7LIWMnvWxRg2TMggNtT9PBLq3wQT7afE=; b=Olou7P6IPvdpTXvr85VQNMjLSMSKY+14A/qRNTxg8DHkbU/iuZSKP9ARJhK6DOQbF/ Ikjp67+cY6y5HxQClSkBeYPm/5YmJ8VW4ofRHu+HmrnQ8Xd9698NKzxHrWUIPM1CliCF SyIwfinW2F70Y7CBKS5edyeHlq4zzlcoPmn9a2DvWArrEujjGAxNP36m0dhyxY58FJZW vtodlypWGMe1qLH5CUGhvOZladPzZl7dySlygmUEf3R3P7ECs66qTywnSzmeyW1xLdld p7G6lDKqYiVaE2JXpUryS+AbHHpel8GBUUDt3Wp5BXmBGIW8oOycxSbkTAsasKy2iBpZ k07Q== X-Gm-Message-State: AOJu0YxD8uGebbe7GWtVcfoWMt0yOCosmS+aCuyemJdL7i8wMu4g/wbM 9473XIG5/oQNhPflF3cvGzk= X-Received: by 2002:a17:903:41cc:b0:1ca:20a0:7b14 with SMTP id u12-20020a17090341cc00b001ca20a07b14mr12238599ple.55.1698166432470; Tue, 24 Oct 2023 09:53:52 -0700 (PDT) Received: from ?IPV6:2620:15c:211:201:b089:b200:3b6d:bf8? ([2620:15c:211:201:b089:b200:3b6d:bf8]) by smtp.gmail.com with ESMTPSA id jj10-20020a170903048a00b001c60c3f9508sm7668047plb.230.2023.10.24.09.53.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Oct 2023 09:53:51 -0700 (PDT) Message-ID: <293c16d2-f556-4d42-ab06-2e0acf1cc601@acm.org> Date: Tue, 24 Oct 2023 09:53:49 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V2] blk-mq: don't schedule block kworker on isolated CPUs Content-Language: en-US To: Ming Lei , 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 References: <20231013124758.1492796-1-ming.lei@redhat.com> From: Bart Van Assche In-Reply-To: <20231013124758.1492796-1-ming.lei@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no 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]); Tue, 24 Oct 2023 09:53:57 -0700 (PDT) On 10/13/23 05:47, Ming Lei wrote: > @@ -3926,6 +3941,15 @@ static void blk_mq_map_swqueue(struct request_queue *q) > */ > sbitmap_resize(&hctx->ctx_map, hctx->nr_ctx); > > + /* > + * rule out isolated CPUs from hctx->cpumask for avoiding to > + * run wq worker on isolated CPU > + */ > + for_each_cpu(cpu, hctx->cpumask) { > + if (cpu_is_isolated(cpu)) > + cpumask_clear_cpu(cpu, hctx->cpumask); > + } What will happen if this code makes hctx->cpumask empty? Code like blk_mq_first_mapped_cpu() and blk_mq_hctx_next_cpu() assumes that hctx->cpumask is not empty. There may be other code that assumes that hctx->cpumask is not empty. Thanks, Bart.