From: Tejun Heo <tj@kernel.org>
To: Benjamin Coddington <bcodding@redhat.com>
Cc: Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>,
Lai Jiangshan <jiangshanlai@gmail.com>,
linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
djeffery@redhat.com, loberman@redhat.com
Subject: Re: [PATCH 1/2] workqueue: Add a helper to identify current workqueue
Date: Mon, 7 Jul 2025 18:37:59 -1000 [thread overview]
Message-ID: <aGygp-3mtsLxtGT3@slm.duckdns.org> (raw)
In-Reply-To: <baad3adf8ea80b65d83dd196ab715992a0f1b768.1751913604.git.bcodding@redhat.com>
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
next prev parent reply other threads:[~2025-07-08 4:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-07 18:46 [PATCH 0/2] Fix loopback mounted filesystems on NFS Benjamin Coddington
2025-07-07 18:46 ` [PATCH 1/2] workqueue: Add a helper to identify current workqueue Benjamin Coddington
2025-07-08 4:37 ` Tejun Heo [this message]
2025-07-08 10:25 ` Benjamin Coddington
2025-07-07 18:46 ` [PATCH 2/2] NFS: Improve nfsiod workqueue detection for allocation flags Benjamin Coddington
2025-07-07 19:25 ` Trond Myklebust
2025-07-07 20:12 ` Benjamin Coddington
2025-07-07 20:42 ` Trond Myklebust
2025-07-07 20:28 ` Laurence Oberman
2025-07-08 16:50 ` Laurence Oberman
2025-07-08 17:03 ` Benjamin Coddington
2025-07-08 17:09 ` Laurence Oberman
[not found] ` <F889E706-9B2B-48CA-B30E-60FB5EFE2578@redhat.com>
2025-07-09 14:36 ` [PATCH] NFS: Fixup allocation flags for nfsiod's __GFP_NORETRY Laurence Oberman
2025-07-07 19:15 ` [PATCH 0/2] Fix loopback mounted filesystems on NFS Jeff Layton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aGygp-3mtsLxtGT3@slm.duckdns.org \
--to=tj@kernel.org \
--cc=anna@kernel.org \
--cc=bcodding@redhat.com \
--cc=djeffery@redhat.com \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=loberman@redhat.com \
--cc=trondmy@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.