All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zheng Liu <gnehzuil.liu@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: Theodore Ts'o <tytso@mit.edu>, Eric Sandeen <sandeen@redhat.com>,
	Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] ext4: fix ext4_evict_inode() racing against workqueue processing code
Date: Wed, 27 Mar 2013 11:13:40 +0800	[thread overview]
Message-ID: <20130327031340.GA9887@gmail.com> (raw)
In-Reply-To: <20130326203403.GE2082@quack.suse.cz>

On Tue, Mar 26, 2013 at 09:34:03PM +0100, Jan Kara wrote:
> On Tue 26-03-13 13:52:51, Zheng Liu wrote:
> > Sorry for the late reply.
> > 
> > On Wed, Mar 20, 2013 at 10:45:23AM -0400, Theodore Ts'o wrote:
> > > On Wed, Mar 20, 2013 at 09:14:42AM -0500, Eric Sandeen wrote:
> > > > 
> > > > As an aside, is there any reason to have "dioread_nolock" as an option
> > > > at this point?  If it works now, would you ever *not* want it?
> > > > 
> > > > (granted it doesn't work with some journaling options etc, but that
> > > > behavior could be automatic, w/o the need for special mount options).
> > > 
> > > The primary restriction is that diread_nolock doesn't work when fs
> > > block size != page size.  If your proposal is that we automatically
> > > enable diread_nolock when we can use it safely, that's definitely
> > > something to consider for the next merge window.
> > 
> > Yes, I also think we can automatically enable dioread_nolock because it
> > brings us some benefits.
>   But isn't there also some overhead due to buffered writes having to go
> through uninit->init conversion?

Yeah, in my test, the IOPS will decrease after dioread_nolock enables.
But the latency of dio will also descrease.  Honestly I don't test
buffered IO.  So I will test this case and post the result later.  IMO,
this is a tradeoff that we want to improve latency or get a better
throughput.


> Plus there's this potential deadlock in
> dioread_nolock code (http://www.spinics.net/lists/linux-ext4/msg36569.html)
> which I'm not sure how to fix yet...

Yes, we need to fix this bug first.

> 
> > BTW, I think there is an minor improvement for dio overwrite codepath
> > with indirect-based file.  We don't need to take i_mutex in this
> > condition just as we have done for extent-based file.  If a user mounts
> > a ext2/3 file system with a ext4 kernel modules, he/she could get a
> > lower latency.  But it seems that it would break dio semantic in ext2/3.
> > Currently in ext2/3 if we issue a overwrite dio and then issue a read
> > dio.  We will always read the latest data because we wait on i_mutex
> > lock.  But after parallelizing overwite dio, this semantic might breaks.
> > I re-read this doc but it seems that it doesn't describe this case.  Do
> > we need to keep this semantic?
>   I'm not sure but also I don't think it's important to optimize that
> special case.

Thanks for the comment.  I am really not sure whether it is worth.  Let
me test the performance w/ and w/o dioread_nolock first. :-)

Regards,
                                                - Zheng

  reply	other threads:[~2013-03-27  2:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20  1:29 [PATCH] ext4: fix ext4_evict_inode() racing against workqueue processing code Theodore Ts'o
2013-03-20  1:38 ` Theodore Ts'o
2013-03-20 13:22 ` Jan Kara
2013-03-20 13:37   ` Theodore Ts'o
2013-03-20 13:42     ` Jan Kara
2013-03-20 13:51       ` Theodore Ts'o
2013-03-20 14:14 ` Eric Sandeen
2013-03-20 14:45   ` Theodore Ts'o
2013-03-20 20:13     ` Jan Kara
2013-03-26  5:52     ` Zheng Liu
2013-03-26  5:55       ` Zheng Liu
2013-03-26 20:34       ` Jan Kara
2013-03-27  3:13         ` Zheng Liu [this message]
2013-03-29  7:32         ` Zheng Liu

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=20130327031340.GA9887@gmail.com \
    --to=gnehzuil.liu@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=tytso@mit.edu \
    /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.