From mboxrd@z Thu Jan 1 00:00:00 1970 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 80BFB46AEDC; Fri, 27 Feb 2026 19:46:04 +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=1772221564; cv=none; b=J6tRFvoSooDGme9ZUqtrE/jUBNKnUreXR8eDCKznRyy1cOXpwIfAotBlo1TipbIEWnDQMA7kkKWFEzP8ZQfS+LqKYNUwj3sR9zoLbX+N+qc5RhkzttjZaAPjq2ECrXEiS7X4MKa5dYRJ7b09cX3P07MkHieWVhwwu7XT2zFjxTY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772221564; c=relaxed/simple; bh=SbGsqwk+eKr1sQ1ASH0LTxIHPNgop4DN4OJiqwPR/Jc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VtIykggGWhNtamB5Mkqe/clKOVcX9X5b7k7Ta2b0Y5y5GDXQlQ+zw2jPABpOzseNsEn7tKqNXAb68r3NnK18Wrn7aSxuF1r9l6Lwtv73rBZGdchHbfOfZbyxyWJz1c26HbbQ0oNGMvgbyEjHTYRnaiNaoZQvp4hfUJnrtCvKbCQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uyTPu6Dx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uyTPu6Dx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3565DC116C6; Fri, 27 Feb 2026 19:46:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772221564; bh=SbGsqwk+eKr1sQ1ASH0LTxIHPNgop4DN4OJiqwPR/Jc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uyTPu6Dx7VhkX1s2fcN1zLSD6t/pkg1ANt/671Sl01LVMZj4EVJO0jbTmeiTRNVGy 1AEoGGPuHUm6OhgqJzowwDkt2Hvwyd8dvxxjMFpxs7P3+zNeQpu6WGISfQ+4FsOvW7 jH1y9SeTUsnr6R2zp4J0hNHahpNX+tj+YsZ13xSTE7vG7sEM/2rvWFUeYg5ua266KO vJfGh8qsO2aQ2hvHGQFlX+bsC20gHF/5l2HkqIBnYlzqK8ppRBuopZqyC88vvfPD4b oMcnpvcQiqQ1lW4XQ5Oh/6QiI5YhkyuSALV2/WOg+bDqudkf15anvLcCBBTDnVaME1 NleszU5/SlGzA== Date: Fri, 27 Feb 2026 09:46:03 -1000 From: Tejun Heo To: Alice Ryhl Cc: Miguel Ojeda , Lai Jiangshan , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Andreas Hindborg , Trevor Gross , Danilo Krummrich , Daniel Almeida , John Hubbard , Philipp Stanner , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Boqun Feng , Benno Lossin , Tamir Duberstein , stable@vger.kernel.org Subject: Re: [PATCH v3 1/2] rust: workqueue: restrict delayed work to global wqs Message-ID: References: <20260227-create-workqueue-v3-0-87de133f7849@google.com> <20260227-create-workqueue-v3-1-87de133f7849@google.com> 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 Fri, Feb 27, 2026 at 07:28:11PM +0000, Alice Ryhl wrote: > > delayed_work is just pointing to the wq pointer. On destroy_workqueue(), we > > can shut it down and free all the supporting stuff while leaving zombie wq > > struct which noops execution and let the whole thing go away when refs reach > > zero? > > But isn't that a problem for e.g. self-freeing work? If we don't run the > work, then its memory is just leaked. Yeah, good point. Maybe we should just keep the whole thing up while removing it from sysfs. Would that work? Thanks. -- tejun