public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: Do background CIL flushes via a workqueue
Date: Tue, 27 Mar 2012 12:19:41 -0400	[thread overview]
Message-ID: <20120327161941.GC28707@redhat.com> (raw)
In-Reply-To: <20120327160300.GA22555@infradead.org>

On Tue, Mar 27, 2012 at 12:03:00PM -0400, Christoph Hellwig wrote:
> On Tue, Mar 27, 2012 at 11:57:59AM -0400, Vivek Goyal wrote:
> > On Tue, Mar 27, 2012 at 10:31:27AM -0400, Christoph Hellwig wrote:
> > > Vivek, does CFQ still need any hints for this sort of handoff?
> > > 
> > 
> > Christoph, I don't understand the issue enough to comment on it.
> > 
> > Had a quick look at the patch. Looks like some action (writing log), has
> > been moved to a worker thread.  And in some cases (log force triggered
> > flush, whatever it is), we seem to prefer to do it from the submitter's
> > context.
> 
> Yes.  This is to workaround the old problem of cfq getting utterly
> confused if cooperating I/O beeing submitted from different threads.
> 
> The case in the previous version of this patch was:
> 
>  - thread doing the fsync will write out data, and wait for it
>  - then we'd force the log by kicking a workqueue and waiting for it
> 
> quite similar to the ext3/4 fsync issues that we had long discussions
> about.

Ok, then I think that fundamental issue still remains with CFQ. And there
is no general solution to recognizing dependency between processes.

But a specific workaround  for ext3/ext4 fsync problem was put by corrado
long back.

commit 749ef9f8423054e326f3a246327ed2db4b6d395f
Author: Corrado Zoccolo <czoccolo@gmail.com>
Date:   Mon Sep 20 15:24:50 2010 +0200

    cfq: improve fsync performance for small files

Basically, I think previously journal commits were "WRITE" and were
showing most likely on async IO tree. And "fsync" IO was synchronous
and probably showing up on "sync-noidle" tree. CFQ does idling before
it switches between trees hence transition from one process to other
was slow.

Now corrado, changed the IO type from journaling thread to "WRITE_SYNC"
which makes writes synchronous and sets the REQ_NOIDLE flag. Hence forcing
"journal" thread to show up on "sync-noidle" tree. I think "fsync" was
already there so effectively both the processes are on same service tree
and we don't idle between processes when they are on "sync-noidle" tree.

So xfs either need to resort to similar optimizaiton where IO type from
both the process context is of same type or try to do all the IO from
one process context. 

AFAIK, CFQ does not have any generic mechanism to detect process IO
dependecny.

Thanks
Vivek

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2012-03-27 16:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-27  9:46 [PATCH] xfs: Do background CIL flushes via a workqueue Dave Chinner
2012-03-27 14:31 ` Christoph Hellwig
2012-03-27 15:57   ` Vivek Goyal
2012-03-27 16:03     ` Christoph Hellwig
2012-03-27 16:19       ` Vivek Goyal [this message]
2012-03-27 17:03         ` Christoph Hellwig
2012-03-27 17:18           ` Vivek Goyal
2012-03-27 17:23           ` Vivek Goyal
2012-03-29  8:52           ` Dave Chinner
2012-03-29  8:51         ` 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=20120327161941.GC28707@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=hch@infradead.org \
    --cc=xfs@oss.sgi.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox