Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp553653rdb; Tue, 16 Jan 2024 08:25:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IFOsYzeVskLVLXwSsRdFaIA4HQqyhW993mDKSMsZc18KRKLKVLz8hbdXt6LAYYEemM4HPsm X-Received: by 2002:a05:6a20:d38e:b0:19a:b205:fdb5 with SMTP id iq14-20020a056a20d38e00b0019ab205fdb5mr3223990pzb.65.1705422342495; Tue, 16 Jan 2024 08:25:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705422342; cv=none; d=google.com; s=arc-20160816; b=UZ5aeBIP7jeL/GD4AFTU1rgMShdOFpi287BKZ1MVo3KN3UD1HIliv3asIssPZ9av4b T2vb4nZ5aoe04hjDjOi6DbQ1uPq2bQCUY8pT7xStNNEoCDKHwiacqEnjbLbjKEtlMsji BwXEnnqn1PNbGYN9vXPd+WkvfiImGMCXyIigFM3i+IrwhKSAUVMUgZbnxHqNYKSZ7sNT 8FRaqZ+VwsdgKYrE1qIFvSsCQ0IGco+uAPZy6URruq/6TAy4PgQ5X+ZExYLQR+2kxEwt XFWuyBCwNJxdQ1MruuUAPXJkgPtrXCo/nlpJgE6adSdvxVIfgGESSToHO0YrNQP0tzrY YItg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=VtfdvXRNB17p3c2PDVPPiJ8T0g2/8Q3uhYEDheCyPqA=; fh=Nsf1u1rbcJryyiFo9sS/VsYZC3vmqvYt/oMU7uIxbeo=; b=tPxw10ljKkXpIPmbKMSaPfUuGJMyl2KkZKceOeFVLaiBTRH78cLZ3eztAeOCXCWB4f kRik8ZjpRZ20LMcE2GKrntMhYZCId2Mny/xOUTlF0qzzH15+jWVXt7/IyLc35GE2gyha e/S4+2nRjotVK09oWwFQBl8vMlFwPgpX5+kS9/rtvB74wVHse0uMmO9R1ol8mVegUg3Z o4RWezyTKR4I3uSvo+368MbXKUOooOObbZk/xSutLV7qZMxfTzM38DHx4lRjHht0PQhp JMIQS9OTUn/EuI/FH2CeDbPLsTbQR0090BJYJWsNeKlHKKlrJ07/2lxuWKPSSFsYciMa h7iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LejxPcOi; spf=pass (google.com: domain of linux-kernel+bounces-27565-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27565-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id v22-20020a056a00149600b006daeef3d235si11763025pfu.64.2024.01.16.08.25.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 08:25:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-27565-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LejxPcOi; spf=pass (google.com: domain of linux-kernel+bounces-27565-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27565-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 51FC8286507 for ; Tue, 16 Jan 2024 16:20:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BCD561CA87; Tue, 16 Jan 2024 16:19:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LejxPcOi" 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 8B9A31CA82 for ; Tue, 16 Jan 2024 16:19: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=1705421995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=VtfdvXRNB17p3c2PDVPPiJ8T0g2/8Q3uhYEDheCyPqA=; b=LejxPcOiFzzZ1/2JvUn98cN0TZGZQ8C9tUMe9DaKcs6WRcEbSct8jDdS3a5myH+AfQuC8x 09/BbZhN52mGGz0Pl3Ch2yxv6GOFT5iKUyx+w0YsVRCM17EkVyYuqdwaIWUKZNMVhe5H1v k8upHfMdq2ltRtJualXenYc2o6BUW3o= 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-316-Sjh_dcLCPwCIjArwiTO_Xg-1; Tue, 16 Jan 2024 11:19:53 -0500 X-MC-Unique: Sjh_dcLCPwCIjArwiTO_Xg-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-68158f3b169so54436036d6.0 for ; Tue, 16 Jan 2024 08:19:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705421993; x=1706026793; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VtfdvXRNB17p3c2PDVPPiJ8T0g2/8Q3uhYEDheCyPqA=; b=vta8eqQs0hNd7s+OvBPgdMiAAFeadS5eOvtXOQyNo1NnL/5JLXQFs/4RyiM7aDRbhR tq2fPzLWm5XmzKfTaSQ4ML42DE45xSW+QGvLHf0vGlDga9M8SnSLOW6kAhb7/3rCYkr2 0xc1vZ2XTpTk9YKLaLlwNpGkmKllzpPhwih7ztLOKz8gz0zof4Ch4RKzotBbtPb9QgoV x37dT7No0kZqxQ+0N5GHpgMxosgcUZO0IIptD73LBzF9V8Q5j6GnLyqEHMXcKUTepyRx rlqEj7eGulgobWBV/EYs0QAbI+nM/EcGQSXzTQVtssPfpat93RUrD/snVSZ4a1fx4Y0c 63bQ== X-Gm-Message-State: AOJu0YzVVMj6HtAa9UbAMDYRZ2duLbZqjoBR+iKfu61WJt0zewG5QSOk YCCHdOY5CM5aPzSNoYMC6DJVYAUz9qmoMzyeYVu7MSZN33wYDUIjnb8SepMQGBa2tUm9nhMrrYt UjqPYBjJph5uHkh4R7vRTDMSegJmJVAzj X-Received: by 2002:a05:622a:5ce:b0:429:f4f7:33ee with SMTP id d14-20020a05622a05ce00b00429f4f733eemr3696647qtb.54.1705421993069; Tue, 16 Jan 2024 08:19:53 -0800 (PST) X-Received: by 2002:a05:622a:5ce:b0:429:f4f7:33ee with SMTP id d14-20020a05622a05ce00b00429f4f733eemr3696633qtb.54.1705421992776; Tue, 16 Jan 2024 08:19:52 -0800 (PST) Received: from localhost.localdomain ([151.29.130.8]) by smtp.gmail.com with ESMTPSA id fd10-20020a05622a4d0a00b00429d3257dd6sm3809166qtb.45.2024.01.16.08.19.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 08:19:52 -0800 (PST) From: Juri Lelli To: Tejun Heo Cc: Lai Jiangshan , Aaron Tomlin , Valentin Schneider , Waiman Long , Juri Lelli , linux-kernel@vger.kernel.org Subject: [RFC PATCH 0/4] Fix handling of rescuers affinity Date: Tue, 16 Jan 2024 17:19:25 +0100 Message-ID: <20240116161929.232885-1-juri.lelli@redhat.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hello, Recently I've been pointed at the fact that workqueue rescuers seem not to follow unbound workqueues cpumask changes. This small series is a first stab at possibly fixing what I considered to be different from what I expected (it might very well be the case that my expectations are wrong :). Long story short, it seems to me that we currently have several cases where a change of the general unbound cpumask or a change of the per-workqueue cpumask (for WQ_SYSFS workqueues) is not reflected into the corresponding rescuer affinity (if a rescuer is present). In the following: Patch 01/04 - Adds debug information to wq_dump.py script so that we can more easily check workqueues and rescuers cpumasks 02/04 - Fixes cpumask discrepancies when rescuers are created 03/04 - Streamlines behavior of general unbound vs. WQ_SYSFS cpumask changes 04/04 - Makes sure existing rescuers affinity follows their workqueue cpumask changes Please take a look, I'm all for feedback and better understanding of the details I'm certainly missing. For additional context, a related discussion can be found at https://lore.kernel.org/lkml/um77hym4t6zyypfbhwbaeqxpfdzc657oa7vgowdfah7cuctjak@pexots3mfb24/ Branch for testing available at git@github.com:jlelli/linux.git workqueue/rescuers-cpumask Best, Juri Juri Lelli (4): workqueue: Add rescuers printing to wq_dump.py kernel/workqueue: Bind rescuer to unbound cpumask for WQ_UNBOUND kernel/workqueue: Distinguish between general unbound and WQ_SYSFS cpumask changes kernel/workqueue: Let rescuers follow unbound wq cpumask changes kernel/workqueue.c | 28 +++++++++++++++++++++------- tools/workqueue/wq_dump.py | 29 +++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 7 deletions(-) -- 2.43.0