Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760073AbYFSRXT (ORCPT ); Thu, 19 Jun 2008 13:23:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758629AbYFSRXM (ORCPT ); Thu, 19 Jun 2008 13:23:12 -0400 Received: from tetsuo.zabbo.net ([207.173.201.20]:49691 "EHLO tetsuo.zabbo.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758611AbYFSRXL (ORCPT ); Thu, 19 Jun 2008 13:23:11 -0400 Message-ID: <485A95FE.9080308@oracle.com> Date: Thu, 19 Jun 2008 10:23:10 -0700 From: Zach Brown User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Jeff Moyer CC: akpm@linux-foundation.org, linux-aio@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [patch] aio: invalidate async directio writes References: In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1038 Lines: 26 > +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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/