[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <485A95FE.9080308@oracle.com>
Date: Thu, 19 Jun 2008 10:23:10 -0700
From: Zach Brown <zach.brown@...cle.com>
To: Jeff Moyer <jmoyer@...hat.com>
CC: akpm@...ux-foundation.org, linux-aio@...ck.org,
linux-kernel@...r.kernel.org
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists