From: kernel test robot <lkp@intel.com>
To: Yafang Shao <laoar.shao@gmail.com>,
akpm@linux-foundation.org, david@redhat.com, ziy@nvidia.com,
baolin.wang@linux.alibaba.com, lorenzo.stoakes@oracle.com,
Liam.Howlett@oracle.com, npache@redhat.com, ryan.roberts@arm.com,
dev.jain@arm.com, hannes@cmpxchg.org, usamaarif642@gmail.com,
gutierrez.asier@huawei-partners.com, willy@infradead.org,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
ameryhung@gmail.com, rientjes@google.com, corbet@lwn.net
Cc: oe-kbuild-all@lists.linux.dev, bpf@vger.kernel.org,
linux-mm@kvack.org, linux-doc@vger.kernel.org,
Yafang Shao <laoar.shao@gmail.com>
Subject: Re: [PATCH v6 mm-new 01/10] mm: thp: add support for BPF based THP order selection
Date: Wed, 27 Aug 2025 10:57:10 +0800 [thread overview]
Message-ID: <202508271009.5neOZ0OG-lkp@intel.com> (raw)
In-Reply-To: <20250826071948.2618-2-laoar.shao@gmail.com>
Hi Yafang,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
url: https://github.com/intel-lab-lkp/linux/commits/Yafang-Shao/mm-thp-add-support-for-BPF-based-THP-order-selection/20250826-152415
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20250826071948.2618-2-laoar.shao%40gmail.com
patch subject: [PATCH v6 mm-new 01/10] mm: thp: add support for BPF based THP order selection
config: loongarch-randconfig-r113-20250827 (https://download.01.org/0day-ci/archive/20250827/202508271009.5neOZ0OG-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce: (https://download.01.org/0day-ci/archive/20250827/202508271009.5neOZ0OG-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/202508271009.5neOZ0OG-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> mm/bpf_thp.c:47:31: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/bpf_thp.c:47:31: sparse: int ( [noderef] __rcu * )( ... )
mm/bpf_thp.c:47:31: sparse: int ( * )( ... )
mm/bpf_thp.c:101:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/bpf_thp.c:101:9: sparse: int ( [noderef] __rcu * )( ... )
mm/bpf_thp.c:101:9: sparse: int ( * )( ... )
mm/bpf_thp.c:102:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/bpf_thp.c:102:9: sparse: int ( [noderef] __rcu * )( ... )
mm/bpf_thp.c:102:9: sparse: int ( * )( ... )
mm/bpf_thp.c:111:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/bpf_thp.c:111:9: sparse: int ( [noderef] __rcu * )( ... )
mm/bpf_thp.c:111:9: sparse: int ( * )( ... )
mm/bpf_thp.c:112:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/bpf_thp.c:112:9: sparse: int ( [noderef] __rcu * )( ... )
mm/bpf_thp.c:112:9: sparse: int ( * )( ... )
mm/bpf_thp.c:112:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/bpf_thp.c:112:9: sparse: int ( [noderef] __rcu * )( ... )
mm/bpf_thp.c:112:9: sparse: int ( * )( ... )
mm/bpf_thp.c:133:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/bpf_thp.c:133:9: sparse: int ( [noderef] __rcu * )( ... )
mm/bpf_thp.c:133:9: sparse: int ( * )( ... )
mm/bpf_thp.c:134:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/bpf_thp.c:134:9: sparse: int ( [noderef] __rcu * )( ... )
mm/bpf_thp.c:134:9: sparse: int ( * )( ... )
mm/bpf_thp.c:134:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/bpf_thp.c:134:9: sparse: int ( [noderef] __rcu * )( ... )
mm/bpf_thp.c:134:9: sparse: int ( * )( ... )
>> mm/bpf_thp.c:102:9: sparse: sparse: dereference of noderef expression
>> mm/bpf_thp.c:102:9: sparse: sparse: dereference of noderef expression
mm/bpf_thp.c:112:9: sparse: sparse: dereference of noderef expression
mm/bpf_thp.c:134:9: sparse: sparse: dereference of noderef expression
mm/bpf_thp.c:134:9: sparse: sparse: dereference of noderef expression
mm/bpf_thp.c:134:9: sparse: sparse: dereference of noderef expression
mm/bpf_thp.c:148:14: sparse: sparse: dereference of noderef expression
vim +47 mm/bpf_thp.c
33
34 int get_suggested_order(struct mm_struct *mm, struct vm_area_struct *vma__nullable,
35 u64 vma_flags, enum tva_type tva_flags, int orders)
36 {
37 int (*bpf_suggested_order)(struct mm_struct *mm, struct vm_area_struct *vma__nullable,
38 u64 vma_flags, enum tva_type tva_flags, int orders);
39 int suggested_orders = orders;
40
41 /* No BPF program is attached */
42 if (!test_bit(TRANSPARENT_HUGEPAGE_BPF_ATTACHED,
43 &transparent_hugepage_flags))
44 return suggested_orders;
45
46 rcu_read_lock();
> 47 bpf_suggested_order = rcu_dereference(bpf_thp.get_suggested_order);
48 if (!bpf_suggested_order)
49 goto out;
50
51 suggested_orders = bpf_suggested_order(mm, vma__nullable, vma_flags, tva_flags, orders);
52 if (highest_order(suggested_orders) > highest_order(orders))
53 suggested_orders = orders;
54
55 out:
56 rcu_read_unlock();
57 return suggested_orders;
58 }
59
60 static bool bpf_thp_ops_is_valid_access(int off, int size,
61 enum bpf_access_type type,
62 const struct bpf_prog *prog,
63 struct bpf_insn_access_aux *info)
64 {
65 return bpf_tracing_btf_ctx_access(off, size, type, prog, info);
66 }
67
68 static const struct bpf_func_proto *
69 bpf_thp_get_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
70 {
71 return bpf_base_func_proto(func_id, prog);
72 }
73
74 static const struct bpf_verifier_ops thp_bpf_verifier_ops = {
75 .get_func_proto = bpf_thp_get_func_proto,
76 .is_valid_access = bpf_thp_ops_is_valid_access,
77 };
78
79 static int bpf_thp_init(struct btf *btf)
80 {
81 return 0;
82 }
83
84 static int bpf_thp_init_member(const struct btf_type *t,
85 const struct btf_member *member,
86 void *kdata, const void *udata)
87 {
88 return 0;
89 }
90
91 static int bpf_thp_reg(void *kdata, struct bpf_link *link)
92 {
93 struct bpf_thp_ops *ops = kdata;
94
95 spin_lock(&thp_ops_lock);
96 if (test_and_set_bit(TRANSPARENT_HUGEPAGE_BPF_ATTACHED,
97 &transparent_hugepage_flags)) {
98 spin_unlock(&thp_ops_lock);
99 return -EBUSY;
100 }
101 WARN_ON_ONCE(rcu_access_pointer(bpf_thp.get_suggested_order));
> 102 rcu_assign_pointer(bpf_thp.get_suggested_order, ops->get_suggested_order);
103 spin_unlock(&thp_ops_lock);
104 return 0;
105 }
106
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-08-27 2:58 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-26 7:19 [PATCH v6 mm-new 00/10] mm, bpf: BPF based THP order selection Yafang Shao
2025-08-26 7:19 ` [PATCH v6 mm-new 01/10] mm: thp: add support for " Yafang Shao
2025-08-27 2:57 ` kernel test robot [this message]
2025-08-27 11:39 ` Yafang Shao
2025-08-27 15:04 ` Lorenzo Stoakes
2025-08-27 15:03 ` Lorenzo Stoakes
2025-08-28 5:54 ` Yafang Shao
2025-08-28 10:50 ` Lorenzo Stoakes
2025-08-29 3:01 ` Yafang Shao
2025-08-29 10:42 ` Lorenzo Stoakes
2025-08-31 3:11 ` Yafang Shao
2025-09-01 11:39 ` Lorenzo Stoakes
2025-09-02 2:48 ` Yafang Shao
2025-09-02 7:50 ` Lorenzo Stoakes
2025-09-03 2:10 ` Yafang Shao
2025-08-29 4:56 ` Barry Song
2025-08-29 5:36 ` Yafang Shao
2025-08-26 7:19 ` [PATCH v6 mm-new 02/10] mm: thp: add a new kfunc bpf_mm_get_mem_cgroup() Yafang Shao
2025-08-27 15:34 ` Lorenzo Stoakes
2025-08-27 20:50 ` Shakeel Butt
2025-08-28 10:40 ` Lorenzo Stoakes
2025-08-28 16:00 ` Shakeel Butt
2025-08-29 10:45 ` Lorenzo Stoakes
2025-08-28 6:57 ` Yafang Shao
2025-08-28 10:42 ` Lorenzo Stoakes
2025-08-29 3:09 ` Yafang Shao
2025-08-27 20:45 ` Shakeel Butt
2025-08-28 6:58 ` Yafang Shao
2025-08-26 7:19 ` [PATCH v6 mm-new 03/10] mm: thp: add a new kfunc bpf_mm_get_task() Yafang Shao
2025-08-27 15:42 ` Lorenzo Stoakes
2025-08-27 21:50 ` Andrii Nakryiko
2025-08-28 6:50 ` Yafang Shao
2025-08-28 10:51 ` Lorenzo Stoakes
2025-08-29 3:15 ` Yafang Shao
2025-08-29 10:42 ` Lorenzo Stoakes
2025-08-28 6:47 ` Yafang Shao
2025-08-29 10:43 ` Lorenzo Stoakes
2025-08-26 7:19 ` [PATCH v6 mm-new 04/10] bpf: mark vma->vm_mm as trusted Yafang Shao
2025-08-27 15:45 ` Lorenzo Stoakes
2025-08-28 6:12 ` Yafang Shao
2025-08-28 11:11 ` Lorenzo Stoakes
2025-08-29 3:05 ` Yafang Shao
2025-08-29 10:49 ` Lorenzo Stoakes
2025-08-31 3:16 ` Yafang Shao
2025-09-01 10:36 ` Lorenzo Stoakes
2025-08-26 7:19 ` [PATCH v6 mm-new 05/10] selftests/bpf: add a simple BPF based THP policy Yafang Shao
2025-08-26 7:19 ` [PATCH v6 mm-new 06/10] selftests/bpf: add test case for khugepaged fork Yafang Shao
2025-08-26 7:19 ` [PATCH v6 mm-new 07/10] selftests/bpf: add test case to update thp policy Yafang Shao
2025-08-26 7:19 ` [PATCH v6 mm-new 08/10] selftests/bpf: add test cases for invalid thp_adjust usage Yafang Shao
2025-08-26 7:19 ` [PATCH v6 mm-new 09/10] Documentation: add BPF-based THP adjustment documentation Yafang Shao
2025-08-26 7:19 ` [PATCH v6 mm-new 10/10] MAINTAINERS: add entry for BPF-based THP adjustment Yafang Shao
2025-08-27 15:47 ` Lorenzo Stoakes
2025-08-28 6:08 ` Yafang Shao
2025-08-26 7:42 ` [PATCH v6 mm-new 00/10] mm, bpf: BPF based THP order selection David Hildenbrand
2025-08-26 8:33 ` Lorenzo Stoakes
2025-08-26 12:06 ` Yafang Shao
2025-08-26 9:52 ` Usama Arif
2025-08-26 12:10 ` Yafang Shao
2025-08-26 12:03 ` Yafang Shao
2025-08-27 13:14 ` Lorenzo Stoakes
2025-08-28 2:58 ` Yafang Shao
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=202508271009.5neOZ0OG-lkp@intel.com \
--to=lkp@intel.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=ameryhung@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=bpf@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=daniel@iogearbox.net \
--cc=david@redhat.com \
--cc=dev.jain@arm.com \
--cc=gutierrez.asier@huawei-partners.com \
--cc=hannes@cmpxchg.org \
--cc=laoar.shao@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=npache@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rientjes@google.com \
--cc=ryan.roberts@arm.com \
--cc=usamaarif642@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).