Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp446648pxu; Fri, 11 Dec 2020 06:15:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxUS196gmGPfue0lQZj9n7pETAM0Tw0J0EQDqbzGtu3fwl9bPLmYg9qQRWiIHroB3GGrFQX X-Received: by 2002:a17:906:a4b:: with SMTP id x11mr10986797ejf.11.1607696106656; Fri, 11 Dec 2020 06:15:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607696106; cv=none; d=google.com; s=arc-20160816; b=ukJNlNmgLC7G9bjrgk3noEjlC/YBm9O7CZ21NX7kKMW2vkTo4/1kZm+Ojd/oZVcHlR h+gg6lin3QQo1LMsKTSaWyGAqIHHb0ykpaCeqV/SLhRLP1dW/EG/PMk+VMnVpOGWkN5Q H8HEFvT0szMaiM6Jgj+CEENn0+KsWUGpSm23+rW9wD+0MByxDIOxAW19kQcBWVseL+J3 FOv4/bWmcbwmefS2cyCupMSMt1yEmdQi8Y/Hkx9RtMg98NweGDGM3ecHNi5e+dPfmURH TwifrfauPjpANk2oVc6lbod+7sZHJZu89EmodUu7tZ5lefCT3ZtcDUTpPxY3iaJQCY9Q sfAw== 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=AtrqjaBhwhhm+g6TOXOtlBu/O/X4VKdXfAX1UBzn9+4=; b=FWiQYfVYY7QtSN6C1a1LQwOMYeUL5Oi5lqzIr1JKw53uthw0HASfLZNRYgT6Qwy5FB m29GSJJXQ6AqyCR8DynWR1QJr9gbSq2sVjzb3V0WrxJzUECZP71C3IogMDwwd6SK6tdp mQMAm+ystIBF9zWV+jq5AeHBBeQPUjIM64NO11W1I1cQeFkTwkbMM4MfnXKee1Lw0B+F vzaqNYnbffkxWAKLz04gj4Aj2wEXBlfCHTSIvuxX3+cdma5/Jchln569oKCEw5kfzqI4 /z7I2oqlCrnIdQSF9wY/Uf+dEXmtn+SDrq2XKkNOzRQJncM3a99XI9QeVUmHmxq+5VIY 0aLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=r42Qrr0g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si4355867ejp.536.2020.12.11.06.14.43; Fri, 11 Dec 2020 06:15:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=r42Qrr0g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405947AbgLKMw3 (ORCPT + 99 others); Fri, 11 Dec 2020 07:52:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406012AbgLKMwA (ORCPT ); Fri, 11 Dec 2020 07:52:00 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29F43C0613CF for ; Fri, 11 Dec 2020 04:51:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=AtrqjaBhwhhm+g6TOXOtlBu/O/X4VKdXfAX1UBzn9+4=; b=r42Qrr0gdwEaZUG11FH7PyquBw 181t6QHqYSsF8uQiCJZsKPT6iyz/91GMYs/dHf3SBp3+udnqMU9qa3G5C4cWepM0eCRP9R+Xn8XoH kYHOtodat/J8eItF/ol2AKc2LvRRTMrQ9WGdLyKeaSXBbkHLLasCQcCplOJCRMA/nkeYkTw2+eNOe J4DsXNHXlvSrhiPBW6IDpKRblJcEzlnwl5fkzfWJ3WsfXEGycbwsKRMSHvE3HN7F5NctKocnQfNok Xq8LLry+v4yLD/2OWAXx+89vtAJoyZnskstw9vZXUOGG4sAsMr3F03fwT8oZe7ay3fWfuq5EwQqXP Zpw4GDDg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1knht1-0002a4-FW; Fri, 11 Dec 2020 12:51:03 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id DB4923007CD; Fri, 11 Dec 2020 13:51:01 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 9F92C200EC4EA; Fri, 11 Dec 2020 13:51:01 +0100 (CET) Date: Fri, 11 Dec 2020 13:51:01 +0100 From: Peter Zijlstra To: Vincent Donnefort Cc: Valentin Schneider , linux-kernel@vger.kernel.org, Qian Cai , tglx@linutronix.de, mingo@kernel.org, bigeasy@linutronix.de, qais.yousef@arm.com, swood@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, tj@kernel.org, ouwen210@hotmail.com Subject: Re: [PATCH 2/2] workqueue: Fix affinity of kworkers attached during late hotplug Message-ID: <20201211125101.GX2414@hirez.programming.kicks-ass.net> References: <20201210163830.21514-1-valentin.schneider@arm.com> <20201210163830.21514-3-valentin.schneider@arm.com> <20201211113920.GA75974@e120877-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201211113920.GA75974@e120877-lin.cambridge.arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 11, 2020 at 11:39:21AM +0000, Vincent Donnefort wrote: > On Thu, Dec 10, 2020 at 04:38:30PM +0000, Valentin Schneider wrote: > > + if (pool->flags & POOL_DISASSOCIATED) { > > worker->flags |= WORKER_UNBOUND; > > + set_cpus_allowed_ptr(worker->task, cpu_active_mask); > > + } else { > > + /* > > + * set_cpus_allowed_ptr() will fail if the cpumask doesn't have any > > + * online CPUs. It'll be re-applied when any of the CPUs come up. > > + */ > > Does this comment still stand ? IIUC, we should always be in the > POOL_DISASSOCIATED case if the CPU from cpumask is offline. Unless a > pool->attrs->cpumask can have several CPUs. In that case maybe we should check > for the cpu_active_mask here too ? IIUC it can be a numa mask, and would still be valid in that case. > > + set_cpus_allowed_ptr(worker->task, pool->attrs->cpumask); > > + }