From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58BF1C001DF for ; Tue, 1 Aug 2023 11:03:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234182AbjHALDw (ORCPT ); Tue, 1 Aug 2023 07:03:52 -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== 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