Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1196095rdb; Tue, 30 Jan 2024 10:34:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IHC6e7hx6sEsWRaFZvouF4DM4aw1+B9/WtkGh+lpGTG21Ps4uykMW6NQEX80gmys2zRxkei X-Received: by 2002:a05:6359:459c:b0:176:25ea:ab3 with SMTP id no28-20020a056359459c00b0017625ea0ab3mr6742960rwb.51.1706639654462; Tue, 30 Jan 2024 10:34:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706639654; cv=pass; d=google.com; s=arc-20160816; b=0Cz0NFfZuGpLVaEuK/DGMoiHFvv2dsJm7Ovycnvc4TcLlU91AHLWe5jESLtz+5Snel 2Rih890VXwi6NwQyaBoTFJswXoT6yTs2yk7uiFK3P+ntZ77kSzvoGg4MVjMInhvsAMUb P4snx3PLx+GSxW1hDwmJKGCPTAYZ8Gd/ZsV6hNl0AX5AvCFm2ytu/QluqPfbYrq6brQ0 rOCRPPLsq+25I2anuCUM+18nhC6G4Bo4tEXOpWZ8ng+vWNc2t8UOSdd775drTLFZTk9e 3O2kBo/eCpJmmnTSuj4zKc0WW2/GZv6dGAj6Zv6aqKEN9KDS+m2rTsUN70VVIn8SCcy/ FX5w== ARC-Message-Signature: i=2; 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=0Ij0fUh99sNPGQIuhuaIyYnTfjT0QFXCH+1kvsJ6p4E=; fh=lt2js4+oSVfpbDjw8gm9/JJoU0YKcT6Mty9go3Ytfy0=; b=arrlnqVicRyd0n3f87TaRkdytMuCHoSRvAoOEXLBu+cjqfkAnB4EruyqF32hKFFRV4 c1LlZbU10Ft1/BBYA1kqj2xeipKcVapJbqaCANgh1NOIbWvZNzQV7YFDk2nTpn0ugB05 sPRXp67492ledXYtyP12fbElBQ/fGyA+Dc0QWjH6BQ95nkV9YT0/hYgAx9Oa4/Ub2HvK M8dr9XCcW3QjaP1mHSA+4OKYxS8K1gU3oWvluglkREG5oPy+moychnT3S4bEywSe4wdy 1O3hTAJE0C/834Tab5qrqZNWm8tH9J70tL3bVaIhQSRGNGAGGJz45fGqvnYfj94dClgh WFnQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=btSLtLni; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-45113-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45113-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p22-20020a63e656000000b005d8e1dc1df6si1766367pgj.731.2024.01.30.10.34.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 10:34:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45113-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=btSLtLni; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-45113-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45113-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 18DF1286EDB for ; Tue, 30 Jan 2024 18:34:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 76A52762EC; Tue, 30 Jan 2024 18:34:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="btSLtLni" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 1FE97762C7 for ; Tue, 30 Jan 2024 18:34:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706639642; cv=none; b=fkyBKsGt918SjjkpBMlBk4JD1v9I13oLYmQbRjUZZpsR8o5EL5ePMx6LuNwr3KRF7rV0N/4bR4FE5tFE3KNfoUexFUlxgN4XA7Ng+EaD8jpr3oS6FTtq91Yeil7b46BUwCz2CDdRXXt7Dp/g7YRbLgJ0SPBLRfhQtGtDMF3Q+NE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706639642; c=relaxed/simple; bh=eC7+OI6/+9wto86uJj8ssIpbqkS2aO7JFeCrcZQgCgw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=N8MVIr/xMyHg/MIXmmmSqQC/XeFHdlHstFfV4161UULKz3Gu9oeOTS+NAraQuwD9oKsqKXNCZxf1cYIU3RoA3K1PPTXuwti9UBCBAeZHnbMoaUnn0vvr1NTKuKfR9Zu9X+UAUXaMl+gkkQYUdMWgskiP1+d0SLuzdSF3UEiEvIA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=btSLtLni; arc=none smtp.client-ip=170.10.129.124 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=1706639640; 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=0Ij0fUh99sNPGQIuhuaIyYnTfjT0QFXCH+1kvsJ6p4E=; b=btSLtLninwegMg6AIWGJtY+TAqaHX9qI1ZgNuSNyFvEu1peg1u2cZ+cx4pfw1ixCUBpauR qtwZOkxeH0bjUWFR1Ouj31HUcOQCBN8C/JJtA1dn3JIRg3/3w3DAoQS/0XLrkn06h4Gtql rFBGa7zm9/BNRy0/JWBVnRGEbEn8/OE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-653-e8NJ87b1OLq84HdCPEafQw-1; Tue, 30 Jan 2024 13:33:56 -0500 X-MC-Unique: e8NJ87b1OLq84HdCPEafQw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1B768881EA5; Tue, 30 Jan 2024 18:33:56 +0000 (UTC) Received: from llong.com (unknown [10.22.8.207]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9E83E40C122E; Tue, 30 Jan 2024 18:33:55 +0000 (UTC) From: Waiman Long To: Tejun Heo , Lai Jiangshan Cc: linux-kernel@vger.kernel.org, Juri Lelli , Cestmir Kalina , Alex Gladkov , Waiman Long Subject: [RFC PATCH 0/3] workqueue: Enable unbound cpumask update on ordered workqueues Date: Tue, 30 Jan 2024 13:33:33 -0500 Message-Id: <20240130183336.511948-1-longman@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 Ordered workqueues does not currently follow changes made to the global unbound cpumask because per-pool workqueue changes may break the ordering guarantee. IOW, a work function in an ordered workqueue may run on a cpuset isolated CPU. This series enables ordered workqueues to follow changes made to the global unbound cpumask by temporaily saving the work items in an internal queue until the old pwq has been properly flushed and to be freed. At that point, those work items, if present, are queued back to the new pwq to be executed. Waiman Long (3): workqueue: Skip __WQ_DESTROYING workqueues when updating global unbound cpumask workqueue: Break out __queue_work_rcu_locked() from __queue_work() workqueue: Enable unbound cpumask update on ordered workqueues kernel/workqueue.c | 217 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 183 insertions(+), 34 deletions(-) -- 2.39.3