* Re: [PATCH v4 08/13] mm/madvise: introduce MADV_COLLAPSE sync hugepage collapse
[not found] <20220502181714.3483177-9-zokeefe@google.com>
@ 2022-05-03 7:21 ` kernel test robot
2022-05-04 21:46 ` Zach O'Keefe
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-05-03 7:21 UTC (permalink / raw)
To: Zach O'Keefe, Alex Shi, David Hildenbrand, David Rientjes,
Matthew Wilcox, Michal Hocko, Pasha Tatashin, Peter Xu,
SeongJae Park, Song Liu, Vlastimil Babka, Yang Shi, Zi Yan,
linux-mm
Cc: llvm, kbuild-all, Andrea Arcangeli, Andrew Morton,
Linux Memory Management List, Arnd Bergmann, Axel Rasmussen,
Chris Kennelly, Chris Zankel, Helge Deller, Hugh Dickins,
Ivan Kokshaysky, James E.J. Bottomley, Jens Axboe,
Kirill A. Shutemov, Matt Turner, Max Filippov, Miaohe Lin,
Minchan Kim
Hi Zach,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on next-20220502]
[cannot apply to hnaz-mm/master rostedt-trace/for-next deller-parisc/for-next arnd-asm-generic/master linus/master v5.18-rc5 v5.18-rc4 v5.18-rc3 v5.18-rc5]
[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]
url: https://github.com/intel-lab-lkp/linux/commits/Zach-O-Keefe/mm-khugepaged-record-SCAN_PMD_MAPPED-when-scan_pmd-finds-THP/20220503-031727
base: 9f9b9a2972eb8dcaad09d826c5c6d7488eaca3e6
config: x86_64-randconfig-a011-20220502 (https://download.01.org/0day-ci/archive/20220503/202205031501.6qBJrsPn-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 09325d36061e42b495d1f4c7e933e260eac260ed)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/9f69946c58d8d53c271a4d75ac477b4a5164a511
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Zach-O-Keefe/mm-khugepaged-record-SCAN_PMD_MAPPED-when-scan_pmd-finds-THP/20220503-031727
git checkout 9f69946c58d8d53c271a4d75ac477b4a5164a511
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
mm/khugepaged.c:1105:29: warning: incompatible integer to pointer conversion passing 'gfp_t' (aka 'unsigned int') to parameter of type 'struct page **' [-Wint-conversion]
if (!khugepaged_alloc_page(gfp, node, cc))
^~~
mm/khugepaged.c:963:49: note: passing argument to parameter 'hpage' here
static bool khugepaged_alloc_page(struct page **hpage, gfp_t gfp, int node)
^
mm/khugepaged.c:1105:40: warning: incompatible pointer to integer conversion passing 'struct collapse_control *' to parameter of type 'int' [-Wint-conversion]
if (!khugepaged_alloc_page(gfp, node, cc))
^~
mm/khugepaged.c:963:71: note: passing argument to parameter 'node' here
static bool khugepaged_alloc_page(struct page **hpage, gfp_t gfp, int node)
^
>> mm/khugepaged.c:2565:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case SCAN_PMD_NULL:
^
mm/khugepaged.c:2565:3: note: insert 'break;' to avoid fall-through
case SCAN_PMD_NULL:
^
break;
3 warnings generated.
vim +2565 mm/khugepaged.c
2511
2512 int madvise_collapse(struct vm_area_struct *vma, struct vm_area_struct **prev,
2513 unsigned long start, unsigned long end)
2514 {
2515 struct collapse_control cc = {
2516 .enforce_pte_scan_limits = false,
2517 .enforce_young = false,
2518 .last_target_node = NUMA_NO_NODE,
2519 .hpage = NULL,
2520 .alloc_charge_hpage = &madvise_alloc_charge_hpage,
2521 };
2522 struct mm_struct *mm = vma->vm_mm;
2523 unsigned long hstart, hend, addr;
2524 int thps = 0, nr_hpages = 0, result = SCAN_FAIL;
2525 bool mmap_locked = true;
2526
2527 BUG_ON(vma->vm_start > start);
2528 BUG_ON(vma->vm_end < end);
2529
2530 *prev = vma;
2531
2532 if (IS_ENABLED(CONFIG_SHMEM) && vma->vm_file)
2533 return -EINVAL;
2534
2535 hstart = (start + ~HPAGE_PMD_MASK) & HPAGE_PMD_MASK;
2536 hend = end & HPAGE_PMD_MASK;
2537 nr_hpages = (hend - hstart) >> HPAGE_PMD_SHIFT;
2538
2539 if (hstart >= hend || !transparent_hugepage_active(vma))
2540 return -EINVAL;
2541
2542 mmgrab(mm);
2543 lru_add_drain();
2544
2545 for (addr = hstart; ; ) {
2546 mmap_assert_locked(mm);
2547 cond_resched();
2548 result = SCAN_FAIL;
2549
2550 if (unlikely(khugepaged_test_exit(mm))) {
2551 result = SCAN_ANY_PROCESS;
2552 break;
2553 }
2554
2555 memset(cc.node_load, 0, sizeof(cc.node_load));
2556 result = khugepaged_scan_pmd(mm, vma, addr, &mmap_locked, &cc);
2557 if (!mmap_locked)
2558 *prev = NULL; /* tell madvise we dropped mmap_lock */
2559
2560 switch (result) {
2561 /* Whitelisted set of results where continuing OK */
2562 case SCAN_SUCCEED:
2563 case SCAN_PMD_MAPPED:
2564 ++thps;
> 2565 case SCAN_PMD_NULL:
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v4 08/13] mm/madvise: introduce MADV_COLLAPSE sync hugepage collapse
2022-05-03 7:21 ` [PATCH v4 08/13] mm/madvise: introduce MADV_COLLAPSE sync hugepage collapse kernel test robot
@ 2022-05-04 21:46 ` Zach O'Keefe
0 siblings, 0 replies; 2+ messages in thread
From: Zach O'Keefe @ 2022-05-04 21:46 UTC (permalink / raw)
To: kernel test robot
Cc: Alex Shi, David Hildenbrand, David Rientjes, Matthew Wilcox,
Michal Hocko, Pasha Tatashin, Peter Xu, SeongJae Park, Song Liu,
Vlastimil Babka, Yang Shi, Zi Yan, linux-mm, llvm, kbuild-all,
Andrea Arcangeli, Andrew Morton, Arnd Bergmann, Axel Rasmussen,
Chris Kennelly, Chris Zankel, Helge Deller, Hugh Dickins,
Ivan Kokshaysky, James E.J. Bottomley, Jens Axboe,
Kirill A. Shutemov, Matt Turner, Max Filippov, Miaohe Lin,
Minchan Kim
Sorry again - fixed in v5
On Tue, May 3, 2022 at 12:22 AM kernel test robot <lkp@intel.com> wrote:
>
> Hi Zach,
>
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on next-20220502]
> [cannot apply to hnaz-mm/master rostedt-trace/for-next deller-parisc/for-next arnd-asm-generic/master linus/master v5.18-rc5 v5.18-rc4 v5.18-rc3 v5.18-rc5]
> [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]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Zach-O-Keefe/mm-khugepaged-record-SCAN_PMD_MAPPED-when-scan_pmd-finds-THP/20220503-031727
> base: 9f9b9a2972eb8dcaad09d826c5c6d7488eaca3e6
> config: x86_64-randconfig-a011-20220502 (https://download.01.org/0day-ci/archive/20220503/202205031501.6qBJrsPn-lkp@intel.com/config)
> compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 09325d36061e42b495d1f4c7e933e260eac260ed)
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://github.com/intel-lab-lkp/linux/commit/9f69946c58d8d53c271a4d75ac477b4a5164a511
> git remote add linux-review https://github.com/intel-lab-lkp/linux
> git fetch --no-tags linux-review Zach-O-Keefe/mm-khugepaged-record-SCAN_PMD_MAPPED-when-scan_pmd-finds-THP/20220503-031727
> git checkout 9f69946c58d8d53c271a4d75ac477b4a5164a511
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> mm/khugepaged.c:1105:29: warning: incompatible integer to pointer conversion passing 'gfp_t' (aka 'unsigned int') to parameter of type 'struct page **' [-Wint-conversion]
> if (!khugepaged_alloc_page(gfp, node, cc))
> ^~~
> mm/khugepaged.c:963:49: note: passing argument to parameter 'hpage' here
> static bool khugepaged_alloc_page(struct page **hpage, gfp_t gfp, int node)
> ^
> mm/khugepaged.c:1105:40: warning: incompatible pointer to integer conversion passing 'struct collapse_control *' to parameter of type 'int' [-Wint-conversion]
> if (!khugepaged_alloc_page(gfp, node, cc))
> ^~
> mm/khugepaged.c:963:71: note: passing argument to parameter 'node' here
> static bool khugepaged_alloc_page(struct page **hpage, gfp_t gfp, int node)
> ^
> >> mm/khugepaged.c:2565:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
> case SCAN_PMD_NULL:
> ^
> mm/khugepaged.c:2565:3: note: insert 'break;' to avoid fall-through
> case SCAN_PMD_NULL:
> ^
> break;
> 3 warnings generated.
>
>
> vim +2565 mm/khugepaged.c
>
> 2511
> 2512 int madvise_collapse(struct vm_area_struct *vma, struct vm_area_struct **prev,
> 2513 unsigned long start, unsigned long end)
> 2514 {
> 2515 struct collapse_control cc = {
> 2516 .enforce_pte_scan_limits = false,
> 2517 .enforce_young = false,
> 2518 .last_target_node = NUMA_NO_NODE,
> 2519 .hpage = NULL,
> 2520 .alloc_charge_hpage = &madvise_alloc_charge_hpage,
> 2521 };
> 2522 struct mm_struct *mm = vma->vm_mm;
> 2523 unsigned long hstart, hend, addr;
> 2524 int thps = 0, nr_hpages = 0, result = SCAN_FAIL;
> 2525 bool mmap_locked = true;
> 2526
> 2527 BUG_ON(vma->vm_start > start);
> 2528 BUG_ON(vma->vm_end < end);
> 2529
> 2530 *prev = vma;
> 2531
> 2532 if (IS_ENABLED(CONFIG_SHMEM) && vma->vm_file)
> 2533 return -EINVAL;
> 2534
> 2535 hstart = (start + ~HPAGE_PMD_MASK) & HPAGE_PMD_MASK;
> 2536 hend = end & HPAGE_PMD_MASK;
> 2537 nr_hpages = (hend - hstart) >> HPAGE_PMD_SHIFT;
> 2538
> 2539 if (hstart >= hend || !transparent_hugepage_active(vma))
> 2540 return -EINVAL;
> 2541
> 2542 mmgrab(mm);
> 2543 lru_add_drain();
> 2544
> 2545 for (addr = hstart; ; ) {
> 2546 mmap_assert_locked(mm);
> 2547 cond_resched();
> 2548 result = SCAN_FAIL;
> 2549
> 2550 if (unlikely(khugepaged_test_exit(mm))) {
> 2551 result = SCAN_ANY_PROCESS;
> 2552 break;
> 2553 }
> 2554
> 2555 memset(cc.node_load, 0, sizeof(cc.node_load));
> 2556 result = khugepaged_scan_pmd(mm, vma, addr, &mmap_locked, &cc);
> 2557 if (!mmap_locked)
> 2558 *prev = NULL; /* tell madvise we dropped mmap_lock */
> 2559
> 2560 switch (result) {
> 2561 /* Whitelisted set of results where continuing OK */
> 2562 case SCAN_SUCCEED:
> 2563 case SCAN_PMD_MAPPED:
> 2564 ++thps;
> > 2565 case SCAN_PMD_NULL:
>
> --
> 0-DAY CI Kernel Test Service
> https://01.org/lkp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-04 21:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220502181714.3483177-9-zokeefe@google.com>
2022-05-03 7:21 ` [PATCH v4 08/13] mm/madvise: introduce MADV_COLLAPSE sync hugepage collapse kernel test robot
2022-05-04 21:46 ` Zach O'Keefe
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).