Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1441169rdb; Tue, 30 Jan 2024 20:43:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpw/YlMGmjRl+mdc6JCMpb5AJKziE5mQdFXFnrhK5JhvBCW6iyqckrK6c11osyXu/0LD9m X-Received: by 2002:a17:903:444:b0:1d0:98d8:955c with SMTP id iw4-20020a170903044400b001d098d8955cmr421398plb.124.1706676190208; Tue, 30 Jan 2024 20:43:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706676190; cv=pass; d=google.com; s=arc-20160816; b=OAjPq17qDbtJ9UK5lisgppxMFV37JYcf74ve/tOAHeupAdSPcGijcjBiVmH4uvzG6c d/0N1/ALz+bJn1HI/tmYY/wksdhNRyyGtBHr1pEYF0KRV79zZVzfupVgCeImyXEVtLbT 1kZS1mhPAkJ8KSaaTDWLqgmFZf5rF06Qq/DB0WGNxA2f+JaawEgzb7rxe4SnuxT2MZOy B+NEDPp+xlf4MbM+hEVnHDLxxu6qMQT1PkdNRnxdqccJzCnjqt4UgKPPeWBYtrMhXB2P Q2FlTKzjL4l0li3cuZ/CkdsSnYqb2BT/IcOcrBlrIU1FA+98EuJCSVXvlXEPvwaLIjob z5CQ== ARC-Message-Signature: i=2; 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:dkim-signature; bh=/rtT+zioUM3iLxuK1cTRitMg3iHmKU2/uRQu81M/fWE=; fh=fqK0F5iIUGdFSrBEAbho91BMQuL4RI7yrHN/cWFFnG8=; b=VbnRmrIx7LbzS/7VoCaJ4wxZdgx3+HkRM2YUJxVi4pE/RIsbjfqzdYv5466s4Rf3RB 3EBqBpptyDJa0gGyF5DKc5DLJVzTSS3V37486LLKyASwFUeORq8S1HgdOl3qpKjHEEAe UoLVBY6s3PNvrFwrhCPXY+lMQUkXTX+t/LfQW5WIozLXwSsjvNNEH35dq9Hb3rgt4TeD 3Toy2AWMf0CMUiUBDrj8y9JEPPzwXOoYvJoyrcY6xFdI+SC+4aIdJZrPB2O/oppyOTEj raHA92oHMNKFHB7BI13pU5U3e/8x8n7tz1Ha0727kgOMXuglCr4Wpo6Sd8oOq3xfZVd0 t1tA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IBomMRlf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-45747-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45747-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCWXzNScivodfQbR35CODjyuz9x+Rj0IPCfAALYt3x0jR4ASjmmMCyq29B+WnvlU1wW4J5Rr9O/m6+LjZQO/uh89gIuwU4Prrk2KXjgfjg== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id f19-20020a170903105300b001d8fb17a204si3255165plc.351.2024.01.30.20.43.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 20:43:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45747-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IBomMRlf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-45747-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45747-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B203CB24ABB for ; Wed, 31 Jan 2024 04:43:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5985D182C1; Wed, 31 Jan 2024 04:42:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IBomMRlf" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7BCD917BD1 for ; Wed, 31 Jan 2024 04:42:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706676177; cv=none; b=SaFufLCWzMgtGhvkd9oWInRKEI9f43OWPQ1Y2dfkMlTzzEm/5ZUFd4gFYLydGSfZ68etIM0J7SC64JFl1c4aVgYkIhKVVa2148QWmkWHOdRyVNruppwA84msVHzfIpd9/uOBkrYHJbAyUY8k7QN47NHHL87uARdQKiyhN3EUMhg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706676177; c=relaxed/simple; bh=wj/RHLEcO+Eso75EMA5XDjcUsbQTGg2WZ36dJdkuttE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N2c6bvJl/9H900u9InEt3BlOgQaOmOpAU27IXblQqo96SypsuuuQlGQeRuRL56v0dn7jxCKTKa668dqrxzA+dkQ8v9ypIziY+MSo+eB39M47mRIZReugl2RIb/yx/oURlO2/99ZfcQHSM6ZDno/qnq/SKDX5jobuxmaZS4/apmA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IBomMRlf; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C3CCC433F1; Wed, 31 Jan 2024 04:42:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706676177; bh=wj/RHLEcO+Eso75EMA5XDjcUsbQTGg2WZ36dJdkuttE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IBomMRlfRzJuDCtTlwEOL8klHygV+naNXVlOivvS+PfUz83i+EK5ljh1VRKBMZyOD d9Pp6k8cNEswifLc7EPFrk1Be3iqEseGwfrt8C5LmLAGbZz1GvLEvE8iBE0C/vsFGZ nR0P/SAyMcannwWTJknmkSsX1laB1kD5SBe7eAMYuhc3K84ZrC2CHiUYulhAtR1I7d MKP33AAvVUnbIsJMKy32kk95Uii+B3D3IndHzt06JMAJcbH4S29EUXEF24h9dRtqdx qWuRaPgv6Duo76rkcCca6RpS3mfcHS2eBMmJKiH9urWqfAYZ80gT6ssPV86NoWPybu lt3ZCH1ODunHw== Date: Tue, 30 Jan 2024 21:42:54 -0700 From: Nathan Chancellor To: Tejun Heo Cc: Marek Szyprowski , Lai Jiangshan , linux-kernel@vger.kernel.org, Naohiro.Aota@wdc.com, kernel-team@meta.com Subject: Re: [PATCH v4 09/10] workqueue: Implement system-wide nr_active enforcement for unbound workqueues Message-ID: <20240131044254.GA802495@dev-arch.thelio-3990X> References: <20240125170628.2017784-10-tj@kernel.org> <91eacde0-df99-4d5c-a980-91046f66e612@samsung.com> <20240131041205.GA3517117@dev-arch.thelio-3990X> <20240131042031.GA3946229@dev-arch.thelio-3990X> 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: On Tue, Jan 30, 2024 at 06:24:51PM -1000, Tejun Heo wrote: > On Tue, Jan 30, 2024 at 09:20:31PM -0700, Nathan Chancellor wrote: > > On Tue, Jan 30, 2024 at 06:13:02PM -1000, Tejun Heo wrote: > > > On Tue, Jan 30, 2024 at 09:12:05PM -0700, Nathan Chancellor wrote: > > > > Hi Tejun, > > > > > > > > On Tue, Jan 30, 2024 at 06:02:52PM -1000, Tejun Heo wrote: > > > > > Hello, > > > > > > > > > > Thanks for the report. Can you please test whether the following patch fixes > > > > > the problem? > > > > > > > > I just tested this change on top of 5797b1c18919 but it does not appear > > > > to resolve the issue for any of the three configurations that I tested. > > > > > > Bummer. Can you map the faulting address to the source line? > > > > Sure, here is the arm64 stacktrace run through > > scripts/decode_stacktrace.sh, the line numbers correspond to your tree > > at 5797b1c18919. > > Ah, I see. How about the following? > > Thanks. That works for three easy to test configurations that were broken, thanks! Tested-by: Nathan Chancellor > diff --git a/kernel/workqueue.c b/kernel/workqueue.c > index 9221a4c57ae1..31c1373505d8 100644 > --- a/kernel/workqueue.c > +++ b/kernel/workqueue.c > @@ -1510,7 +1510,7 @@ static void wq_update_node_max_active(struct workqueue_struct *wq, int off_cpu) > > lockdep_assert_held(&wq->mutex); > > - if (!cpumask_test_cpu(off_cpu, effective)) > + if (off_cpu >= 0 && !cpumask_test_cpu(off_cpu, effective)) > off_cpu = -1; > > total_cpus = cpumask_weight_and(effective, cpu_online_mask); > > -- > tejun