All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [RFC PATCH 1/3] Introduce per thread user-kernel shared structure
Date: Sat, 28 Aug 2021 18:18:07 +0800	[thread overview]
Message-ID: <202108281851.bdhbFW38-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <1630107736-18269-2-git-send-email-prakash.sangappa@oracle.com>
References: <1630107736-18269-2-git-send-email-prakash.sangappa@oracle.com>
TO: Prakash Sangappa <prakash.sangappa@oracle.com>

Hi Prakash,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on linus/master]
[also build test WARNING on v5.14-rc7]
[cannot apply to tip/sched/core hnaz-linux-mm/master tip/x86/asm next-20210827]
[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/Prakash-Sangappa/Provide-fast-access-to-thread-specific-data/20210828-073533
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 8f9d0349841a2871624bb1e85309e03e9867c16e
:::::: branch date: 11 hours ago
:::::: commit date: 11 hours ago
config: x86_64-randconfig-s022-20210827 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-348-gf0e6938b-dirty
        # https://github.com/0day-ci/linux/commit/4afb2fb1653308287e0f2347dfff5c499acedee7
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Prakash-Sangappa/Provide-fast-access-to-thread-specific-data/20210828-073533
        git checkout 4afb2fb1653308287e0f2347dfff5c499acedee7
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' 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>


sparse warnings: (new ones prefixed by >>)
>> mm/task_shared.c:264:1: sparse: sparse: unused label 'out'

vim +/out +264 mm/task_shared.c

4afb2fb1653308 Prakash Sangappa 2021-08-27  200  
4afb2fb1653308 Prakash Sangappa 2021-08-27  201  
4afb2fb1653308 Prakash Sangappa 2021-08-27  202  /*
4afb2fb1653308 Prakash Sangappa 2021-08-27  203   * Allocate task_ushared struct for calling thread.
4afb2fb1653308 Prakash Sangappa 2021-08-27  204   */
4afb2fb1653308 Prakash Sangappa 2021-08-27  205  static int task_ushared_alloc(void)
4afb2fb1653308 Prakash Sangappa 2021-08-27  206  {
4afb2fb1653308 Prakash Sangappa 2021-08-27  207  	struct mm_struct *mm = current->mm;
4afb2fb1653308 Prakash Sangappa 2021-08-27  208  	struct ushared_pg *ent = NULL;
4afb2fb1653308 Prakash Sangappa 2021-08-27  209  	struct task_ushrd_struct *ushrd;
4afb2fb1653308 Prakash Sangappa 2021-08-27  210  	struct ushared_pages *usharedpg;
4afb2fb1653308 Prakash Sangappa 2021-08-27  211  	int tryalloc = 0;
4afb2fb1653308 Prakash Sangappa 2021-08-27  212  	int slot = -1;
4afb2fb1653308 Prakash Sangappa 2021-08-27  213  	int ret = -ENOMEM;
4afb2fb1653308 Prakash Sangappa 2021-08-27  214  
4afb2fb1653308 Prakash Sangappa 2021-08-27  215  	if (mm->usharedpg == NULL && init_mm_ushared(mm))
4afb2fb1653308 Prakash Sangappa 2021-08-27  216  		return ret;
4afb2fb1653308 Prakash Sangappa 2021-08-27  217  
4afb2fb1653308 Prakash Sangappa 2021-08-27  218  	if (current->task_ushrd == NULL && init_task_ushrd(current))
4afb2fb1653308 Prakash Sangappa 2021-08-27  219  		return ret;
4afb2fb1653308 Prakash Sangappa 2021-08-27  220  
4afb2fb1653308 Prakash Sangappa 2021-08-27  221  	usharedpg = mm->usharedpg;
4afb2fb1653308 Prakash Sangappa 2021-08-27  222  	ushrd = current->task_ushrd;
4afb2fb1653308 Prakash Sangappa 2021-08-27  223  repeat:
4afb2fb1653308 Prakash Sangappa 2021-08-27  224  	if (mmap_write_lock_killable(mm))
4afb2fb1653308 Prakash Sangappa 2021-08-27  225  		return -EINTR;
4afb2fb1653308 Prakash Sangappa 2021-08-27  226  
4afb2fb1653308 Prakash Sangappa 2021-08-27  227  	ent = list_empty(&usharedpg->frlist) ? NULL :
4afb2fb1653308 Prakash Sangappa 2021-08-27  228  		list_entry(usharedpg->frlist.next,
4afb2fb1653308 Prakash Sangappa 2021-08-27  229  		struct ushared_pg, fr_list);
4afb2fb1653308 Prakash Sangappa 2021-08-27  230  
4afb2fb1653308 Prakash Sangappa 2021-08-27  231  	if (ent == NULL || ent->slot_count == 0) {
4afb2fb1653308 Prakash Sangappa 2021-08-27  232  		if (tryalloc == 0) {
4afb2fb1653308 Prakash Sangappa 2021-08-27  233  			mmap_write_unlock(mm);
4afb2fb1653308 Prakash Sangappa 2021-08-27  234  			(void)ushared_allocpg();
4afb2fb1653308 Prakash Sangappa 2021-08-27  235  			tryalloc = 1;
4afb2fb1653308 Prakash Sangappa 2021-08-27  236  			goto repeat;
4afb2fb1653308 Prakash Sangappa 2021-08-27  237  		} else {
4afb2fb1653308 Prakash Sangappa 2021-08-27  238  			ent = NULL;
4afb2fb1653308 Prakash Sangappa 2021-08-27  239  		}
4afb2fb1653308 Prakash Sangappa 2021-08-27  240  	}
4afb2fb1653308 Prakash Sangappa 2021-08-27  241  
4afb2fb1653308 Prakash Sangappa 2021-08-27  242  	if (ent) {
4afb2fb1653308 Prakash Sangappa 2021-08-27  243  		slot = find_first_zero_bit((unsigned long *)(&ent->bitmap),
4afb2fb1653308 Prakash Sangappa 2021-08-27  244  		  TASK_USHARED_SLOTS);
4afb2fb1653308 Prakash Sangappa 2021-08-27  245  		BUG_ON(slot >=  TASK_USHARED_SLOTS);
4afb2fb1653308 Prakash Sangappa 2021-08-27  246  
4afb2fb1653308 Prakash Sangappa 2021-08-27  247  		set_bit(slot, (unsigned long *)(&ent->bitmap));
4afb2fb1653308 Prakash Sangappa 2021-08-27  248  
4afb2fb1653308 Prakash Sangappa 2021-08-27  249  		ushrd->uaddr = (struct task_ushared *)(ent->vaddr +
4afb2fb1653308 Prakash Sangappa 2021-08-27  250  		  (slot * sizeof(union task_shared)));
4afb2fb1653308 Prakash Sangappa 2021-08-27  251  		ushrd->kaddr = (struct task_ushared *)(ent->kaddr +
4afb2fb1653308 Prakash Sangappa 2021-08-27  252  		  (slot * sizeof(union task_shared)));
4afb2fb1653308 Prakash Sangappa 2021-08-27  253  		ushrd->upg = ent;
4afb2fb1653308 Prakash Sangappa 2021-08-27  254  		ent->slot_count--;
4afb2fb1653308 Prakash Sangappa 2021-08-27  255  		/* move it to tail */
4afb2fb1653308 Prakash Sangappa 2021-08-27  256  		if (ent->slot_count == 0) {
4afb2fb1653308 Prakash Sangappa 2021-08-27  257  			list_del(&ent->fr_list);
4afb2fb1653308 Prakash Sangappa 2021-08-27  258  			list_add_tail(&ent->fr_list, &usharedpg->frlist);
4afb2fb1653308 Prakash Sangappa 2021-08-27  259  		}
4afb2fb1653308 Prakash Sangappa 2021-08-27  260  
4afb2fb1653308 Prakash Sangappa 2021-08-27  261  	       ret = 0;
4afb2fb1653308 Prakash Sangappa 2021-08-27  262  	}
4afb2fb1653308 Prakash Sangappa 2021-08-27  263  
4afb2fb1653308 Prakash Sangappa 2021-08-27 @264  out:
4afb2fb1653308 Prakash Sangappa 2021-08-27  265  	mmap_write_unlock(mm);
4afb2fb1653308 Prakash Sangappa 2021-08-27  266  	return ret;
4afb2fb1653308 Prakash Sangappa 2021-08-27  267  }
4afb2fb1653308 Prakash Sangappa 2021-08-27  268  

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33997 bytes --]

             reply	other threads:[~2021-08-28 10:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-28 10:18 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-08-27 23:42 [RFC PATCH 0/3] Provide fast access to thread-specific data Prakash Sangappa
2021-08-27 23:42 ` [RFC PATCH 1/3] Introduce per thread user-kernel shared structure Prakash Sangappa
2021-08-28  7:36   ` kernel test robot
2021-08-28  8:21   ` kernel test robot

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=202108281851.bdhbFW38-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.