lkml.org 
[lkml]   [2018]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2018-03-21 17:41    [W:0.072 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site