[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180321164000.GC2149215@devbig577.frc2.facebook.com>
Date: Wed, 21 Mar 2018 09:40:00 -0700
From: Tejun Heo <tj@...nel.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: torvalds@...ux-foundation.org, jannh@...gle.com,
paulmck@...ux.vnet.ibm.com, bcrl@...ck.org,
viro@...iv.linux.org.uk, kent.overstreet@...il.com,
security@...nel.org, linux-kernel@...r.kernel.org,
kernel-team@...com
Subject: Re: [PATCH 8/8] fs/aio: Use rcu_work instead of explicit rcu and
work item
Hey, Oleg.
On Wed, Mar 21, 2018 at 04:58:13PM +0100, Oleg Nesterov wrote:
> > - struct rcu_head free_rcu;
> > - struct work_struct free_work; /* see free_ioctx() */
> > + struct rcu_work free_rwork; /* see free_ioctx() */
>
> IIUC, you can't easily share rcu_work's, thus every kioctx needs its own
> ->free_rwork and this looks sub-optimal.
>
> What do you think about the (untested) patch below?
>
> Oleg.
>
>
> --- a/fs/aio.c
> +++ b/fs/aio.c
> @@ -115,8 +115,10 @@ struct kioctx {
> struct page **ring_pages;
> long nr_pages;
>
> - struct rcu_head free_rcu;
> - struct work_struct free_work; /* see free_ioctx() */
> + union {
> + struct rcu_head free_rcu;
> + struct llist_node free_llist;
> + };
It really depends on how much we want to optimize. Do you think it
matters enough?
Thanks.
--
tejun
Powered by blists - more mailing lists