Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5913112rdb; Thu, 14 Dec 2023 03:26:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IG06ct8RngJR3EGhlDm5kb8FjavwNReVmQnqlB593QZlxqlI6wyDItGLh5phN2g6wBu6kbj X-Received: by 2002:a17:903:1249:b0:1d3:2a94:cb45 with SMTP id u9-20020a170903124900b001d32a94cb45mr7403239plh.29.1702553159936; Thu, 14 Dec 2023 03:25:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702553159; cv=none; d=google.com; s=arc-20160816; b=cfgxlJ6/hdvd0hirHM5GfFZ5pw4cGSQ7AIFVwoCzv94RzYmJau7SVVab4pIsKQxyX3 sfR0ZAgN0ZF9IbVgnvz66ebuZC01UucUAVQAeCWPV7ldPf8WLJxYWzxIwsI1ncjIp7KX xXNUf/wFUCkFJMQRKnNdZyCKpiesEmvhN0RT4WbFIgs21HmO6hsBwVMJVNQntoSjk+y1 nS2XS9UqaRpQMYFJ8iiDRHzqqqyt9/KguDLpm5AWtN7Jkscu+WBzpqAX8gX3ZKTnbogM ONPBzGpt1qDXRbli1+W+17A4v/a3CvHBjEYPTaEVZLXxExMrpbQtWljLIEHGPES6OBdi 79Ow== 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=9WOSGNm88GlKvElNEORSdf+9gAs7IEiznRYRNcmrsWY=; fh=1CqPlySqPiCaeSrZ0glMCByHtsyOrAfvOKmHKyPOlJU=; b=WUvOOtOaLJuJO1dJxXL1+n34kTm96UMtJnZKReI9nDj5nAZUNezfauzFuGXBtw51p7 q6af0EIKxXlN4Va5L2MN7AlKUzuvR26yw0WXjrvpbcJW3zzABZElEo+s4uPKAPdJN2gU 6JXcEq3eorpfXdVgA8WskB9LXnoCKH6gy0Jm93/zmU7fFA9kjSAnY2ymkPWXgcTJK9CJ d9YC6zenL+hUy+/dJW68F0h3ZKR6EmrFEu4jPsdmFFBwp4Fb6bY3nTnF6bkp9j6/CuxH 2sw1+FCiWTYl0ee7Y3qdoQFJzPzxXCzneP4pUGN/4q8xI5455uOl+e9hPIwxjHkkl6ud /scw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B1uuKvVy; 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 t15-20020a6564cf000000b005be09b723b7si10915390pgv.636.2023.12.14.03.25.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 03:25:59 -0800 (PST) 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=B1uuKvVy; 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 558F182CBA6A; Thu, 14 Dec 2023 03:25:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443820AbjLNLZ1 (ORCPT + 99 others); Thu, 14 Dec 2023 06:25:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443635AbjLNLZZ (ORCPT ); Thu, 14 Dec 2023 06:25:25 -0500 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 4F747B7 for ; Thu, 14 Dec 2023 03:25:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702553131; 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=9WOSGNm88GlKvElNEORSdf+9gAs7IEiznRYRNcmrsWY=; b=B1uuKvVyLThAMStXd9E0EKLcaQN9YoiXjIJ48bdI29fybnLTAg831DNDxhd/J+SsYEvkO1 Ub8yQTZn1Dy0V1umsXvaQKJ+AJLSuw01k+zBgMOvuXQz4JLS7Gz46/izBWdbHKgA5Xahn2 cL0KNG4x7kIliY+siDl/Qf0hfTuTO7g= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-631-wvmlC2tCO3KLNYTxdLTTiA-1; Thu, 14 Dec 2023 06:25:29 -0500 X-MC-Unique: wvmlC2tCO3KLNYTxdLTTiA-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-40c41b91a1fso35735725e9.0 for ; Thu, 14 Dec 2023 03:25:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702553128; x=1703157928; 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=9WOSGNm88GlKvElNEORSdf+9gAs7IEiznRYRNcmrsWY=; b=q82ZywGU/K7aYo0fJTz1MV3GWnkoayDa9CjNSST0WdJ/px5A2SiQKNZheS1G+tomcI /qm+Yy1266ulVMdC5rT+81wGkAnSyYZvm/Vky+P6mr3TpJbzhQ0ZLzjdZWivWEbEvJ1Z FvV4cm8ScWKLP2HLQFRxiUs9Xo1sTpnGh9Hg57/hxmvAcBA3JPayD0Qck4LMwY8uJnIP ZOMeWiqqTKxjbhfk68osHlwLZkQQGHP66hmeyT6FvGML7Qwu7+2Y6wYxku6uI/3XniUZ yErDBvvxswT+C2A4EYEcXp6G1VVG3s6EoItZNfY+sTBoHwlq11Urwi1kkeovvnPe31Ty oLQg== X-Gm-Message-State: AOJu0YycW+lmibfkaxjnpi7l5pCDbbcolOfHgcAappEqGTMWPQiwwndW rrKTxhmTrm/I7SP/jcwaxmaImXlnBnnGBsNzrlDzosg03UClMfEoHigMcbHk2+CJ2v2gO9BgwXh QuDTlA8gmspNe8SUWD3obhQD3 X-Received: by 2002:a05:600c:829:b0:40b:5e21:c5aa with SMTP id k41-20020a05600c082900b0040b5e21c5aamr3285703wmp.120.1702553128702; Thu, 14 Dec 2023 03:25:28 -0800 (PST) X-Received: by 2002:a05:600c:829:b0:40b:5e21:c5aa with SMTP id k41-20020a05600c082900b0040b5e21c5aamr3285701wmp.120.1702553128342; Thu, 14 Dec 2023 03:25:28 -0800 (PST) Received: from localhost.localdomain ([151.29.78.8]) by smtp.gmail.com with ESMTPSA id h12-20020a05600c314c00b0040c45cabc34sm15878122wmo.17.2023.12.14.03.25.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 03:25:27 -0800 (PST) Date: Thu, 14 Dec 2023 12:25:25 +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: <20230729135334.566138-1-atomlin@atomlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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]); Thu, 14 Dec 2023 03:25:42 -0800 (PST) On 13/12/23 08:38, Tejun Heo wrote: > On Wed, Dec 13, 2023 at 07:32:10PM +0100, Juri Lelli wrote: > > > Maybe the easiest way to do this is making rescuer_thread() restore the wq's > > > cpumask right before going to sleep, and making apply_wqattrs_commit() just > > > wake up the rescuer. > > > > Hummm, don't think we can call that either while the rescuer is actually > > running. Maybe we can simply s/kthread_bind_mask/set_cpus_allowed_ptr/ > > in the above? > > 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? BTW, apologies for all the questions, but I'd like to make sure I can get the implications hopefully right. :) Thanks, Juri