[Top] [All Lists]

Re: [PATCH 1/2] direct-io: Implement generic deferred AIO completions

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 1/2] direct-io: Implement generic deferred AIO completions
From: Christoph Hellwig <hch@xxxxxx>
Date: Thu, 1 Aug 2013 10:17:20 +0200
Cc: Jan Kara <jack@xxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, hch@xxxxxxxxxxxxx, Jeff Moyer <jmoyer@xxxxxxxxxx>, Al Viro <viro@xxxxxxxxxxxxxxxxxx>, linux-ext4@xxxxxxxxxxxxxxx, Christoph Hellwig <hch@xxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20130712004421.GE3438@dastard>
References: <1373493739-2243-1-git-send-email-jack@xxxxxxx> <20130712004421.GE3438@dastard>
User-agent: Mutt/1.5.17 (2007-11-01)
On Fri, Jul 12, 2013 at 10:44:21AM +1000, Dave Chinner wrote:
> On Thu, Jul 11, 2013 at 12:02:18AM +0200, Jan Kara wrote:
> > From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
> > 
> > Add support to the core direct-io code to defer AIO completions to user
> > context using a workqueue.  This replaces opencoded and less efficient
> > code in XFS and ext4 and will be needed to properly support O_(D)SYNC
> > for AIO.
> I don't see how this is any more efficient than the deferral
> that XFS already does for direct IO completion - it just changes
> what queues IO for completions. And on that topic:

It avoided a memory allocation for each dÑrect I/O write.

> FWIW, in XFS we queue unwritten extent conversion completions on a
> different workqueue to EOF size update completions because the
> latter are small, fast and rarely require IO or get blocked. The
> data IO completion workqueue for EOF updates has the same
> concurrency and depth as the unwritten extent work queue (i.e. 256
> workers per cpu per superblock). So pushing all of this DIO and EOF
> completion work into a single threaded global workqueue that can
> block in every IO completion doesn't seem like a very smart idea to
> me...

Currently the direct I/O code doesn't support async extending writes.

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH 1/2] direct-io: Implement generic deferred AIO completions, Christoph Hellwig <=