All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH v2 13/16] mm: multigenerational lru: page reclaim
Date: Wed, 14 Apr 2021 02:15:29 +0800	[thread overview]
Message-ID: <202104140207.PkhWYloX-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 10202 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210413065633.2782273-14-yuzhao@google.com>
References: <20210413065633.2782273-14-yuzhao@google.com>
TO: Yu Zhao <yuzhao@google.com>
TO: linux-mm(a)kvack.org
CC: Alex Shi <alexs@kernel.org>
CC: Andi Kleen <ak@linux.intel.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
CC: Benjamin Manes <ben.manes@gmail.com>
CC: Dave Chinner <david@fromorbit.com>
CC: Dave Hansen <dave.hansen@linux.intel.com>
CC: Hillf Danton <hdanton@sina.com>
CC: Jens Axboe <axboe@kernel.dk>

Hi Yu,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tip/x86/core]
[also build test WARNING on cgroup/for-next tip/x86/mm fuse/for-next tip/perf/core tip/sched/core linus/master v5.12-rc7]
[cannot apply to hnaz-linux-mm/master next-20210413]
[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/Yu-Zhao/Multigenerational-LRU-Framework/20210413-145844
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 99cb64de36d5c9397a664808b92943e35bdce25e
:::::: branch date: 11 hours ago
:::::: commit date: 11 hours ago
compiler: h8300-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

   mm/vmscan.c:4108:22: warning: Local variable kswapd shadows outer function [shadowFunction]
    struct task_struct *kswapd = NODE_DATA(nid)->kswapd;
                        ^
   mm/vmscan.c:3910:12: note: Shadowed declaration
   static int kswapd(void *p)
              ^
   mm/vmscan.c:4108:22: note: Shadow variable
    struct task_struct *kswapd = NODE_DATA(nid)->kswapd;
                        ^
   mm/vmscan.c:5458:7: warning: Identical inner 'if' condition is always true. [identicalInnerCondition]
     if (!args)
         ^
   mm/vmscan.c:5433:15: note: 'alloc' is assigned value '!args' here.
    bool alloc = !args;
                 ^
   mm/vmscan.c:5456:6: note: outer condition: alloc
    if (alloc) {
        ^
   mm/vmscan.c:5458:7: note: identical inner condition: !args
     if (!args)
         ^
>> mm/vmscan.c:4710:12: warning: Possible null pointer dereference: args [nullPointer]
    int nid = args->node_id;
              ^
   mm/vmscan.c:5945:55: note: Calling function 'walk_mm_list', 5th argument 'NULL' value is 0
    return walk_mm_list(lruvec, max_seq, sc, swappiness, NULL) ? nr_to_scan : 0;
                                                         ^
   mm/vmscan.c:5469:22: note: Calling function 'get_next_mm', 1st argument 'args' value is 0
     last = get_next_mm(args, swappiness, &mm);
                        ^
   mm/vmscan.c:4801:32: note: Calling function 'reset_mm_stats', 3rd argument 'args' value is 0
    reset_mm_stats(mm_list, last, args);
                                  ^
   mm/vmscan.c:4710:12: note: Null pointer dereference
    int nid = args->node_id;
              ^
   mm/vmscan.c:4711:32: warning: Possible null pointer dereference: args [nullPointer]
    int sid = sid_from_seq_or_gen(args->max_seq);
                                  ^
   mm/vmscan.c:5945:55: note: Calling function 'walk_mm_list', 5th argument 'NULL' value is 0
    return walk_mm_list(lruvec, max_seq, sc, swappiness, NULL) ? nr_to_scan : 0;
                                                         ^
   mm/vmscan.c:5469:22: note: Calling function 'get_next_mm', 1st argument 'args' value is 0
     last = get_next_mm(args, swappiness, &mm);
                        ^
   mm/vmscan.c:4801:32: note: Calling function 'reset_mm_stats', 3rd argument 'args' value is 0
    reset_mm_stats(mm_list, last, args);
                                  ^
   mm/vmscan.c:4711:32: note: Null pointer dereference
    int sid = sid_from_seq_or_gen(args->max_seq);
                                  ^
   mm/vmscan.c:4724:28: warning: Possible null pointer dereference: args [nullPointer]
    sid = sid_from_seq_or_gen(args->max_seq + 1);
                              ^
   mm/vmscan.c:5945:55: note: Calling function 'walk_mm_list', 5th argument 'NULL' value is 0
    return walk_mm_list(lruvec, max_seq, sc, swappiness, NULL) ? nr_to_scan : 0;
                                                         ^
   mm/vmscan.c:5469:22: note: Calling function 'get_next_mm', 1st argument 'args' value is 0
     last = get_next_mm(args, swappiness, &mm);
                        ^
   mm/vmscan.c:4801:32: note: Calling function 'reset_mm_stats', 3rd argument 'args' value is 0
    reset_mm_stats(mm_list, last, args);
                                  ^
   mm/vmscan.c:4724:28: note: Null pointer dereference
    sid = sid_from_seq_or_gen(args->max_seq + 1);
                              ^
   mm/vmscan.c:4756:12: warning: Possible null pointer dereference: args [nullPointer]
    int nid = args->node_id;
              ^
   mm/vmscan.c:5945:55: note: Calling function 'walk_mm_list', 5th argument 'NULL' value is 0
    return walk_mm_list(lruvec, max_seq, sc, swappiness, NULL) ? nr_to_scan : 0;
                                                         ^
   mm/vmscan.c:5469:22: note: Calling function 'get_next_mm', 1st argument 'args' value is 0
     last = get_next_mm(args, swappiness, &mm);
                        ^
   mm/vmscan.c:4756:12: note: Null pointer dereference
    int nid = args->node_id;
              ^
   mm/vmscan.c:4757:48: warning: Possible null pointer dereference: args [nullPointer]
    struct lru_gen_mm_list *mm_list = get_mm_list(args->memcg);
                                                  ^
   mm/vmscan.c:5945:55: note: Calling function 'walk_mm_list', 5th argument 'NULL' value is 0
    return walk_mm_list(lruvec, max_seq, sc, swappiness, NULL) ? nr_to_scan : 0;
                                                         ^
   mm/vmscan.c:5469:22: note: Calling function 'get_next_mm', 1st argument 'args' value is 0
     last = get_next_mm(args, swappiness, &mm);
                        ^
   mm/vmscan.c:4757:48: note: Null pointer dereference
    struct lru_gen_mm_list *mm_list = get_mm_list(args->memcg);
                                                  ^
   mm/vmscan.c:4766:12: warning: Possible null pointer dereference: args [nullPointer]
    VM_BUG_ON(args->max_seq > mm_list->nodes[nid].cur_seq + 1);
              ^
   mm/vmscan.c:5945:55: note: Calling function 'walk_mm_list', 5th argument 'NULL' value is 0
    return walk_mm_list(lruvec, max_seq, sc, swappiness, NULL) ? nr_to_scan : 0;
                                                         ^
   mm/vmscan.c:5469:22: note: Calling function 'get_next_mm', 1st argument 'args' value is 0
     last = get_next_mm(args, swappiness, &mm);
                        ^
   mm/vmscan.c:4766:12: note: Null pointer dereference
    VM_BUG_ON(args->max_seq > mm_list->nodes[nid].cur_seq + 1);
              ^
   mm/vmscan.c:4767:21: warning: Possible null pointer dereference: args [nullPointer]
    VM_BUG_ON(*iter && args->max_seq < mm_list->nodes[nid].cur_seq);
                       ^
   mm/vmscan.c:5945:55: note: Calling function 'walk_mm_list', 5th argument 'NULL' value is 0
    return walk_mm_list(lruvec, max_seq, sc, swappiness, NULL) ? nr_to_scan : 0;
                                                         ^
   mm/vmscan.c:5469:22: note: Calling function 'get_next_mm', 1st argument 'args' value is 0
     last = get_next_mm(args, swappiness, &mm);
                        ^
   mm/vmscan.c:4767:21: note: Null pointer dereference
    VM_BUG_ON(*iter && args->max_seq < mm_list->nodes[nid].cur_seq);
                       ^
   mm/vmscan.c:4770:6: warning: Possible null pointer dereference: args [nullPointer]
    if (args->max_seq <= mm_list->nodes[nid].cur_seq) {
        ^
   mm/vmscan.c:5945:55: note: Calling function 'walk_mm_list', 5th argument 'NULL' value is 0
    return walk_mm_list(lruvec, max_seq, sc, swappiness, NULL) ? nr_to_scan : 0;
                                                         ^
   mm/vmscan.c:5469:22: note: Calling function 'get_next_mm', 1st argument 'args' value is 0
     last = get_next_mm(args, swappiness, &mm);

vim +4710 mm/vmscan.c

46b27b9e9608eb Yu Zhao 2021-04-13  4705  
46b27b9e9608eb Yu Zhao 2021-04-13  4706  static void reset_mm_stats(struct lru_gen_mm_list *mm_list, bool last,
46b27b9e9608eb Yu Zhao 2021-04-13  4707  			   struct mm_walk_args *args)
46b27b9e9608eb Yu Zhao 2021-04-13  4708  {
46b27b9e9608eb Yu Zhao 2021-04-13  4709  	int i;
46b27b9e9608eb Yu Zhao 2021-04-13 @4710  	int nid = args->node_id;
46b27b9e9608eb Yu Zhao 2021-04-13  4711  	int sid = sid_from_seq_or_gen(args->max_seq);
46b27b9e9608eb Yu Zhao 2021-04-13  4712  
46b27b9e9608eb Yu Zhao 2021-04-13  4713  	lockdep_assert_held(&mm_list->lock);
46b27b9e9608eb Yu Zhao 2021-04-13  4714  
46b27b9e9608eb Yu Zhao 2021-04-13  4715  	for (i = 0; i < NR_MM_STATS; i++) {
46b27b9e9608eb Yu Zhao 2021-04-13  4716  		WRITE_ONCE(mm_list->nodes[nid].stats[sid][i],
46b27b9e9608eb Yu Zhao 2021-04-13  4717  			   mm_list->nodes[nid].stats[sid][i] + args->mm_stats[i]);
46b27b9e9608eb Yu Zhao 2021-04-13  4718  		args->mm_stats[i] = 0;
46b27b9e9608eb Yu Zhao 2021-04-13  4719  	}
46b27b9e9608eb Yu Zhao 2021-04-13  4720  
46b27b9e9608eb Yu Zhao 2021-04-13  4721  	if (!last || NR_STAT_GENS == 1)
46b27b9e9608eb Yu Zhao 2021-04-13  4722  		return;
46b27b9e9608eb Yu Zhao 2021-04-13  4723  
46b27b9e9608eb Yu Zhao 2021-04-13  4724  	sid = sid_from_seq_or_gen(args->max_seq + 1);
46b27b9e9608eb Yu Zhao 2021-04-13  4725  	for (i = 0; i < NR_MM_STATS; i++)
46b27b9e9608eb Yu Zhao 2021-04-13  4726  		WRITE_ONCE(mm_list->nodes[nid].stats[sid][i], 0);
46b27b9e9608eb Yu Zhao 2021-04-13  4727  }
46b27b9e9608eb Yu Zhao 2021-04-13  4728  

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

             reply	other threads:[~2021-04-13 18:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 18:15 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-04-13  6:56 [PATCH v2 00/16] Multigenerational LRU Framework Yu Zhao
2021-04-13  6:56 ` [PATCH v2 13/16] mm: multigenerational lru: page reclaim Yu Zhao
2021-04-13  6:56   ` Yu Zhao
2021-04-13  6:56   ` Yu Zhao

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=202104140207.PkhWYloX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.