lkml.org 
[lkml]   [2008]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] aio: invalidate async directio writes

> +static DECLARE_WORK(aio_complete_work, aio_complete_fn, NULL);
> +static DEFINE_SPINLOCK(iocb_completion_list_lock);
> +static LIST_HEAD(iocb_completion_list);

It seems like a bad idea to funnel all AIO DIO completion in the system
through one cacheline. Should we have per-cpu lists and work structs?

> + unsigned long flags;
> + spin_lock_irqsave(&iocb_completion_list_lock, flags);
> + list_add(&dio->done_list, &iocb_completion_list);
> + spin_unlock_irqrestore(&iocb_completion_list_lock, flags);
> + schedule_work(&aio_complete_work);

And we should probably use list_add_tail() here so that we don't reverse
the order of IO completion and end_io() callbacks.

And hopefully going per-cpu could simplify the locking so that we don't
have even more per-io locking.

- z


\
 
 \ /
  Last update: 2008-06-19 19:25    [W:0.099 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site