From: Catalin Marinas <catalin.marinas@arm.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Andreas Gruenbacher <agruenba@redhat.com>,
Josef Bacik <josef@toxicpanda.com>,
Al Viro <viro@zeniv.linux.org.uk>, Chris Mason <clm@fb.com>,
David Sterba <dsterba@suse.com>, Will Deacon <will@kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
linux-btrfs <linux-btrfs@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 0/3] Avoid live-lock in btrfs fault-in+uaccess loop
Date: Sat, 23 Apr 2022 19:40:40 +0100 [thread overview]
Message-ID: <YmRIKJSr0xSRHliN@arm.com> (raw)
In-Reply-To: <CAHk-=wgafGgBC9JEu397YxFD8o8qiCZHQS+f5i+BSXOkOFqX3w@mail.gmail.com>
On Sat, Apr 23, 2022 at 09:35:42AM -0700, Linus Torvalds wrote:
> On Sat, Apr 23, 2022 at 3:07 AM Catalin Marinas <catalin.marinas@arm.com> wrote:
> >
> > The series introduces fault_in_subpage_writeable() together with the
> > arm64 probing counterpart and the btrfs fix.
>
> Looks fine to me - and I think it can probably go through the arm64
> tree since you'd be the only one really testing it anyway.
I'll queue it via arm64 then.
> I assume you checked that btrfs is the only one that uses
> fault_in_writeable() in this way? Everybody else updates to the right
> byte boundary and retries (or returns immediately)?
I couldn't find any other places (by inspection or testing). The
buffered file I/O can already make progress in current fault_in_*() +
copy_*_user() loops. O_DIRECT either goes via GUP (and memcpy() doesn't
fault) or, if the user buffer is not PAGE aligned, it may fall back to
buffered I/O. That's why I simplified the series, AFAICT it's only btrfs
search_ioctl() with this problem.
--
Catalin
WARNING: multiple messages have this Message-ID (diff)
From: Catalin Marinas <catalin.marinas@arm.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Andreas Gruenbacher <agruenba@redhat.com>,
Josef Bacik <josef@toxicpanda.com>,
Al Viro <viro@zeniv.linux.org.uk>, Chris Mason <clm@fb.com>,
David Sterba <dsterba@suse.com>, Will Deacon <will@kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
linux-btrfs <linux-btrfs@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 0/3] Avoid live-lock in btrfs fault-in+uaccess loop
Date: Sat, 23 Apr 2022 19:40:40 +0100 [thread overview]
Message-ID: <YmRIKJSr0xSRHliN@arm.com> (raw)
In-Reply-To: <CAHk-=wgafGgBC9JEu397YxFD8o8qiCZHQS+f5i+BSXOkOFqX3w@mail.gmail.com>
On Sat, Apr 23, 2022 at 09:35:42AM -0700, Linus Torvalds wrote:
> On Sat, Apr 23, 2022 at 3:07 AM Catalin Marinas <catalin.marinas@arm.com> wrote:
> >
> > The series introduces fault_in_subpage_writeable() together with the
> > arm64 probing counterpart and the btrfs fix.
>
> Looks fine to me - and I think it can probably go through the arm64
> tree since you'd be the only one really testing it anyway.
I'll queue it via arm64 then.
> I assume you checked that btrfs is the only one that uses
> fault_in_writeable() in this way? Everybody else updates to the right
> byte boundary and retries (or returns immediately)?
I couldn't find any other places (by inspection or testing). The
buffered file I/O can already make progress in current fault_in_*() +
copy_*_user() loops. O_DIRECT either goes via GUP (and memcpy() doesn't
fault) or, if the user buffer is not PAGE aligned, it may fall back to
buffered I/O. That's why I simplified the series, AFAICT it's only btrfs
search_ioctl() with this problem.
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-04-23 18:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-23 10:07 [PATCH v4 0/3] Avoid live-lock in btrfs fault-in+uaccess loop Catalin Marinas
2022-04-23 10:07 ` Catalin Marinas
2022-04-23 10:07 ` [PATCH v4 1/3] mm: Add fault_in_subpage_writeable() to probe at sub-page granularity Catalin Marinas
2022-04-23 10:07 ` Catalin Marinas
2022-04-23 23:49 ` Andrew Morton
2022-04-23 23:49 ` Andrew Morton
2022-04-23 10:07 ` [PATCH v4 2/3] arm64: Add support for user sub-page fault probing Catalin Marinas
2022-04-23 10:07 ` Catalin Marinas
2022-04-23 10:07 ` [PATCH v4 3/3] btrfs: Avoid live-lock in search_ioctl() on hardware with sub-page faults Catalin Marinas
2022-04-23 10:07 ` Catalin Marinas
2022-04-23 16:35 ` [PATCH v4 0/3] Avoid live-lock in btrfs fault-in+uaccess loop Linus Torvalds
2022-04-23 16:35 ` Linus Torvalds
2022-04-23 18:40 ` Catalin Marinas [this message]
2022-04-23 18:40 ` Catalin Marinas
2022-04-25 11:08 ` Andreas Gruenbacher
2022-04-25 11:08 ` Andreas Gruenbacher
2022-04-25 16:13 ` Catalin Marinas
2022-04-25 16:13 ` Catalin Marinas
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=YmRIKJSr0xSRHliN@arm.com \
--to=catalin.marinas@arm.com \
--cc=agruenba@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--cc=will@kernel.org \
/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.