All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Xu <weixugc@google.com>
To: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux MM <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Rientjes <rientjes@google.com>,
	Paul Turner <pjt@google.com>, Greg Thelen <gthelen@google.com>,
	mingo@redhat.com, will@kernel.org, rppt@kernel.org,
	Dave Hansen <dave.hansen@linux.intel.com>,
	hpa@zytor.com, aneesh.kumar@linux.ibm.com, jirislaby@kernel.org,
	songmuchun@bytedance.com, qydwhotmail@gmail.com,
	Hugh Dickins <hughd@google.com>, Zi Yan <ziy@nvidia.com>,
	anshuman.khandual@arm.com
Subject: Re: [PATCH 3/3] mm/page_table_check: use unsigned long for page counters
Date: Thu, 20 Jan 2022 10:25:52 -0800	[thread overview]
Message-ID: <CAAPL-u8g3Yuh2Z6rb8ct=mVvNtJe6bHZEiPU2hdoCJKd93H-5g@mail.gmail.com> (raw)
In-Reply-To: <20220120042513.1648831-4-pasha.tatashin@soleen.com>

On Wed, Jan 19, 2022 at 8:25 PM Pasha Tatashin
<pasha.tatashin@soleen.com> wrote:
>
> For the consistency, use "unsigned long" for all page counters.
>
> Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
> ---
>  mm/page_table_check.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/mm/page_table_check.c b/mm/page_table_check.c
> index 2341ac382cd5..22dd285ab8d5 100644
> --- a/mm/page_table_check.c
> +++ b/mm/page_table_check.c
> @@ -86,8 +86,8 @@ static void page_table_check_clear(struct mm_struct *mm, unsigned long addr,
>  {
>         struct page_ext *page_ext;
>         struct page *page;
> +       unsigned long i;
>         bool anon;
> -       int i;
>
>         if (!pfn_valid(pfn))
>                 return;
> @@ -121,8 +121,8 @@ static void page_table_check_set(struct mm_struct *mm, unsigned long addr,
>  {
>         struct page_ext *page_ext;
>         struct page *page;
> +       unsigned long i;
>         bool anon;
> -       int i;
>
>         if (!pfn_valid(pfn))
>                 return;
> @@ -186,10 +186,10 @@ static void pmd_clear_level(struct mm_struct *mm, unsigned long addr,
>  void __page_table_check_zero(struct page *page, unsigned int order)
>  {
>         struct page_ext *page_ext = lookup_page_ext(page);
> -       int i;
> +       unsigned long i;
>
>         BUG_ON(!page_ext);
> -       for (i = 0; i < (1 << order); i++) {
> +       for (i = 0; i < (1ul << order); i++) {
>                 struct page_table_check *ptc = get_page_table_check(page_ext);
>
>                 BUG_ON(atomic_read(&ptc->anon_map_count));
> --
> 2.34.1.703.g22d0c6ccf7-goog
>

Reviewed-by: Wei Xu <weixugc@google.com>

      reply	other threads:[~2022-01-20 18:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-20  4:25 [PATCH 0/3] page table check fixes and cleanups Pasha Tatashin
2022-01-20  4:25 ` [PATCH 1/3] mm/debug_vm_pgtable: remove pte entry from the page table Pasha Tatashin
2022-01-20 15:19   ` Zi Yan
2022-01-20  4:25 ` [PATCH 2/3] mm/page_table_check: check entries at pud and pmd levels Pasha Tatashin
2022-01-20 17:59   ` Wei Xu
2022-01-20 18:25     ` Pasha Tatashin
2022-01-20  4:25 ` [PATCH 3/3] mm/page_table_check: use unsigned long for page counters Pasha Tatashin
2022-01-20 18:25   ` Wei 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='CAAPL-u8g3Yuh2Z6rb8ct=mVvNtJe6bHZEiPU2hdoCJKd93H-5g@mail.gmail.com' \
    --to=weixugc@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=anshuman.khandual@arm.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=gthelen@google.com \
    --cc=hpa@zytor.com \
    --cc=hughd@google.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@redhat.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=pjt@google.com \
    --cc=qydwhotmail@gmail.com \
    --cc=rientjes@google.com \
    --cc=rppt@kernel.org \
    --cc=songmuchun@bytedance.com \
    --cc=will@kernel.org \
    --cc=ziy@nvidia.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 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.