From: Andrew Morton <akpm@linux-foundation.org>
To: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: Kemeng Shi <shikemeng@huaweicloud.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/8] Remove unused parameters in page_table_check
Date: Mon, 24 Jul 2023 10:02:31 -0700 [thread overview]
Message-ID: <20230724100231.94abdfb007bea270d607a760@linux-foundation.org> (raw)
In-Reply-To: <CA+CK2bBb1YPXSU_YswN6hmf5pqDcc0O6KMw7C3nNCM0ztqm76Q@mail.gmail.com>
On Sat, 22 Jul 2023 17:48:31 -0400 Pasha Tatashin <pasha.tatashin@soleen.com> wrote:
> On Thu, Jul 13, 2023 at 5:25 AM Kemeng Shi <shikemeng@huaweicloud.com> wrote:
> >
> > Hi all, this series remove unused parameters in functions from
> > page_table_check. The first 2 patches remove unused mm and addr
> > parameters in static common functions page_table_check_clear and
> > page_table_check_set. The last 6 patches remove unused addr parameter
> > in some externed functions which only need addr for cleaned
> > page_table_check_clear or page_table_check_set. There is no intended
> > functional change. Thanks!
>
> NAK
>
> Both, mm and addr are common arguments that are used for PTE handling
> in many parts of memory management even when they are not used in
> every function.
>
> Currently, they are not used in page table check, but it is possible
> we may need to use them in the future when support for other arches or
> different types of page tables (i.e. extended page table) is added. It
> is going to be hard to again modify all arch dependent code to add
> these arguments back.
>
> Also, internally at Google we are using these arguments, as we have a
> module that maps user memory in a way that is incompatible with
> upstream, and these arguments are used to support this module.
>
I don't think these are very good arguments for carrying cruft in the
mainline kernel.
If such an architecture is introduced in the future or if google
upstreams that module then we can restore one or both of these
arguments at that time. This is hardly insurmountable:
arch/arm64/include/asm/pgtable.h | 12 +++---
arch/riscv/include/asm/pgtable.h | 12 +++---
arch/x86/include/asm/pgtable.h | 16 ++++----
include/linux/page_table_check.h | 66 ++++++++++++--------------------
include/linux/pgtable.h | 6 +--
mm/page_table_check.c | 50 +++++++++---------------
6 files changed, 65 insertions(+), 97 deletions(-)
next prev parent reply other threads:[~2023-07-24 17:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-13 17:26 Kemeng Shi
2023-07-13 17:26 ` [PATCH 1/8] mm/page_table_check: remove unused parameters in page_table_check_clear() Kemeng Shi
2023-07-13 17:26 ` [PATCH 2/8] mm/page_table_check: remove unused parameters in page_table_check_set() Kemeng Shi
2023-07-13 17:26 ` [PATCH 3/8] mm/page_table_check: remove unused parameter in [__]page_table_check_pte_clear Kemeng Shi
2023-07-13 17:26 ` [PATCH 4/8] mm/page_table_check: remove unused parameter in [__]page_table_check_pmd_clear Kemeng Shi
2023-07-13 17:26 ` [PATCH 5/8] mm/page_table_check: remove unused parameter in [__]page_table_check_pud_clear Kemeng Shi
2023-07-13 17:26 ` [PATCH 6/8] mm/page_table_check: remove unused parameter in [__]page_table_check_pte_set Kemeng Shi
2023-07-13 17:26 ` [PATCH 7/8] mm/page_table_check: remove unused parameter in [__]page_table_check_pmd_set Kemeng Shi
2023-07-13 17:26 ` [PATCH 8/8] mm/page_table_check: remove unused parameter in [__]page_table_check_pud_set Kemeng Shi
2023-07-22 21:48 ` [PATCH 0/8] Remove unused parameters in page_table_check Pasha Tatashin
2023-07-24 17:02 ` Andrew Morton [this message]
2023-07-24 17:17 ` Pasha Tatashin
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=20230724100231.94abdfb007bea270d607a760@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.com \
--cc=shikemeng@huaweicloud.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