From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Ritesh Harjani <riteshh@linux.ibm.com>,
jack@suse.cz, tytso@mit.edu, linux-ext4@vger.kernel.org
Cc: david@fromorbit.com, hch@infradead.org, adilger@dilger.ca,
mbobrowski@mbobrowski.org, rgoldwyn@suse.de
Subject: Re: [RFC 0/2] ext4: Improve locking sequence in DIO write path
Date: Wed, 18 Sep 2019 08:58:17 +0800 [thread overview]
Message-ID: <40e8fc50-db5b-83e3-8a06-620253b6c10b@linux.alibaba.com> (raw)
In-Reply-To: <20190917103249.20335-1-riteshh@linux.ibm.com>
On 19/9/17 18:32, Ritesh Harjani wrote:
> Hello,
>
> This patch series is based on the upstream discussion with Jan
> & Joseph @ [1].
> It is based on top of Matthew's v3 ext4 iomap patch series [2]
>
> Patch-1: Adds the ext4_ilock/unlock APIs and also replaces all
> inode_lock/unlock instances from fs/ext4/*
>
> For now I already accounted for trylock/lock issue symantics
> (which was discussed here [3]) in the same patch,
> since the this whole patch was around inode_lock/unlock API,
> so I thought it will be best to address that issue in the same patch.
> However, kindly let me know if otherwise.
>
> Patch-2: Commit msg of this patch describes in detail about
> what it is doing.
> In brief - we try to first take the shared lock (instead of exclusive
> lock), unless it is a unaligned_io or extend_io. Then in
> ext4_dio_write_checks(), if we start with shared lock, we see
> if we can really continue with shared lock or not. If not, then
> we release the shared lock then acquire exclusive lock
> and restart ext4_dio_write_checks().
>
>
> Tested against few xfstests (with dioread_nolock mount option),
> those ran fine (ext4 & generic).
>
> I tried testing performance numbers on my VM (since I could not get
> hold of any real h/w based test device). I could test the fact
> that earlier we were trying to do downgrade_write() lock, but with
> this patch, that path is now avoided for fio test case
> (as reported by Joseph in [4]).
> But for the actual results, I am not sure if VM machine testing could
> really give the reliable perf numbers which we want to take a look at.
> Though I do observe some form of perf improvements, but I could not
> get any reliable numbers (not even with the same list of with/without
> patches with which Joseph posted his numbers [1]).
>
>
> @Joseph,
> Would it be possible for you to give your test case a run with this
> patches? That will be really helpful.
>
Sure, will post the result ASAP.
Thanks,
Joseph
> Branch for this is hosted at below tree.
>
> https://github.com/riteshharjani/linux/tree/ext4-ilock-RFC
>
> [1]: https://lore.kernel.org/linux-ext4/20190910215720.GA7561@quack2.suse.cz/
> [2]: https://lwn.net/Articles/799184/
> [3]: https://lore.kernel.org/linux-fsdevel/20190911103117.E32C34C044@d06av22.portsmouth.uk.ibm.com/
> [4]: https://lore.kernel.org/linux-ext4/1566871552-60946-4-git-send-email-joseph.qi@linux.alibaba.com/
>
>
> Ritesh Harjani (2):
> ext4: Add ext4_ilock & ext4_iunlock API
> ext4: Improve DIO writes locking sequence
>
> fs/ext4/ext4.h | 33 ++++++
> fs/ext4/extents.c | 16 +--
> fs/ext4/file.c | 253 ++++++++++++++++++++++++++++++++--------------
> fs/ext4/inode.c | 4 +-
> fs/ext4/ioctl.c | 16 +--
> fs/ext4/super.c | 12 +--
> fs/ext4/xattr.c | 16 +--
> 7 files changed, 244 insertions(+), 106 deletions(-)
>
next prev parent reply other threads:[~2019-09-18 0:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-17 10:32 [RFC 0/2] ext4: Improve locking sequence in DIO write path Ritesh Harjani
2019-09-17 10:32 ` [RFC 1/2] ext4: Add ext4_ilock & ext4_iunlock API Ritesh Harjani
2019-09-17 10:32 ` [RFC 2/2] ext4: Improve DIO writes locking sequence Ritesh Harjani
2019-09-18 0:58 ` Joseph Qi [this message]
2019-09-18 6:35 ` [RFC 0/2] ext4: Improve locking sequence in DIO write path Joseph Qi
2019-09-18 10:03 ` Ritesh Harjani
2019-09-18 10:57 ` Joseph Qi
2019-09-19 2:08 ` Joseph Qi
2019-09-19 18:48 ` Ritesh Harjani
2019-09-23 6:19 ` Ritesh Harjani
2019-09-24 15:10 ` Jan Kara
2019-09-24 19:48 ` Ritesh Harjani
2019-09-25 9:23 ` Jan Kara
2019-09-26 12:34 ` Ritesh Harjani
2019-09-26 13:47 ` Jan Kara
2019-09-25 1:17 ` Joseph Qi
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=40e8fc50-db5b-83e3-8a06-620253b6c10b@linux.alibaba.com \
--to=joseph.qi@linux.alibaba.com \
--cc=adilger@dilger.ca \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=mbobrowski@mbobrowski.org \
--cc=rgoldwyn@suse.de \
--cc=riteshh@linux.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox