All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: Query about DIO/AIO WRITE throttling and ext4 serialization
Date: Thu, 2 Jun 2011 11:56:10 -0400	[thread overview]
Message-ID: <20110602155610.GF18712@redhat.com> (raw)
In-Reply-To: <20110602143633.GE18712@redhat.com>

On Thu, Jun 02, 2011 at 10:36:33AM -0400, Vivek Goyal wrote:
> On Thu, Jun 02, 2011 at 10:17:16AM -0400, Vivek Goyal wrote:
> > On Thu, Jun 02, 2011 at 11:22:09AM +1000, Dave Chinner wrote:
> > > On Wed, Jun 01, 2011 at 05:50:49PM -0400, Vivek Goyal wrote:
> > > > Hi,
> > > > 
> > > > If I throttle a DIO/AIO WRITE bio at block device in a cgroup, will it
> > > > lead to any kind of serialization of ext4 file system. IOW, is there any
> > > > filesystem operation which will wait for that DIO/AIO WRITE to finish
> > > > before other filesystem can make progress (fsync, journalling etc?)
> > > 
> > > Truncate?
> > > 
> > > (XFS explicitly serialises truncate against in flight DIO,
> > > regardless of whether ext4 does.)
> > > 
> > 
> > Dave,
> > 
> > Does this serialization happens against that particular inode on which
> > truncate has been called? If yes, then I think I will still be fine
> > as in common use case I am not expecting much sharing of inodes across
> > cgroups.
> 
> Dave,
> 
> I did a quick test of throttling a direct IO on one file and then
> doing "truncate -s 40 testfile" on a different file in different
> cgroup and it seems to work fine.
> 
> But I seem to be having issues with "sync". Looks like in ext4, if
> I throttle a DIO, sync does not hang but in XFS it does. I am 
> wondering if XFS is waiting for all inflight DIO to finish before
> sync completes.

"sync" on XFS seems to be livelocking as long as DIO write operation
is going on and same does not happen on ext4.

I ran "aio-stress -O aiofile1 -s 4G" and in other window I did "sync"
and it does not finish untile and unless aio-stress has finished.
On the other hand ext4 seems to be fine and it does finish earlier.

Thanks
Vivek

  reply	other threads:[~2011-06-02 15:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 21:50 Query about DIO/AIO WRITE throttling and ext4 serialization Vivek Goyal
2011-06-02  1:22 ` Dave Chinner
2011-06-02 14:17   ` Vivek Goyal
2011-06-02 14:36     ` Vivek Goyal
2011-06-02 15:56       ` Vivek Goyal [this message]
2011-06-02 23:51         ` Dave Chinner
2011-06-03  0:27           ` Vivek Goyal
2011-06-03  0:43             ` Ted Ts'o
2011-06-03  0:54               ` Vivek Goyal
2011-06-03  1:02                 ` Christoph Hellwig
2011-06-03  1:28                   ` Vivek Goyal
2011-06-03  1:33                     ` Vivek Goyal
2011-06-09 13:09                       ` Christoph Hellwig
2011-06-03  3:30                   ` Eric Sandeen
2011-06-03  5:00                     ` Christoph Hellwig
2011-06-03  1:11                 ` Ted Ts'o
2011-06-02 23:46     ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110602155610.GF18712@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=david@fromorbit.com \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.