Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5575023rwb; Tue, 1 Aug 2023 05:04:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlHPMtna/0U0ZpKyGz1bRiTChxfVz5IUc0tKD+2oeWUCXagpASkf9YwGqJfxkjN1T2jwWtAu X-Received: by 2002:a05:6a20:160b:b0:133:bf18:ef7b with SMTP id l11-20020a056a20160b00b00133bf18ef7bmr15532950pzj.24.1690891447750; Tue, 01 Aug 2023 05:04:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690891447; cv=none; d=google.com; s=arc-20160816; b=vTefslQogdC7kE/LibzDJU0BAy6DFVTrhEVPrBqHVMYf79Oi6ZV/M4Gq8ZFcm2+UVZ 8UxgDhMjuphOeW+S+9FyNIW01QRI/Uvq1Fw5lSl401TqPH7hrmSkO5vKIDF6fb7twH58 XUxPf+mE0ewuzvrNHhznncVLoDNw8nNiu2XlLTmUbayJkxjNfNiMcLoIo1ET4FuPpj3a 2XKmm4xJVDGq9XRVivF/ukPw072ndCdm8Y7B6KPXX0O+gWlS7p2g5EuI/YPFJK+n9pxH XfKD2R8+gwwLBJneaKpBDCFXq/eZEY5wsHccR38r85Y1YB1yJMD5hhlQnC4UliOq1TMx QoLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=0p2lcHy8PgEtOR4u7WsNrXaRnvGJyNWITJBSOQepUJY=; fh=GoQ8knWfMznRd0U9mkEpfvHsWLW7vHUSWc7+X/Sm+wA=; b=cpLppXYYSUbTHobty+eD0uQOZOOCKlETiyIsAbAAAPlxc//5uEDRPsB/pA8mpXmWGC 89Bp5B+rqlJ6Z9DypGlel8y7J5f+Txg4CDxcpcNM3md3kqi/wPr9r2vVucwoUxf6FUQa lrIrYCI2KSfFPIuUuaPVIHRiNWprBzDrg/UCkqlOqHMsxwYMKqwScnTuBRpSjr0Ti/b9 vMr0yXoqHJihG7V0uBxmoIKsh03U6QjpfgRDsEUD2Pmp5v9B+V2fR52rRWEqru08R+jE SiPtzCDW2JfwyqkOIlrfDjdmSq3d5ponQWSXBvj1ZTZeabiILK2GwlBbS1v5IaIC1G/8 qrUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fd29-20020a056a002e9d00b006824bcb19b5si4402410pfb.4.2023.08.01.05.03.55; Tue, 01 Aug 2023 05:04:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234164AbjHALDu (ORCPT + 99 others); Tue, 1 Aug 2023 07:03:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234156AbjHALDW (ORCPT ); Tue, 1 Aug 2023 07:03:22 -0400 Received: from sxb1plsmtpa01-12.prod.sxb1.secureserver.net (sxb1plsmtpa01-12.prod.sxb1.secureserver.net [188.121.53.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A83272D79 for ; Tue, 1 Aug 2023 03:57:28 -0700 (PDT) Received: from localhost ([82.27.99.45]) by :SMTPAUTH: with ESMTPA id Qmztq8xXiaXv9Qmzwq8J3c; Tue, 01 Aug 2023 03:53:05 -0700 X-CMAE-Analysis: v=2.4 cv=MIem2uVl c=1 sm=1 tr=0 ts=64c8e412 a=YwMIiW7BGddQzL8MrqPWMg==:117 a=YwMIiW7BGddQzL8MrqPWMg==:17 a=L74XCNnjbeE16fMD_K4A:9 X-SECURESERVER-ACCT: atomlin@atomlin.com From: Aaron Tomlin To: tj@kernel.org Cc: peterz@infradead.org, atomlin@atomlin.com, jiangshanlai@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 0/2] workqueue: Introduce PF_WQ_RESCUE_WORKER Date: Tue, 1 Aug 2023 11:53:01 +0100 Message-Id: <20230801105301.952042-1-atomlin@atomlin.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfEku1gGyOEJmDPlWWnptZeA1+/Jkee3s0tf4F2N0oGVrD8jx4uc+px/jYwDdTDp+bIfn8Bx3Y31yru2Dqdp6uyZjRamynCJBvwHmBFwyEYGXzX91U2Mm VhbvPYP8vb3wzdkrTV6K5ghZ/TqTPOdfmcUmm6iubIS++tiigGRPKhP2Kkg1oNEBUkSHrVJ2FXzDJ5elJwxLd8HaHEzcpKCzzOdRtjAKg3jnACQ8uSP+3LHW 39bKRF/F0wkxLl2dUmHYf2wzaMJ20da3ISC1r8doA6aqFjXsx5/11qPrOVPMTVptSVtPXXC0G3rxGRTU6fW33g== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > You really shouldn't be setting affinities on kworkers manually. There's > no way of knowing which kworker is going to execute which workqueue. > Please use the attributes API and sysfs interface to modify per-workqueue > worker attributes. If that's not sufficient and you need finer grained > control, the right thing to do is using kthread_worker which gives you a > dedicated kthread that you can manipulate as appropriate. Hi Tejun, I completely agree. Each kworker has PF_NO_SETAFFINITY applied anyway. If I understand correctly, only an unbound kworker can have their CPU affinity modified via sysfs. The objective of this series was to easily identify a rescuer kworker from user-mode. Kind regards, -- Aaron Tomlin