From: kernel test robot <lkp@intel.com>
To: ran xiaokai <ranxiaokai627@163.com>,
akpm@linux-foundation.org, willy@infradead.org
Cc: oe-kbuild-all@lists.linux.dev, vbabka@suse.cz,
svetly.todorov@memverge.com, ran.xiaokai@zte.com.cn,
baohua@kernel.org, ryan.roberts@arm.com, peterx@redhat.com,
ziy@nvidia.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/2] kpageflags: fix wrong KPF_THP on non-pmd-mappable compound pages
Date: Wed, 26 Jun 2024 23:55:15 +0800 [thread overview]
Message-ID: <202406262203.FFeFYbhP-lkp@intel.com> (raw)
In-Reply-To: <20240626024924.1155558-3-ranxiaokai627@163.com>
Hi ran,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master v6.10-rc5 next-20240625]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/ran-xiaokai/mm-Constify-folio_order-folio_test_pmd_mappable/20240626-113027
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20240626024924.1155558-3-ranxiaokai627%40163.com
patch subject: [PATCH 2/2] kpageflags: fix wrong KPF_THP on non-pmd-mappable compound pages
config: parisc-allnoconfig (https://download.01.org/0day-ci/archive/20240626/202406262203.FFeFYbhP-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240626/202406262203.FFeFYbhP-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/202406262203.FFeFYbhP-lkp@intel.com/
All warnings (new ones prefixed by >>):
fs/proc/page.c: In function 'stable_page_flags':
>> fs/proc/page.c:151:42: warning: passing argument 1 of 'folio_test_pmd_mappable' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
151 | else if (folio_test_pmd_mappable(folio)) {
| ^~~~~
In file included from include/linux/mm.h:1120,
from include/linux/memblock.h:12,
from fs/proc/page.c:2:
include/linux/huge_mm.h:438:58: note: expected 'struct folio *' but argument is of type 'const struct folio *'
438 | static inline bool folio_test_pmd_mappable(struct folio *folio)
| ~~~~~~~~~~~~~~^~~~~
vim +151 fs/proc/page.c
108
109 u64 stable_page_flags(const struct page *page)
110 {
111 const struct folio *folio;
112 unsigned long k;
113 unsigned long mapping;
114 bool is_anon;
115 u64 u = 0;
116
117 /*
118 * pseudo flag: KPF_NOPAGE
119 * it differentiates a memory hole from a page with no flags
120 */
121 if (!page)
122 return 1 << KPF_NOPAGE;
123 folio = page_folio(page);
124
125 k = folio->flags;
126 mapping = (unsigned long)folio->mapping;
127 is_anon = mapping & PAGE_MAPPING_ANON;
128
129 /*
130 * pseudo flags for the well known (anonymous) memory mapped pages
131 */
132 if (page_mapped(page))
133 u |= 1 << KPF_MMAP;
134 if (is_anon) {
135 u |= 1 << KPF_ANON;
136 if (mapping & PAGE_MAPPING_KSM)
137 u |= 1 << KPF_KSM;
138 }
139
140 /*
141 * compound pages: export both head/tail info
142 * they together define a compound page's start/end pos and order
143 */
144 if (page == &folio->page)
145 u |= kpf_copy_bit(k, KPF_COMPOUND_HEAD, PG_head);
146 else
147 u |= 1 << KPF_COMPOUND_TAIL;
148
149 if (folio_test_hugetlb(folio))
150 u |= 1 << KPF_HUGE;
> 151 else if (folio_test_pmd_mappable(folio)) {
152 u |= 1 << KPF_THP;
153 if (is_huge_zero_folio(folio))
154 u |= 1 << KPF_ZERO_PAGE;
155 } else if (is_zero_pfn(page_to_pfn(page)))
156 u |= 1 << KPF_ZERO_PAGE;
157
158 /*
159 * Caveats on high order pages: PG_buddy and PG_slab will only be set
160 * on the head page.
161 */
162 if (PageBuddy(page))
163 u |= 1 << KPF_BUDDY;
164 else if (page_count(page) == 0 && is_free_buddy_page(page))
165 u |= 1 << KPF_BUDDY;
166
167 if (PageOffline(page))
168 u |= 1 << KPF_OFFLINE;
169 if (PageTable(page))
170 u |= 1 << KPF_PGTABLE;
171 if (folio_test_slab(folio))
172 u |= 1 << KPF_SLAB;
173
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-06-26 15:55 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-26 2:49 [PATCH 0/2] kpageflags: fix wrong KPF_THP on non-pmd-mappable compound pages ran xiaokai
2024-06-26 2:49 ` [PATCH 1/2] mm: Constify folio_order()/folio_test_pmd_mappable() ran xiaokai
2024-06-26 3:09 ` Zi Yan
2024-06-26 4:30 ` ran xiaokai
2024-06-26 11:19 ` Zi Yan
2024-06-26 2:49 ` [PATCH 2/2] kpageflags: fix wrong KPF_THP on non-pmd-mappable compound pages ran xiaokai
2024-06-26 3:06 ` Zi Yan
2024-06-26 4:32 ` ran xiaokai
2024-06-26 11:07 ` Ryan Roberts
2024-06-26 14:40 ` Zi Yan
2024-06-26 14:42 ` Ryan Roberts
2024-06-27 1:54 ` Lance Yang
2024-06-27 4:10 ` Barry Song
2024-06-27 8:39 ` Ryan Roberts
2024-06-27 9:16 ` Barry Song
2024-06-27 9:27 ` Ryan Roberts
2024-06-27 12:46 ` ran xiaokai
2024-06-26 15:15 ` Matthew Wilcox
2024-06-26 15:18 ` Ryan Roberts
2024-06-27 2:07 ` Lance Yang
2024-06-26 15:55 ` kernel test robot [this message]
2024-06-26 16:21 ` kernel test robot
2024-06-27 12:38 ` ran xiaokai
2024-06-27 13:03 ` Zi Yan
2024-06-27 13:16 ` ran xiaokai
2024-06-27 13:54 ` David Hildenbrand
2024-06-28 3:01 ` ran xiaokai
2024-07-03 9:20 ` ran xiaokai
2024-07-03 10:11 ` 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=202406262203.FFeFYbhP-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=peterx@redhat.com \
--cc=ran.xiaokai@zte.com.cn \
--cc=ranxiaokai627@163.com \
--cc=ryan.roberts@arm.com \
--cc=svetly.todorov@memverge.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.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.