Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6229448rdb; Thu, 14 Dec 2023 11:48:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IGdaFXVOsSq6+jnb8TmyvHutRdcJmvpTkJSUyIVc2zxBmXVawMxPZAeNAYiZaYwrIQ93nOu X-Received: by 2002:a05:6a20:af13:b0:191:60c0:7c04 with SMTP id dr19-20020a056a20af1300b0019160c07c04mr2734881pzb.58.1702583326205; Thu, 14 Dec 2023 11:48:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702583326; cv=none; d=google.com; s=arc-20160816; b=ABqGudaiF7niQpgBSV1ofada+i5mD7TplLHdnaNk4xPKCy5gCOAYFyyT9BSeekTQy6 dw/GujL0wAA8n4kSmVocIPemHqmLd3KS9AMhrNl+uSGaEJOvx5RbCCmDvGa0UROcrnTd DJDuzNpkKQGPN6YEMQfAHEBbMUCfaBv7kcUfGgJblH5kUcALS2uKRvfxEIotTIvy1Y8c liDwO1szI4NKkrRh7hT2j6d/qt/UMxKtzfFiNPJRuEwIpJKUni3hFbLyg/mWM4W2s0HY zXUArSR08W+FRCMmUAmFp2oE4Oq0dIE74ks0HGp1w180Emo8FYCenV03Q5e8DQFzDEh9 C4Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=4qrPBczk1nxet5XoyXxFNY9gkm5lWkc+HoFoBvfRSd8=; fh=og76fjkLdEf9SHPYfs3hJrcMXSvEdFsnNc6whBLuRAE=; b=zz+Mu1cjleQ6n/0Qfk4G+MvlAUwXrIi0eDjGalZjZouV2l+l7a19d+x/0SpPYAgDuY Ti3xbU/0Rz/HvxdDZn/NzZ5ybe0jVNwZFrcFGb4TT3CkBcasv/Cx2V9OsPCJspSbJB1n Ya8B4N6zviP+o+W/vqA7CH3ydYjMpwH1fcGPKBMZnrh13HUm4DO9EdyrZuh7grGk5M8U /6jvE+xXSQjeVNorrcK/hu5KQyIbofd8sGkOYOojdIWm5eolDn75du+i0NmnnQij/eGj 9AjRYyQ77MNO8JerOFCTtb/WtXOcNCHoCnQpx/HWSY04Vhxm7Ip1qysVBGFQsumuz5bF 9JRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=i8UOl1RW; spf=pass (google.com: domain of linux-kernel+bounces-30-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id me17-20020a17090b17d100b0028b26cbb4fesi182055pjb.138.2023.12.14.11.48.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 11:48:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=i8UOl1RW; spf=pass (google.com: domain of linux-kernel+bounces-30-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C086DB219EA for ; Thu, 14 Dec 2023 19:48:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C87D6ABA6; Thu, 14 Dec 2023 19:47:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="i8UOl1RW" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B624A6ABA3 for ; Thu, 14 Dec 2023 19:47:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1d37a6926f7so3816915ad.3 for ; Thu, 14 Dec 2023 11:47:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702583253; x=1703188053; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=4qrPBczk1nxet5XoyXxFNY9gkm5lWkc+HoFoBvfRSd8=; b=i8UOl1RWFnquohnNp84J2fSzILpbzcn9U1OaGGQQGqkrmBopj6sZoWbrOxwT8zStlI D/vYV6qE8tCUBRSsnlWGlkHycUwAzxrv62reoJXEIptVg45w6naqOgXRREVgxtstyB2u 8WPk3Xhyw4NE0lkXTsnsHcryBYGAMdhTXvmekUSqE8AFntJfX5CCNAHXqViWVfFSiB7v hHw8IVz3gMsC8U6MNB9hkxn4+u5GmJE244EGY2r59mSs/q6iVj+tJIAAbRIXxSbs57w4 iiQkeRi1htFbEy56YUbidH7LBc7YzLVhfkahCf31D197/b4MFYfQKCMjL4Y+ny/S7lSG AuUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702583253; x=1703188053; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4qrPBczk1nxet5XoyXxFNY9gkm5lWkc+HoFoBvfRSd8=; b=QC7pM1yLmbmGy24ltGUG67F86y9iYSPlMHuyMDQhW9zPiDYNfCj6M6kPoStP4SCAH5 ZSPuv8BP+fszZac4qps90Gn016RVofanvYGq+D8EHRtWrtRw5/XoaATvBaRfnC6RVfC7 OK88X9p7GTVVshgatZlmfhEgzCj0yN7K9q+yH6b2S13oHMlz0t2LNKHzGC5tyRkvWSHO o/fDWKJwqMk54w+vlgXDbT6zprmHl8Gm8bMMGe3rVYort3AlVTEGS2kuo1EY3koG/kh6 pHNkUqDqFjjjF6ZNjdLlbrtK8N41X0/SLyUaf7mAHRPLeJW24lnRiiWzNGZWqaRPQTjc VzuQ== X-Gm-Message-State: AOJu0YyQou+rqtYJm8SPlNI16FX40qz/m21GmREb6kJj/Z47bENet0QQ O8gO7MwjU4pYK/VZVgXLWUov3T4fBFg= X-Received: by 2002:a17:902:ea05:b0:1cf:9c0b:b3dc with SMTP id s5-20020a170902ea0500b001cf9c0bb3dcmr6971798plg.69.1702583252873; Thu, 14 Dec 2023 11:47:32 -0800 (PST) Received: from localhost (dhcp-72-253-202-210.hawaiiantel.net. [72.253.202.210]) by smtp.gmail.com with ESMTPSA id l5-20020a170903120500b001d349fcb70dsm3887760plh.202.2023.12.14.11.47.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 11:47:32 -0800 (PST) Sender: Tejun Heo Date: Thu, 14 Dec 2023 09:47:31 -1000 From: Tejun Heo To: Juri Lelli Cc: Aaron Tomlin , linux-kernel@vger.kernel.org, jiangshanlai@gmail.com, peterz@infradead.org Subject: Re: [RFC PATCH 0/2] workqueue: Introduce PF_WQ_RESCUE_WORKER Message-ID: References: <20230729135334.566138-1-atomlin@atomlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hello, On Thu, Dec 14, 2023 at 12:25:25PM +0100, Juri Lelli wrote: > > So, we have to use set_cpus_allowed_ptr() but we still don't want to change > > the affinity of a rescuer which is already running a task for a pool. > > But then, even today, a rescuer might keep handling work on a cpu > outside its wq cpumask if the associated wq cpumask change can proceed > w/o waiting for it to finish the iteration? Yeah, that can happen and pool cpumasks naturally being subsets of the wq's cpumask that they're serving, your original approach likely isn't broken either. > BTW, apologies for all the questions, but I'd like to make sure I can > get the implications hopefully right. :) I obviously haven't thought through it very well, so thanks for the questions. So, yeah, I think we actually need to set the rescuer's cpumask when wq's cpumask changes and doing it where you were suggesting should probably work. Thanks. -- tejun