From: Mateusz Guzik <mjguzik@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: brauner@kernel.org, viro@zeniv.linux.org.uk,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
tavianator@tavianator.com, linux-mm@kvack.org,
akpm@linux-foundation.org
Subject: Re: [RESEND PATCH] fs: avoid mmap sem relocks when coredumping with many missing pages
Date: Mon, 20 Jan 2025 17:59:15 +0100 [thread overview]
Message-ID: <CAGudoHGTKftmuE33BfNo89Ac_uTuYueNzqxi3nZ0WpUNy8WXzQ@mail.gmail.com> (raw)
In-Reply-To: <55qxyg2diynlelvdzorhvtk4omfcobarious3fkxh4n33oezod@sju7s6sebec3>
On Mon, Jan 20, 2025 at 5:00 PM Jan Kara <jack@suse.cz> wrote:
> BTW: I don't see how we could fundamentally move away from page-sized
> iteration because core dumping is "by definition" walking page tables and
> gathering pages there. But it could certainly be much more efficient if
> implemented properly (e.g. in the example above we'd see that most of PGD
> level tables are not even allocated so we could be skipping 1GB ranges of
> address space in one step).
>
I was thinking find first allocated page starting at X, then fill in
the gap from the last one as required by the format. Rinse & repeat
until the entire vma is covered.
Surely finding the next page which is known to be there is going to be
cheaper than specifically checking if a given page is there.
--
Mateusz Guzik <mjguzik gmail.com>
next prev parent reply other threads:[~2025-01-20 16:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-19 10:32 Mateusz Guzik
2025-01-20 14:48 ` Christian Brauner
2025-01-20 14:51 ` Christian Brauner
2025-01-20 16:00 ` Jan Kara
2025-01-20 16:59 ` Mateusz Guzik [this message]
2025-01-20 18:59 ` David Hildenbrand
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=CAGudoHGTKftmuE33BfNo89Ac_uTuYueNzqxi3nZ0WpUNy8WXzQ@mail.gmail.com \
--to=mjguzik@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=tavianator@tavianator.com \
--cc=viro@zeniv.linux.org.uk \
/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