[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aGygp-3mtsLxtGT3@slm.duckdns.org>
Date: Mon, 7 Jul 2025 18:37:59 -1000
From: Tejun Heo <tj@...nel.org>
To: Benjamin Coddington <bcodding@...hat.com>
Cc: Trond Myklebust <trondmy@...nel.org>, Anna Schumaker <anna@...nel.org>,
Lai Jiangshan <jiangshanlai@...il.com>, linux-nfs@...r.kernel.org,
linux-kernel@...r.kernel.org, djeffery@...hat.com,
loberman@...hat.com
Subject: Re: [PATCH 1/2] workqueue: Add a helper to identify current workqueue
On Mon, Jul 07, 2025 at 02:46:03PM -0400, Benjamin Coddington wrote:
> Introduce a new helper current_workqueue() which returns the current task's
> workqueue pointer or NULL if not a workqueue worker.
>
> This will allow the NFS client to recognize the case where writeback occurs
> within the nfsiod workqueue or is being submitted directly. NFS would like
> to change the GFP_ flags for memory allocation to avoid stalls or cycles in
> memory pools based on which context writeback is occurring. In a following
> patch, this helper detects the case rather than checking the PF_WQ_WORKER
> flag which can be passed along from another workqueue worker.
There's already current_work(). Wouldn't that be enough for identifying
whether the current work item?
Thanks.
--
tejun
Powered by blists - more mailing lists