From: Linus Torvalds <[email protected]>
To: Martin Raiber <[email protected]>, Peter Xu <[email protected]>
Cc: Jens Axboe <[email protected]>,
Pavel Begunkov <[email protected]>,
io-uring <[email protected]>
Subject: Re: Fixed buffers have out-dated content
Date: Sun, 17 Jan 2021 12:14:21 -0800 [thread overview]
Message-ID: <CAHk-=wjZ_z9radV3bCC5HH7gDJ9-CZNwqE1JYksUpX6GqPRj+w@mail.gmail.com> (raw)
In-Reply-To: <0102017711f5dc95-8153416f-4641-4495-9103-82c2744e0d69-000000@eu-west-1.amazonses.com>
On Sun, Jan 17, 2021 at 12:07 PM Martin Raiber <[email protected]> wrote:
>
> Thanks! With the patch (skip swapping pinned pages) the problem doesn't
> occur anymore, so it seems to fix it.
Heh, this email came in just as I had committed it to my tree and was
actively writing an email about how you likely wouldn't test it before
I did rc4 because it's a weekend ;)
But since I hadn't pushed it out yet (or done some of the pulls I have
pending), I amended the commit message with your tested-by as well.
Thanks.
It's commit feb889fb40fa ("mm: don't put pinned pages into the swap cache").
I was pretty sure that was the cause from the symptoms you saw, and
the commit explains the whole chain (and explains why the "simple and
stupid" two-liner is actually the right thing to do).
I was very tempted to make the condition for "don't put it into the
swap cache" be much more aggressive, to handle the "GUP with write"
case too, something like
/* Single mapper, more references than us and the map? */
if (page_mapcount(page) == 1 && page_count(page) > 2)
goto keep_locked;
but just using page_maybe_dma_pinned() is the more targeted one for now.
(Added Peter to the cc so that he sees this).
Linus
prev parent reply other threads:[~2021-01-17 20:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-08 23:39 Fixed buffer have out-dated content Martin Raiber
2021-01-09 16:23 ` Jens Axboe
2021-01-09 16:58 ` Martin Raiber
2021-01-09 20:32 ` Pavel Begunkov
2021-01-10 16:50 ` Martin Raiber
2021-01-14 21:50 ` Fixed buffers " Martin Raiber
2021-01-16 19:30 ` Pavel Begunkov
2021-01-16 19:39 ` Jens Axboe
2021-01-16 22:12 ` Jens Axboe
2021-01-16 23:05 ` Linus Torvalds
2021-01-16 23:34 ` Linus Torvalds
2021-01-17 20:07 ` Martin Raiber
2021-01-17 20:14 ` Linus Torvalds [this message]
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='CAHk-=wjZ_z9radV3bCC5HH7gDJ9-CZNwqE1JYksUpX6GqPRj+w@mail.gmail.com' \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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