Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6487619rdb; Thu, 14 Dec 2023 22:51:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IHEFW1N5sks4v2F8O2mLhXr+C/4y8zl+ZCLSAv1ikve92elT8CLBo+ceYZDAdlSiJHtCk4W X-Received: by 2002:a17:906:1909:b0:a19:a1ba:8cc0 with SMTP id a9-20020a170906190900b00a19a1ba8cc0mr5151023eje.94.1702623102195; Thu, 14 Dec 2023 22:51:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702623102; cv=none; d=google.com; s=arc-20160816; b=G6J0gCPpXWqXwVGZ3JgYgFdI/On+AqSs10Q6xOyS+tywbeEIjjPcHmaU5mPlpy8xc1 5lIwZA0nhkx/ntEf6v+bJpx6HUzBUv/8xfw2s4odKHmQeygVaw4/Uw9ex3voTZrW/rpS hSAGt3NgQXkUycd9vqPGCeuGQJfP63RhuSGMLAx8JFrsHRmTVmcKXNkBLfxMZfBHWXRR buDeILTqq6emXc494bHjdqwTexLLA5PdB/8ro0HF5tveZxe/pBQErk6QxWMuy3vG9aic 9AznkqNEWHjwaOPZDn7cECMfBXNgF3HZ+BdJSZwBODjBaypPUdT3gT81wQs3Od20uKg7 OE3w== 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:dkim-signature; bh=gC1JfTqJ9MdUe1APXMHHq5zDpWh9AyaHnyrlMTWegK8=; fh=1CqPlySqPiCaeSrZ0glMCByHtsyOrAfvOKmHKyPOlJU=; b=q/KXuBZMpxS5mdmabWTXrxVUgD3jw2zWBwEysw+J99B6JRxw062IepYBRxvhFoQ0bH JK7Ctqvj4hf8wDE7e9QGHVC7aQGv8rvKL/NxPgxWhCtJsVpckcoTY+bseRCf+/ri2g67 DkM6fdxSzDwi2KTNWP6Q5n8uk+gAvx6EEaKnaXOU/2FOm7O8/+eTdOE+3NTitb56ePxY avr3g/IAVO35XPkYnPJIHPFdsGemW6T4CyS6+pV4Rpk1QFqJYyQX+XAcz6UfWxTdCBZa wp3xsqT67W0CXIZcjkgpjSaWJ2SjS9oFwo9HHCDF8DLJlZuaKb05KN4+SI7FkJt0LS+h lkAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XqoU46jL; spf=pass (google.com: domain of linux-kernel+bounces-499-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-499-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h10-20020a17090619ca00b00a186e4dc45dsi7225592ejd.191.2023.12.14.22.51.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 22:51:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-499-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XqoU46jL; spf=pass (google.com: domain of linux-kernel+bounces-499-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-499-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id F041C1F21B59 for ; Fri, 15 Dec 2023 06:51:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1C92110A1A; Fri, 15 Dec 2023 06:50:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XqoU46jL" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DDF5C10973 for ; Fri, 15 Dec 2023 06:50:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702623055; 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=gC1JfTqJ9MdUe1APXMHHq5zDpWh9AyaHnyrlMTWegK8=; b=XqoU46jL1Bh3WtccXXgH6rvYZRpoLu0bjfk8IM6ElRfGcPNNwdCUmCxn77SUg4k4n+Dh3x hYswT7fxTuQEKADEc98Oht1FFxH8WRkaWH0AfE3TDB2UHY/+5q4qX7bwjN/MmM32gaEmkJ qTr4Tb+Y/7v6AzNWiXUKn0z/e1Ln0+g= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-206-qAK8QrfwP62FmMy7sYAxog-1; Fri, 15 Dec 2023 01:50:54 -0500 X-MC-Unique: qAK8QrfwP62FmMy7sYAxog-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-67ee87ff6bfso4080336d6.3 for ; Thu, 14 Dec 2023 22:50:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702623052; x=1703227852; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=gC1JfTqJ9MdUe1APXMHHq5zDpWh9AyaHnyrlMTWegK8=; b=wJRm1ebLriy4eQYtpQy4vf05auCatoXsswvBCu2iwm6PGFO0MsmZouNpmeVTphjgtX Eg2gLZVx0inYEkJGwTbPbELMB6O7ECbQE0zcUJuUYzpC9hzsA2xq8qY9eiP+aSMVQMnd QxNb6i9yDp9nRUB76BqexaX06jfNLkML6nzaEQaQiX91pTltVu8CSzAAdHjMUGLrqG53 7x1kCMzN5lE/A3QmSrfN47f6XGl9ujMBkrold3bR/Bp1ABQ1q4ahZtuymvfdMPUOr/Kz T2oYoXIhB+TeO7p6FXpWV+tBLuSt3eHF/arwzTzyYAZVmuXr/63Kcyb2zPu2tdN4Bcfx xdFQ== X-Gm-Message-State: AOJu0YxzF7X23flb0prAzzVm+x8cJtJq6hUUBN7/6wzxK/iZ9nWeLbFu /mRr/wypK8AgfIaxdqngKhiS9PKqYIjYp3x6lccNSfv+o6i+yVVaPvIzGZ/ZtLaUUYRHkSORfd0 WKRLBGo8c1QaNNMuFXeclk58sX0q7SWfn X-Received: by 2002:a05:620a:3915:b0:77d:8f07:d3da with SMTP id qr21-20020a05620a391500b0077d8f07d3damr10429259qkn.40.1702623052599; Thu, 14 Dec 2023 22:50:52 -0800 (PST) X-Received: by 2002:a05:620a:3915:b0:77d:8f07:d3da with SMTP id qr21-20020a05620a391500b0077d8f07d3damr10429254qkn.40.1702623052330; Thu, 14 Dec 2023 22:50:52 -0800 (PST) Received: from localhost.localdomain ([151.29.78.8]) by smtp.gmail.com with ESMTPSA id b19-20020a05620a271300b0077d7eaefc08sm5876283qkp.87.2023.12.14.22.50.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 22:50:51 -0800 (PST) Date: Fri, 15 Dec 2023 07:50:46 +0100 From: Juri Lelli To: Tejun Heo 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: 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: On 14/12/23 09:47, Tejun Heo wrote: > 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. OK. Going to send a proper patch asap. Thanks! Juri