Re: [patch] aio: invalidate async directio writes
From: Zach Brown
Date: Thu Jun 19 2008 - 13:23:20 EST
> +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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/