linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namjae Jeon <namjae.jeon@samsung.com>
To: 'Theodore Ts'o' <tytso@mit.edu>
Cc: "'Lukáš Czerner'" <lczerner@redhat.com>,
	'linux-ext4' <linux-ext4@vger.kernel.org>,
	"'Ashish Sangwan'" <a.sangwan@samsung.com>
Subject: RE: [PATCH 1/2] ext4: introduce new i_write_mutex to protect fallocate
Date: Tue, 03 Jun 2014 15:04:32 +0900	[thread overview]
Message-ID: <001801cf7ef1$b01a85a0$104f90e0$@samsung.com> (raw)
In-Reply-To: <20140602143807.GB30598@thunk.org>

> 
> On Sat, May 31, 2014 at 03:45:36PM +0900, Namjae Jeon wrote:
> > ext4 file write is already serialized with inode mutex.
> 
> Right, I had forgotten about that.  The case where we really care
> about parallel writes is in the direct I/O case, and eventually I'd
> like for us to be able to support non-overwriting/non-isize-extending
> writes in parallel but we're not there yet.
Okay.
> 
> > So I think the impact of adding another lock will be very very less..
> > When I run parallel write test of fio to prove it, I can not see the difference on w/wo
> i_write_mutex.
> 
> If there is an impact, it won't show up there.  Where it will show up
> will be in high scalability workloads.  For people who don't have the
> half-million dollars (and up) expensive RAID arrays, a fairly good
> facsimile is to use a > 16 core system, preferably a system at least 4
> sockets, and say 32 or 64 gigs of memory, of which you can dedicate
> half to a ramdisk.  Then run the fio scalability benchmark in that
> scenario.  That way, things like cache line bounces and lock
> contentions will be much more visible when the system is no longer
> bottleneck by the HDD.
Yes, Right. I agree that result should be measured on high-end server
as you pointed again. Unfortunately I don't have such equipment yet..
> 
> > Yes, Right. We can use shared lock to remove a little bit lock contention in ext4 file write.
> > I will share rwsem lock patch.. Could you please revert i_write_mutex patch ?
> 
> So the shared lock will help somewhat (since writes will be far more
> common than fallocate calls) but I suspect, not all that much.  And if
> I revert the i_write_mutex call, now, we won't have time to replace it
> with a different patch since the merge window is already open.
> 
> And since this patch is needed to fix a xfstests failure (although
> it's for collapse range in data journalling mode, so not a common
> case), if we can't really see a performance loss in the much more
> common server configurations, I'm inclined to leave it in for now, and
> we can try to improve performance in the next kernel revision.
IMHO, If our goal is to solve the problem of xfstests, we can use only
"ext4: fix ZERO_RANGE test failure in data journalling" patch without
i_write_mutex patch. And we can add lock for fallocate on next kernel
after checking with sufficient time.

Thanks!

> 
> What do other people think?
> 
> 						- Ted


  reply	other threads:[~2014-06-03  6:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-13  0:19 [PATCH 1/2] ext4: introduce new i_write_mutex to protect fallocate Namjae Jeon
2014-05-26 16:29 ` Theodore Ts'o
2014-05-27  1:59   ` Theodore Ts'o
2014-05-27  2:12     ` Namjae Jeon
2014-05-29 12:42 ` Lukáš Czerner
2014-05-29 16:28   ` Theodore Ts'o
2014-05-31  6:45     ` Namjae Jeon
2014-06-02 14:38       ` Theodore Ts'o
2014-06-03  6:04         ` Namjae Jeon [this message]
2014-06-03 10:49           ` Lukáš Czerner
2014-06-03 15:19           ` Theodore Ts'o
2014-06-04  5:58             ` Namjae Jeon
2014-06-08  2:48               ` Theodore Ts'o

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='001801cf7ef1$b01a85a0$104f90e0$@samsung.com' \
    --to=namjae.jeon@samsung.com \
    --cc=a.sangwan@samsung.com \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).