Re: [linux-next:pending-fixes] [mm/hugetlb] d3fe1a0a02: WARNING:at_include/linux/hugetlb.h:#huge_pte_lockptr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31.07.24 11:28, David Hildenbrand wrote:
On 31.07.24 10:16, David Hildenbrand wrote:
On 31.07.24 09:20, kernel test robot wrote:


Hello,

kernel test robot noticed "WARNING:at_include/linux/hugetlb.h:#huge_pte_lockptr" on:

commit: d3fe1a0a0272723474056e3000717d69923ad901 ("mm/hugetlb: fix hugetlb vs. core-mm PT locking")
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git pending-fixes

[test failed on linux-next/master cd19ac2f903276b820f5d0d89de0c896c27036ed]

in testcase: trinity
version: trinity-i386-abe9de86-1_20230429
with following parameters:

	runtime: 300s
	group: group-00
	nr_groups: 5



compiler: gcc-11
test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G

(please refer to attached dmesg/kmsg for entire log/backtrace)


+------------------------------------------------------+------------+------------+
|                                                      | e98970a1d2 | d3fe1a0a02 |
+------------------------------------------------------+------------+------------+
| WARNING:at_include/linux/hugetlb.h:#huge_pte_lockptr | 0          | 12         |
| EIP:huge_pte_lockptr                                 | 0          | 12         |
+------------------------------------------------------+------------+------------+


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 <oliver.sang@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-lkp/202407311421.95f5c759-lkp@xxxxxxxxx


[   39.570466][ T3479] ------------[ cut here ]------------
[ 39.570921][ T3479] WARNING: CPU: 0 PID: 3479 at include/linux/hugetlb.h:948 huge_pte_lockptr (include/linux/hugetlb.h:948 (discriminator 1))

Helpful! Likely triggers because in that kernel cfg P4D_SIZE is 0.

Hm, with !CONFIG_X86_5LEVEL we should have

#define PGDIR_SHIFT 39
#define P4D_SHIFT PGDIR_SHIFT
#define P4D_SIZE (1UL << P4D_SHIFT)

... getting a hugepage size >= P4D_SIZE seems pretty much impossible.

Anyhow, taking the easy route to be done with his hugetlb crap and live
a happy live, I'll drop the warning and just handle it explicitly.

Realizing that this is 32bit with CONFIG_PGTABLE_LEVELS=2:

So

#define PGDIR_SHIFT	22

and so should be then P4D_SHIFT,PUD_SHIFT,PMD_SHIFT

So we would get "hugepage size >= 4 MiB", which really just is the default PMD size and we would want to do pmd_lockptr() with "hugepage size == PMD_SIZE".

--
Cheers,

David / dhildenb





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux