From: Zi Yan <ziy@nvidia.com>
To: Richard Chang <richardycc@google.com>
Cc: oe-kbuild-all@lists.linux.dev,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Vlastimil Babka <vbabka@suse.cz>,
kernel test robot <lkp@intel.com>,
David Hildenbrand <david@redhat.com>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
Brendan Jackman <jackmanb@google.com>,
Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [linux-next:master 8632/11398] mm/page_alloc.c:6773:62: sparse: sparse: incorrect type in argument 3 (different base types)
Date: Mon, 21 Jul 2025 19:54:02 -0400 [thread overview]
Message-ID: <FB67B6A6-8691-4AA3-A418-CD19C881D74B@nvidia.com> (raw)
In-Reply-To: <202507220742.P3SaKlI6-lkp@intel.com>
On 21 Jul 2025, at 19:35, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 97987520025658f30bb787a99ffbd9bbff9ffc9d
> commit: d1554fb6302093d353c8bf4601f9bf994b836904 [8632/11398] mm/page_isolation: remove migratetype parameter from more functions
> config: arm64-randconfig-r132-20250721 (https://download.01.org/0day-ci/archive/20250722/202507220742.P3SaKlI6-lkp@intel.com/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> reproduce: (https://download.01.org/0day-ci/archive/20250722/202507220742.P3SaKlI6-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202507220742.P3SaKlI6-lkp@intel.com/
>
> sparse warnings: (new ones prefixed by >>)
>>> mm/page_alloc.c:6773:62: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected unsigned long nr_migrated @@ got restricted acr_flags_t [usertype] alloc_flags @@
> mm/page_alloc.c:6773:62: sparse: expected unsigned long nr_migrated
> mm/page_alloc.c:6773:62: sparse: got restricted acr_flags_t [usertype] alloc_flags
>>> mm/page_alloc.c:6776:50: sparse: sparse: incorrect type in argument 6 (different base types) @@ expected restricted acr_flags_t [usertype] alloc_flags @@ got unsigned long [assigned] total_mapped @@
> mm/page_alloc.c:6776:50: sparse: expected restricted acr_flags_t [usertype] alloc_flags
> mm/page_alloc.c:6776:50: sparse: got unsigned long [assigned] total_mapped
> mm/page_alloc.c:1526:13: sparse: sparse: context imbalance in 'free_one_page' - different lock contexts for basic block
> mm/page_alloc.c:2520:12: sparse: sparse: context imbalance in 'rmqueue_bulk' - different lock contexts for basic block
> mm/page_alloc.c:2878:13: sparse: sparse: context imbalance in '__free_frozen_pages' - different lock contexts for basic block
> mm/page_alloc.c:2981:33: sparse: sparse: context imbalance in 'free_unref_folios' - unexpected unlock
> mm/page_alloc.c:3271:20: sparse: sparse: context imbalance in 'rmqueue_pcplist' - different lock contexts for basic block
> mm/page_alloc.c:3143:13: sparse: sparse: context imbalance in 'get_page_from_freelist' - different lock contexts for basic block
> mm/page_alloc.c:5099:9: sparse: sparse: context imbalance in 'alloc_pages_bulk_noprof' - different lock contexts for basic block
>
> vim +6773 mm/page_alloc.c
<snip>
> 6772
>> 6773 trace_mm_alloc_contig_migrate_range_info(start, end, alloc_flags,
> 6774 total_migrated,
> 6775 total_reclaimed,
>> 6776 total_mapped);
> 6777 return (ret < 0) ? ret : 0;
> 6778 }
> 6779
It seems that the original patch only moved migratetype from third parameter
to the last one[1], so the trace event has been useless since it was
added. My patch was just a mechanic change.
No one seems to notice the issue so far, maybe the trace event can be removed.
(Add other page allocator maintainer + David)
Hi Richard,
Let me know if this trace event is still useful to you. Otherwise, I am going
to send a patch to remove it.
Thanks.
[1] https://lore.kernel.org/all/20240228051127.2859472-1-richardycc@google.com/T/#u
Best Regards,
Yan, Zi
prev parent reply other threads:[~2025-07-21 23:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-21 23:35 kernel test robot
2025-07-21 23:54 ` Zi Yan [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=FB67B6A6-8691-4AA3-A418-CD19C881D74B@nvidia.com \
--to=ziy@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=jackmanb@google.com \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=mhocko@suse.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=richardycc@google.com \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
/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