From: Peter Xu <peterx@redhat.com>
To: Alistair Popple <apopple@nvidia.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH] mm: Remove stub for non_swap_entry()
Date: Thu, 14 Apr 2022 10:21:41 -0400 [thread overview]
Message-ID: <Ylgt9aLU5T+e+Qju@xz-m1.local> (raw)
In-Reply-To: <87zgko9obm.fsf@nvdebian.thelocal>
On Thu, Apr 14, 2022 at 03:48:33PM +1000, Alistair Popple wrote:
> Peter Xu <peterx@redhat.com> writes:
>
> > The stub for non_swap_entry() may not help much, because MAX_SWAPFILES has
> > already contained all the information to decide whether a swap entry is
> > real swap entry of pesudo ones (migrations, ...).
> >
> > There can be some performance influences on non_swap_entry() with below
> > conditions all met:
> >
> > !CONFIG_MIGRATION && !CONFIG_MEMORY_FAILURE && !CONFIG_DEVICE_PRIVATE
> >
> > But that's definitely not the major config most machines will use, at the
> > meantime it's already in a slow path of swap entry (being parsed from a
> > swap pte), so IMHO it shouldn't be a major issue. Also according to the
> > analysis from Alistair, somehow the stub didn't do the job right [1].
>
> I wasn't so much concerned about execution speed given it's on the slow path
> anyway but overall code size, which is one reason all those config options might
> be disabled. However in practice it made little to no difference as those config
> options already remove most of the extra code so I agree we can drop the stub.
I see, yeah that's a good point.
I'd wildly guess a minumum set of Linux build could still like that, but
not strongly, as I'd first think about not having CONFIG_SWAP at all if so.
>
> Reviewed-by: Alistair Popple <apopple@nvidia.com>
Thanks!
--
Peter Xu
prev parent reply other threads:[~2022-04-14 14:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-13 19:11 Peter Xu
2022-04-14 5:48 ` Alistair Popple
2022-04-14 14:21 ` Peter Xu [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=Ylgt9aLU5T+e+Qju@xz-m1.local \
--to=peterx@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox