Re: [PATCH v2 07/13] mm: thp: make split queue lock safe when LRU pages reparented

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

 



Hi Muchun,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tj-cgroup/for-next]
[also build test WARNING on linus/master v5.15-rc1]
[cannot apply to hnaz-mm/master next-20210916]
[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/0day-ci/linux/commits/Muchun-Song/Use-obj_cgroup-APIs-to-charge-the-LRU-pages/20210916-215452
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
config: x86_64-randconfig-m001-20210916 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/938e77565fc42d6c0d53b0470d75b4055200afe1
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Muchun-Song/Use-obj_cgroup-APIs-to-charge-the-LRU-pages/20210916-215452
        git checkout 938e77565fc42d6c0d53b0470d75b4055200afe1
        # save the attached .config to linux build tree
        mkdir build_dir
        make 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@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   mm/huge_memory.c:516:1: error: expected identifier or '(' before '+' token
     516 | +static inline struct mem_cgroup *split_queue_memcg(struct deferred_split *queue)
         | ^
   In file included from include/asm-generic/bug.h:5,
                    from arch/x86/include/asm/bug.h:84,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/mm.h:9,
                    from mm/huge_memory.c:8:
   mm/huge_memory.c: In function 'split_queue_lock':
   mm/huge_memory.c:543:15: error: implicit declaration of function 'split_queue_memcg'; did you mean 'split_queue_lock'? [-Werror=implicit-function-declaration]
     543 |  if (unlikely(split_queue_memcg(queue) != page_memcg(head))) {
         |               ^~~~~~~~~~~~~~~~~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
>> mm/huge_memory.c:543:40: warning: comparison between pointer and integer
     543 |  if (unlikely(split_queue_memcg(queue) != page_memcg(head))) {
         |                                        ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   mm/huge_memory.c: In function 'split_queue_lock_irqsave':
   mm/huge_memory.c:567:40: warning: comparison between pointer and integer
     567 |  if (unlikely(split_queue_memcg(queue) != page_memcg(head))) {
         |                                        ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   mm/huge_memory.c: In function 'deferred_split_huge_page':
   mm/huge_memory.c:2839:8: warning: assignment to 'struct mem_cgroup *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    2839 |  memcg = split_queue_memcg(ds_queue);
         |        ^
   cc1: some warnings being treated as errors


vim +543 mm/huge_memory.c

   533	
   534	static struct deferred_split *split_queue_lock(struct page *head)
   535	{
   536		struct deferred_split *queue;
   537	
   538		rcu_read_lock();
   539	retry:
   540		queue = page_split_queue(head);
   541		spin_lock(&queue->split_queue_lock);
   542	
 > 543		if (unlikely(split_queue_memcg(queue) != page_memcg(head))) {
   544			spin_unlock(&queue->split_queue_lock);
   545			goto retry;
   546		}
   547	
   548		/*
   549		 * Preemption is disabled in the internal of spin_lock, which can serve
   550		 * as RCU read-side critical sections.
   551		 */
   552		rcu_read_unlock();
   553	
   554		return queue;
   555	}
   556	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[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