[PATCH 2/2] mm: Allocate THP on hugezeropage wp-fault

Dev Jain dev.jain at arm.com
Tue Sep 3 05:44:02 PDT 2024


On 9/3/24 14:15, kernel test robot wrote:
>
> Hello,
>
> kernel test robot noticed "BUG:sleeping_function_called_from_invalid_context_at_mm/memory.c" on:
>
> commit: c636ba74f021bfe8d72845f9e53ee2b8ea16f5f8 ("[PATCH 2/2] mm: Allocate THP on hugezeropage wp-fault")
> url: https://github.com/intel-lab-lkp/linux/commits/Dev-Jain/mm-Abstract-THP-allocation/20240830-164300
> base: https://git.kernel.org/cgit/linux/kernel/git/akpm/mm.git mm-everything
> patch link: https://lore.kernel.org/all/20240830084117.4079805-3-dev.jain@arm.com/
> patch subject: [PATCH 2/2] mm: Allocate THP on hugezeropage wp-fault
>
> in testcase: trinity
> version: trinity-i386-abe9de86-1_20230429
> with following parameters:
>
> 	runtime: 600s
>
>
>
> compiler: gcc-12
> test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
>
> (please refer to attached dmesg/kmsg for entire log/backtrace)
>
>
>
> 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 at intel.com>
> | Closes: https://lore.kernel.org/oe-lkp/202409031602.14479174-lkp@intel.com
>
>
> [  189.202955][T15284] BUG: sleeping function called from invalid context at mm/memory.c:6690
> [  189.203611][T15284] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 15284, name: trinity-c6

I guess, since thp_fault_alloc() may sleep due to folio_zero_user(), I need to call it before
do_huge_zero_wp_pmd_locked(). I will send a v2 since I also need to clean up the lock/unlock sites.

>
>



More information about the linux-arm-kernel mailing list