From: Tejun Heo <tj@kernel.org>
To: "Håkon Bugge" <haakon.bugge@oracle.com>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, rds-devel@oss.oracle.com,
Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
Saeed Mahameed <saeedm@nvidia.com>,
Tariq Toukan <tariqt@nvidia.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Allison Henderson <allison.henderson@oracle.com>,
Manjunath Patil <manjunath.b.patil@oracle.com>,
Mark Zhang <markzhang@nvidia.com>,
Chuck Lever <chuck.lever@oracle.com>,
Shiraz Saleem <shiraz.saleem@intel.com>,
Yang Li <yang.lee@linux.alibaba.com>
Subject: Re: [PATCH v2 1/6] workqueue: Inherit NOIO and NOFS alloc flags
Date: Wed, 15 May 2024 06:54:11 -1000 [thread overview]
Message-ID: <ZkTos2YXowEFS2fR@slm.duckdns.org> (raw)
In-Reply-To: <20240515125342.1069999-2-haakon.bugge@oracle.com>
> @@ -5583,6 +5600,10 @@ struct workqueue_struct *alloc_workqueue(const char *fmt,
>
> /* init wq */
> wq->flags = flags;
> + if (current->flags & PF_MEMALLOC_NOIO)
> + wq->flags |= __WQ_NOIO;
> + if (current->flags & PF_MEMALLOC_NOFS)
> + wq->flags |= __WQ_NOFS;
So, yeah, please don't do this. What if a NOIO callers wants to scheduler a
work item so that it can user GFP_KERNEL allocations. I don't mind a
convenience feature to workqueue for this but this doesn't seem like the
right way. Also, memalloc_noio_save() and memalloc_nofs_save() are
convenience wrappers around memalloc_flags_save(), so it'd probably be
better to deal with gfp flags directly rather than singling out these two
flags.
Thanks.
--
tejun
next prev parent reply other threads:[~2024-05-15 16:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 12:53 [PATCH v2 0/6] rds: rdma: Add ability to force GFP_NOIO Håkon Bugge
2024-05-15 12:53 ` [PATCH v2 1/6] workqueue: Inherit NOIO and NOFS alloc flags Håkon Bugge
2024-05-15 16:54 ` Tejun Heo [this message]
2024-05-16 15:27 ` Haakon Bugge
2024-05-16 16:29 ` Tejun Heo
2024-05-21 14:02 ` Haakon Bugge
2024-05-15 12:53 ` [PATCH v2 2/6] rds: Brute force GFP_NOIO Håkon Bugge
2024-05-15 12:53 ` [PATCH v2 3/6] RDMA/cma: " Håkon Bugge
2024-05-16 7:37 ` Zhu Yanjun
2024-05-16 15:49 ` Haakon Bugge
2024-05-16 19:07 ` Greg Sword
2024-05-17 9:28 ` Haakon Bugge
2024-05-26 9:27 ` Leon Romanovsky
2024-05-15 12:53 ` [PATCH v2 4/6] RDMA/cm: " Håkon Bugge
2024-05-15 12:53 ` [PATCH v2 5/6] RDMA/mlx5: " Håkon Bugge
2024-05-15 12:53 ` [PATCH v2 6/6] net/mlx5: " Håkon Bugge
2024-05-21 14:24 ` [PATCH v2 0/6] rds: rdma: Add ability to " Christoph Hellwig
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=ZkTos2YXowEFS2fR@slm.duckdns.org \
--to=tj@kernel.org \
--cc=allison.henderson@oracle.com \
--cc=chuck.lever@oracle.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=haakon.bugge@oracle.com \
--cc=jgg@ziepe.ca \
--cc=jiangshanlai@gmail.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=manjunath.b.patil@oracle.com \
--cc=markzhang@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rds-devel@oss.oracle.com \
--cc=saeedm@nvidia.com \
--cc=shiraz.saleem@intel.com \
--cc=tariqt@nvidia.com \
--cc=yang.lee@linux.alibaba.com \
/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.