linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: cgel.zte@gmail.com, mingo@redhat.com, peterz@infradead.org,
	juri.lelli@redhat.com
Cc: kbuild-all@lists.01.org, akpm@linux-foundation.org,
	bristot@redhat.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, xu xin <xu.xin16@zte.com.cn>
Subject: Re: [PATCH linux-next] ksm: Count ksm-merging pages for each process
Date: Tue, 15 Mar 2022 01:34:12 +0800	[thread overview]
Message-ID: <202203150131.oDjproo7-lkp@intel.com> (raw)
In-Reply-To: <20220314015355.2111696-1-xu.xin16@zte.com.cn>

Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on next-20220310]

url:    https://github.com/0day-ci/linux/commits/cgel-zte-gmail-com/ksm-Count-ksm-merging-pages-for-each-process/20220314-095633
base:    71941773e143369a73c9c4a3b62fbb60736a1182
config: s390-randconfig-s031-20220313 (https://download.01.org/0day-ci/archive/20220315/202203150131.oDjproo7-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://github.com/0day-ci/linux/commit/64577121c010929e9f2604053f4b96402d3089a8
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review cgel-zte-gmail-com/ksm-Count-ksm-merging-pages-for-each-process/20220314-095633
        git checkout 64577121c010929e9f2604053f4b96402d3089a8
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=s390 SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> mm/ksm.c:647:23: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct task_struct *owner @@     got struct task_struct [noderef] __rcu *owner @@
   mm/ksm.c:647:23: sparse:     expected struct task_struct *owner
   mm/ksm.c:647:23: sparse:     got struct task_struct [noderef] __rcu *owner
   mm/ksm.c:805:23: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct task_struct *owner @@     got struct task_struct [noderef] __rcu *owner @@
   mm/ksm.c:805:23: sparse:     expected struct task_struct *owner
   mm/ksm.c:805:23: sparse:     got struct task_struct [noderef] __rcu *owner
   mm/ksm.c:2038:15: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct task_struct *owner @@     got struct task_struct [noderef] __rcu *owner @@
   mm/ksm.c:2038:15: sparse:     expected struct task_struct *owner
   mm/ksm.c:2038:15: sparse:     got struct task_struct [noderef] __rcu *owner
   mm/ksm.c: note: in included file:
   include/linux/rmap.h:248:28: sparse: sparse: context imbalance in 'write_protect_page' - unexpected unlock

vim +647 mm/ksm.c

   635	
   636		/* check it's not STABLE_NODE_CHAIN or negative */
   637		BUG_ON(stable_node->rmap_hlist_len < 0);
   638	
   639		hlist_for_each_entry(rmap_item, &stable_node->hlist, hlist) {
   640			if (rmap_item->hlist.next)
   641				ksm_pages_sharing--;
   642			else
   643				ksm_pages_shared--;
   644	
   645	#ifdef CONFIG_MEMCG /*Condition of mm_struct with owner*/
   646			BUG_ON(rmap_item->mm == NULL);
 > 647			owner = rmap_item->mm->owner;
   648			/* In case that the process of mm may be killed or exit */
   649			if (owner)
   650				owner->ksm_merging_pages--;
   651	#endif
   652			VM_BUG_ON(stable_node->rmap_hlist_len <= 0);
   653			stable_node->rmap_hlist_len--;
   654			put_anon_vma(rmap_item->anon_vma);
   655			rmap_item->address &= PAGE_MASK;
   656			cond_resched();
   657		}
   658	
   659		/*
   660		 * We need the second aligned pointer of the migrate_nodes
   661		 * list_head to stay clear from the rb_parent_color union
   662		 * (aligned and different than any node) and also different
   663		 * from &migrate_nodes. This will verify that future list.h changes
   664		 * don't break STABLE_NODE_DUP_HEAD. Only recent gcc can handle it.
   665		 */
   666		BUILD_BUG_ON(STABLE_NODE_DUP_HEAD <= &migrate_nodes);
   667		BUILD_BUG_ON(STABLE_NODE_DUP_HEAD >= &migrate_nodes + 1);
   668	
   669		if (stable_node->head == &migrate_nodes)
   670			list_del(&stable_node->list);
   671		else
   672			stable_node_dup_del(stable_node);
   673		free_stable_node(stable_node);
   674	}
   675	

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


  reply	other threads:[~2022-03-14 17:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14  1:53 cgel.zte
2022-03-14 17:34 ` kernel test robot [this message]
2022-03-15 11:48   ` [PATCH v2] ksm: Count ksm merging " cgel.zte
2022-03-22  8:46     ` cgel.zte

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=202203150131.oDjproo7-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=bristot@redhat.com \
    --cc=cgel.zte@gmail.com \
    --cc=juri.lelli@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=xu.xin16@zte.com.cn \
    /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