From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Matthew Wilcox <willy@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>,
darrick.wong@oracle.com, david@fromorbit.com, yukuai3@huawei.com,
linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: Splitting an iomap_page
Date: Mon, 7 Sep 2020 14:33:24 +0300 [thread overview]
Message-ID: <20200907113324.2uixo4u5elveoysf@box> (raw)
In-Reply-To: <20200904033724.GH14765@casper.infradead.org>
On Fri, Sep 04, 2020 at 04:37:24AM +0100, Matthew Wilcox wrote:
> Kirill, do I have the handling of split_huge_page() failure correct?
> It seems reasonable to me -- unlock the page and drop the reference,
> hoping that somebody else will not have a reference to the page by the
> next time we try to split it. Or they will split it for us. There's a
> livelock opportunity here, but I'm not sure it's worse than the one in
> a holepunch scenario.
The worst case scenario is when the page is referenced (directly or
indirectly) by the caller. It this case we would end up with endless loop.
I'm not sure how we can guarantee that this will never happen.
Maybe it's safer to return -EINTR if the split is failed and let the
syscall (or whatever codepath brings us here) to be restarted from the
scratch? Yes, it's abuse of -EINTR, but should be fine.
--
Kirill A. Shutemov
next prev parent reply other threads:[~2020-09-07 11:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-21 14:40 Splitting an iomap_page Matthew Wilcox
2020-08-22 6:06 ` Christoph Hellwig
2020-08-24 16:06 ` Darrick J. Wong
2020-09-04 3:37 ` Matthew Wilcox
2020-09-07 11:33 ` Kirill A. Shutemov [this message]
2020-09-08 11:43 ` Matthew Wilcox
2020-09-09 11:57 ` Kirill A. Shutemov
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=20200907113324.2uixo4u5elveoysf@box \
--to=kirill@shutemov.name \
--cc=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-xfs@vger.kernel.org \
--cc=willy@infradead.org \
--cc=yukuai3@huawei.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;
as well as URLs for NNTP newsgroup(s).