linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Zach O'Keefe <zokeefe@google.com>,
	Alex Shi <alex.shi@linux.alibaba.com>,
	David Hildenbrand <david@redhat.com>,
	David Rientjes <rientjes@google.com>,
	Matthew Wilcox <willy@infradead.org>,
	Michal Hocko <mhocko@suse.com>,
	Pasha Tatashin <pasha.tatashin@soleen.com>,
	Peter Xu <peterx@redhat.com>, SeongJae Park <sj@kernel.org>,
	Song Liu <songliubraving@fb.com>,
	Vlastimil Babka <vbabka@suse.cz>, Yang Shi <shy828301@gmail.com>,
	Zi Yan <ziy@nvidia.com>,
	linux-mm@kvack.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Andrea Arcangeli <aarcange@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Axel Rasmussen <axelrasmussen@google.com>,
	Chris Kennelly <ckennelly@google.com>,
	Chris Zankel <chris@zankel.net>, Helge Deller <deller@gmx.de>,
	Hugh Dickins <hughd@google.com>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	Jens Axboe <axboe@kernel.dk>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Matt Turner <mattst88@gmail.com>,
	Max Filippov <jcmvbkbc@gmail.com>,
	Miaohe Lin <linmiaohe@huawei.com>,
	Minchan Kim <minchan@kernel.org>
Subject: Re: [PATCH v4 08/13] mm/madvise: introduce MADV_COLLAPSE sync hugepage collapse
Date: Tue, 3 May 2022 15:21:36 +0800	[thread overview]
Message-ID: <202205031501.6qBJrsPn-lkp@intel.com> (raw)
In-Reply-To: <20220502181714.3483177-9-zokeefe@google.com>

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


  reply	other threads:[~2022-05-03  7:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02 18:17 [PATCH v4 00/12] mm: userspace " Zach O'Keefe
2022-05-02 18:17 ` [PATCH v4 01/13] mm/khugepaged: record SCAN_PMD_MAPPED when scan_pmd() finds THP Zach O'Keefe
2022-05-02 18:17 ` [PATCH v4 02/13] mm/khugepaged: add struct collapse_control Zach O'Keefe
2022-05-02 18:17 ` [PATCH v4 03/13] mm/khugepaged: dedup and simplify hugepage alloc and charging Zach O'Keefe
2022-05-02 18:17 ` [PATCH v4 04/13] mm/khugepaged: make hugepage allocation context-specific Zach O'Keefe
2022-05-03  3:38   ` kernel test robot
2022-05-03  6:30   ` kernel test robot
2022-05-04 21:45     ` Zach O'Keefe
2022-05-04  2:25   ` [mm/khugepaged] 0d006aeaf9: BUG:unable_to_handle_page_fault_for_address kernel test robot
2022-05-04 21:46     ` Zach O'Keefe
2022-05-02 18:17 ` [PATCH v4 05/13] mm/khugepaged: pipe enum scan_result codes back to callers Zach O'Keefe
2022-05-02 18:17 ` [PATCH v4 06/13] mm/khugepaged: add flag to ignore khugepaged_max_ptes_* Zach O'Keefe
2022-05-02 18:17 ` [PATCH v4 07/13] mm/khugepaged: add flag to ignore page young/referenced requirement Zach O'Keefe
2022-05-02 18:17 ` [PATCH v4 08/13] mm/madvise: introduce MADV_COLLAPSE sync hugepage collapse Zach O'Keefe
2022-05-03  7:21   ` kernel test robot [this message]
2022-05-04 21:46     ` Zach O'Keefe
2022-05-02 18:17 ` [PATCH v4 09/13] mm/khugepaged: rename prefix of shared collapse functions Zach O'Keefe
2022-05-02 18:17 ` [PATCH v4 10/13] mm/madvise: add MADV_COLLAPSE to process_madvise() Zach O'Keefe
2022-05-02 18:17 ` [PATCH v4 11/13] selftests/vm: modularize collapse selftests Zach O'Keefe
2022-05-02 18:17 ` [PATCH v4 12/13] selftests/vm: add MADV_COLLAPSE collapse context to selftests Zach O'Keefe
2022-05-02 18:17 ` [PATCH v4 13/13] selftests/vm: add test to verify recollapse of THPs Zach O'Keefe

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=202205031501.6qBJrsPn-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex.shi@linux.alibaba.com \
    --cc=arnd@arndb.de \
    --cc=axboe@kernel.dk \
    --cc=axelrasmussen@google.com \
    --cc=chris@zankel.net \
    --cc=ckennelly@google.com \
    --cc=david@redhat.com \
    --cc=deller@gmx.de \
    --cc=hughd@google.com \
    --cc=ink@jurassic.park.msu.ru \
    --cc=jcmvbkbc@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linmiaohe@huawei.com \
    --cc=linux-mm@kvack.org \
    --cc=llvm@lists.linux.dev \
    --cc=mattst88@gmail.com \
    --cc=mhocko@suse.com \
    --cc=minchan@kernel.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=peterx@redhat.com \
    --cc=rientjes@google.com \
    --cc=shy828301@gmail.com \
    --cc=sj@kernel.org \
    --cc=songliubraving@fb.com \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.org \
    --cc=ziy@nvidia.com \
    --cc=zokeefe@google.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