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>,
	"'Lukáš Czerner'" <lczerner@redhat.com>
Cc: '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: Sat, 31 May 2014 15:45:36 +0900	[thread overview]
Message-ID: <000c01cf7c9b$edaf2f90$c90d8eb0$@samsung.com> (raw)
In-Reply-To: <20140529162810.GG25041@thunk.org>

> 
> On Thu, May 29, 2014 at 02:42:04PM +0200, Lukáš Czerner wrote:
> >
> > I wonder what is the performance impact of this change ? Especially
> > since we're not longer taking the lock only in unaligned aio/dio
> > case but in all cases ?
> 
> Thinking about this some more, this is also going to break parallel
> writes, which would be unfortunate.  We might want to change this to
> using a rw mutex, where writes take a shared lock, and require
> fallocate to take an exclusive lock....
ext4 file write is already serialized with inode mutex.
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.

[job1]
ioengine=sync
buffered=1
rw=write
numjobs=100
filename=file1
rw_sequencer=sequential
size=10485760000
filesize=104857600
nrfiles=1
openfiles=100

Without i_write_mutex =>
Run status group 0 (all jobs):
  WRITE: io=10000MB, aggrb=276869KB/s, minb=2768KB/s, maxb=3530KB/s, mint=29007msec, maxt=36985msec
Run status group 0 (all jobs):
  WRITE: io=10000MB, aggrb=273862KB/s, minb=2738KB/s, maxb=3584KB/s, mint=28566msec, maxt=37391msec
Run status group 0 (all jobs):
  WRITE: io=10000MB, aggrb=271373KB/s, minb=2713KB/s, maxb=3650KB/s, mint=28048msec, maxt=37734msec
Run status group 0 (all jobs):
  WRITE: io=10000MB, aggrb=274906KB/s, minb=2749KB/s, maxb=3554KB/s, mint=28808msec, maxt=37249msec

With i_write_mutex patch applied =>
Run status group 0 (all jobs):
  WRITE: io=10000MB, aggrb=273672KB/s, minb=2736KB/s, maxb=3498KB/s, mint=29269msec, maxt=37417msec
Run status group 0 (all jobs):
  WRITE: io=10000MB, aggrb=271877KB/s, minb=2718KB/s, maxb=3401KB/s, mint=30101msec, maxt=37664msec
Run status group 0 (all jobs):
  WRITE: io=10000MB, aggrb=272753KB/s, minb=2727KB/s, maxb=3412KB/s, mint=30008msec, maxt=37543msec
Run status group 0 (all jobs):
  WRITE: io=10000MB, aggrb=274508KB/s, minb=2745KB/s, maxb=3267KB/s, mint=31335msec, maxt=37303msec

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 ?

Thanks!

> 
> 				- Ted

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-05-31  6:45 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 [this message]
2014-06-02 14:38       ` Theodore Ts'o
2014-06-03  6:04         ` Namjae Jeon
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='000c01cf7c9b$edaf2f90$c90d8eb0$@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).