Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2623814rdd; Fri, 12 Jan 2024 16:18:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZlx2V36WQNWyiF7XP8SowDY/UD4p1Lay/JRkGmgNqRl7sSSpyqUi/p5RVFSbTAKnuwsW3 X-Received: by 2002:a7b:c5cb:0:b0:40e:4921:5038 with SMTP id n11-20020a7bc5cb000000b0040e49215038mr823762wmk.91.1705105094306; Fri, 12 Jan 2024 16:18:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705105094; cv=none; d=google.com; s=arc-20160816; b=gXI4NVVR+mrNQmqun0mMCAeXhfNGyjEPlSk4bZ0fGYyZo1FlJ6QMVfz7k8IYQNRiKu 2djjVvOFvZsStvX4Vgen98eI4T9tV2c13hStoovXXEAfDqb6YXyzhMBnOlCm0p+GTQec S9JVlFSpLmZikHNZONlK/ts7By+5AJfx8CWLeDm5xBAyK3uK0BwNxTfNGXQjPRrjehC+ 5IfvrUjyec+UTvGTMffW4Cqjnp+MgXHHOi8yadOU2bsSBVLaL1aiaLw/4sVDgOU1Leie z+ZgtfEPmogPhx1fPvFIsVH2Q7hVTS2zytDOZ2J6/7WG9Lr0byUKvgxE3a9oucinliQ+ jQzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=WcdqPz1bbjH9uZhuGQcoiXTrvGelHZMyP88Xqr6kyhE=; fh=Nk1oOxj2gLx9TNkCiJhWksxfyIMRhRkxA5iF6e6Yglo=; b=zn0S7VxWD2vb2KnW9LIIhhuU31rXBUv1jfUCD8cdBmANhe8kZbf9wo672kGKLvor4A nJYNk7cvOT+5oZHulXCH4CPvwPKL5jbUPIskgx9bI80OGOOeMsRHbIhVN+h6L7k5fqpl em7Gq993YICz//Y37Kza1A/pXt01hmUWPNgM+scMmCYfCs5Xuf30lAWTwJf/WJfzzANu 0ylm+QIdAnGZXowa5px1e5AAZ+zg+Ch8zig7OMa/XQAYRoI+RKWa4IvNLbS3VA5dZz0/ dajehXFmWXmTI1Vwd4h6CkgXFczbQNHLhW0nsr3Ihs8W/NSbbVm0hSzoaf+36qXgbSbc tEQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="UMs/GMZ0"; spf=pass (google.com: domain of linux-kernel+bounces-25126-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25126-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bd25-20020a056402207900b0055360ef64casi1802408edb.622.2024.01.12.16.18.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 16:18:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25126-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="UMs/GMZ0"; spf=pass (google.com: domain of linux-kernel+bounces-25126-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25126-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id D6C0C1F23525 for ; Sat, 13 Jan 2024 00:18:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6477036D; Sat, 13 Jan 2024 00:18:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UMs/GMZ0" Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58575195 for ; Sat, 13 Jan 2024 00:18:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-5ce10b5ee01so5010162a12.1 for ; Fri, 12 Jan 2024 16:18:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705105084; x=1705709884; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=WcdqPz1bbjH9uZhuGQcoiXTrvGelHZMyP88Xqr6kyhE=; b=UMs/GMZ0M2uvhxlwYzs/vSjqHFOb0ymFEkzm2fs0470rf71ck8EGoeC/wyWa8/sQIb 1NJSlWF8Tx/tUGQdlp4wRQBWxQND6AMPYZF+szDVatvJgzJADHArgz4nhG9tPrpH537/ D31lovG0aA/7H94+LNO+uSoEtwbjkfdwbYUua0b9lYPjoUA+8j8D5nS21reeTSa7WAA2 XBnf4jSEhgQxcgrDg5cMRCx2T84SUAxqBTQUZKeglGbZNMaIepQW1GRjiSCLHyGQmF5b yUwtq4DAtesv6p/fyaSqhBPhriEryL9cM7P8OpFH8t7/k137p9gZkKWdfcn6xGf8O50j UKvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705105084; x=1705709884; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WcdqPz1bbjH9uZhuGQcoiXTrvGelHZMyP88Xqr6kyhE=; b=Qag+2VU8Pf9qIDZj56iVuvL3jGeI2mQ+4p18zyjC0vdmy3Ir2KDh642pjXZwwBy0Sm fSawIUqcCLD7aQn53aOsCV7gUh+kBXc7lhgEBsdU5ITrOSdaX1bewbzxT048mCXB2fuX JJ6DXfgfBE1xkBLgdi9wPmjTmYwvqN8tbHqGKENMPQHVvQKTK4t69/+o2GNdTFuK3DBm MApsJCHiLKpWqMt3ifXZ6U+/n3j/Vc96f5i2YvWM+hZ4Lze4fj6NHEeOivEIiv2R2nZ/ PeaJiPg2vcGWi3VCqzmqK026Z4qr+mmoChYy83sHrzImhycQ5wELMJpwb6CJ4dtYmAQE JBzA== X-Gm-Message-State: AOJu0YzmmauEa9e5WB0gxxZfM4Qa3jOY6U0bmHfc8Sm5ePJxVgrV5Jux wdC1uXjo4qOuOuTKSIdfVFp8MRZkoDI= X-Received: by 2002:a17:90b:612:b0:28c:ee69:c1c6 with SMTP id gb18-20020a17090b061200b0028cee69c1c6mr4600072pjb.41.1705105084428; Fri, 12 Jan 2024 16:18:04 -0800 (PST) Received: from localhost (dhcp-72-253-202-210.hawaiiantel.net. [72.253.202.210]) by smtp.gmail.com with ESMTPSA id sm2-20020a17090b2e4200b0028d134a9223sm7201163pjb.8.2024.01.12.16.18.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 16:18:04 -0800 (PST) Sender: Tejun Heo Date: Fri, 12 Jan 2024 14:18:02 -1000 From: Tejun Heo To: jiangshanlai@gmail.com Cc: linux-kernel@vger.kernel.org, Naohiro.Aota@wdc.com, kernel-team@meta.com Subject: Re: [PATCH 10/10] workqueue: Reimplement ordered workqueue using shared nr_active Message-ID: References: <20231220072529.1036099-1-tj@kernel.org> <20231220072529.1036099-11-tj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231220072529.1036099-11-tj@kernel.org> On Wed, Dec 20, 2023 at 04:24:41PM +0900, Tejun Heo wrote: > Because nr_active used to be tied to pwq, an ordered workqueue had to have a > single pwq to guarantee strict ordering. This led to several contortions to > avoid creating multiple pwqs. > > Now that nr_active can be shared across multiple pwqs, we can simplify > ordered workqueue implementation. All that's necessary is ensuring that a > single wq_node_nr_active is shared across all pwqs, which is achieved by > making wq_node_nr_active() always return wq->node_nr_active[nr_node_ids] for > ordered workqueues. > > The new implementation is simpler and allows ordered workqueues to share > locality aware worker_pools with other unbound workqueues which should > improve execution locality. > > Signed-off-by: Tejun Heo This patch breaks ordered workqueues as the inactive pwq RR logic doesn't follow work item queueing order. I could reproduce severe perf degradations and outright hangs. I'm dropping this patch. Thanks. -- tejun