Messages in this thread | | | Date | Thu, 19 Jun 2008 10:23:10 -0700 | From | Zach Brown <> | Subject | Re: [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
| |