Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2771436rda; Wed, 25 Oct 2023 11:48:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF8TDHK83pQCXzb3Ek30RYvjjGG5BN9BV8hKTpIZm7vajboPp2jR1FHWbRw4oGRZd7Ta9QE X-Received: by 2002:a0d:cbc6:0:b0:5a8:6397:5bdb with SMTP id n189-20020a0dcbc6000000b005a863975bdbmr16983100ywd.3.1698259687065; Wed, 25 Oct 2023 11:48:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698259687; cv=none; d=google.com; s=arc-20160816; b=s6Ysal3CLjRA0SW1GNr2Wgs+ZZ6AqHMlsVhxSyKLJl3QfeuffX4FWCurQchH+hq/mQ /0wgq9Ac/tHPCyaFvM5SKCJjWUf4HFVP8SEb1zBKrqSbJ0MzAlq4DSMiFZZaw9UAOvbp QnbsWaEpKeQOMouqGUcSDxiDD4VW4v6vBVrXWOoHOICdpW2dCAE1pgvbPGNSDSo7h/Kd P89BFMkjPfvVueolUw9IelenXxY9Vk6ALOKVL5x1dSWKcHdSAR6GoxPFijy/+cF0mVBJ uHeOq4iAoAYxRHkpzCBNEd9ENWU0j1+txUSkKJ1fViJTYRC2PydkqTyG0kATIiXLW30I UkDA== 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:dkim-signature; bh=DUDjItQQjo3UPdZDmLpNvYnFjQ8bZdicYhlR0NUWUUk=; fh=qHj29L2A5mwzu/PF4m4XcxAWuokRE3PlYhTqb6/cyNs=; b=NaUzxryv00TsWCAppVmkUkBsVFLykSqRVDRp7ysVYkuKEK/izfKx3YtOC6QKZrpCai yzQ2/kCNw57pzeVIcrY0hA/eFiuagv83yzSkcUtQvT01GCpxk2II+lv0CXTAHzbCO6RZ ce3Pgx37MVBZVyxx+NNZOmKpXge8yrxmDnwzbtJFyMUMzrMsiBZeVfdq++Run0CevscV QCF4Yvw/lxUJL4oGKQXSa1A5Y/8+o86fFB6Z7aVSq+el3nd4QDKWAyxZiTDrGwZvxejX EtQujuJN/Vt338R5leKR/RGHcGtDIDG7CRUuiLZ5cHNEWykgcm5+EyUHPoj7XWCdfUZV AOnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Y5/yaC5m"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id x72-20020a81a04b000000b005a4d69af753si11848775ywg.328.2023.10.25.11.48.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 11:48:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Y5/yaC5m"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 426A68023924; Wed, 25 Oct 2023 11:48:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229695AbjJYSr4 (ORCPT + 99 others); Wed, 25 Oct 2023 14:47:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbjJYSrz (ORCPT ); Wed, 25 Oct 2023 14:47:55 -0400 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 D0B9F129 for ; Wed, 25 Oct 2023 11:47:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698259625; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DUDjItQQjo3UPdZDmLpNvYnFjQ8bZdicYhlR0NUWUUk=; b=Y5/yaC5mWWjjCv8feehckytTQ520PTGrFkSS8TvbtdB09gJA1bbdIidsJbAPiL5Ut+77cA lABBzwi2U7FdOk4c3XWHkJNsR7VHuIRi3DnijmpQNrZxN8D262K/7vl0HEJY41gFRWHE6S L5pHYpcqTCtkop1cKeiW1++vlNk3xoo= 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-661-9dhxosdYO52Lgzigwoc7CQ-1; Wed, 25 Oct 2023 14:47:02 -0400 X-MC-Unique: 9dhxosdYO52Lgzigwoc7CQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (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 78598811E91; Wed, 25 Oct 2023 18:47:01 +0000 (UTC) Received: from [10.22.32.140] (unknown [10.22.32.140]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0B173492BFA; Wed, 25 Oct 2023 18:47:01 +0000 (UTC) Message-ID: <25bebe6f-9ff4-ed75-0041-2c6207c7d6f9@redhat.com> Date: Wed, 25 Oct 2023 14:47:00 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH-cgroup 1/4] workqueue: Add workqueue_unbound_exclude_cpumask() to exclude CPUs from wq_unbound_cpumask Content-Language: en-US To: Tejun Heo Cc: Zefan Li , Johannes Weiner , Jonathan Corbet , Lai Jiangshan , Shuah Khan , cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org References: <20231013181122.3518610-1-longman@redhat.com> <20231013181122.3518610-2-longman@redhat.com> <4e9cc6e3-7582-64af-76d7-6f9f72779146@redhat.com> From: Waiman Long In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Spam-Status: No, score=-4.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email 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 (howler.vger.email [0.0.0.0]); Wed, 25 Oct 2023 11:48:04 -0700 (PDT) On 10/23/23 23:28, Tejun Heo wrote: > Hello, > > On Wed, Oct 18, 2023 at 03:18:52PM -0400, Waiman Long wrote: >> I have a second thought after taking a further look at that. First of all, >> cpuset_allowed_mask isn't relevant here and the mask can certainly contain >> offline CPUs. So cpu_possible_mask is the proper fallback. >> >> With the current patch, wq_user_unbound_cpumask is set up initially as >> (HK_TYPE_WQ ∩ HK_TYPE_DOMAIN) house keeping mask and rewritten by any >> subsequent write to workqueue/cpumask sysfs file. So using > The current behavior is not something which is carefully planned. It's more > accidental than anything. If we can come up with a more intutive and > consistent behavior, that should be fine. > >> wq_user_unbound_cpumask has the implied precedence of user-sysfs written >> mask, command line isolcpus or nohz_full option mask and cpu_possible_mask. >> I think just fall back to wq_user_unbound_cpumask if the operation fails >> should be enough. > But yeah, that sounds acceptable. I have implemented the fallback to the user requested cpumask in the failure case. Cheers, Longman