All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC v6 2/5] sched/core: Update turbo_sched count only when required
Date: Fri, 24 Jan 2020 10:28:07 +0800	[thread overview]
Message-ID: <202001241044.2R1aKuJY%lkp@intel.com> (raw)
In-Reply-To: <20200121063307.17221-3-parth@linux.ibm.com>

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

Hi Parth,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on tip/sched/core]
[also build test WARNING on powerpc/next tip/auto-latest linux/master linus/master v5.5-rc7 next-20200123]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Parth-Shah/TurboSched-A-scheduler-for-sustaining-Turbo-Frequencies-for-longer-durations/20200124-041428
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git afa70d941f663c69c9a64ec1021bbcfa82f0e54a
config: i386-randconfig-c002-20200124 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

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

All warnings (new ones prefixed by >>):

   In file included from arch/x86/include/asm/current.h:5:0,
                    from include/linux/sched.h:12,
                    from kernel/sched/sched.h:5,
                    from kernel/sched/core.c:9:
   kernel/sched/core.c: In function 'finish_task_switch':
   kernel/sched/sched.h:2484:45: error: 'struct task_struct' has no member named 'latency_nice'; did you mean 'latency_record'?
    #define is_bg_task(p)  (bgtask_latency((p)->latency_nice))
                                                ^
   include/linux/compiler.h:33:34: note: in definition of macro '__branch_check__'
       ______r = __builtin_expect(!!(x), expect); \
                                     ^
>> kernel/sched/core.c:3272:7: note: in expansion of macro 'unlikely'
      if (unlikely(is_bg_task(prev)))
          ^~~~~~~~
   kernel/sched/sched.h:2484:25: note: in expansion of macro 'bgtask_latency'
    #define is_bg_task(p)  (bgtask_latency((p)->latency_nice))
                            ^~~~~~~~~~~~~~
   kernel/sched/core.c:3272:16: note: in expansion of macro 'is_bg_task'
      if (unlikely(is_bg_task(prev)))
                   ^~~~~~~~~~
   kernel/sched/sched.h:2483:39: error: 'MAX_LATENCY_NICE' undeclared (first use in this function); did you mean 'MAX_OPTINSN_SIZE'?
    #define bgtask_latency(lat) ((lat) == MAX_LATENCY_NICE)
                                          ^
   include/linux/compiler.h:33:34: note: in definition of macro '__branch_check__'
       ______r = __builtin_expect(!!(x), expect); \
                                     ^
>> kernel/sched/core.c:3272:7: note: in expansion of macro 'unlikely'
      if (unlikely(is_bg_task(prev)))
          ^~~~~~~~
   kernel/sched/sched.h:2484:25: note: in expansion of macro 'bgtask_latency'
    #define is_bg_task(p)  (bgtask_latency((p)->latency_nice))
                            ^~~~~~~~~~~~~~
   kernel/sched/core.c:3272:16: note: in expansion of macro 'is_bg_task'
      if (unlikely(is_bg_task(prev)))
                   ^~~~~~~~~~
   kernel/sched/sched.h:2483:39: note: each undeclared identifier is reported only once for each function it appears in
    #define bgtask_latency(lat) ((lat) == MAX_LATENCY_NICE)
                                          ^
   include/linux/compiler.h:33:34: note: in definition of macro '__branch_check__'
       ______r = __builtin_expect(!!(x), expect); \
                                     ^
>> kernel/sched/core.c:3272:7: note: in expansion of macro 'unlikely'
      if (unlikely(is_bg_task(prev)))
          ^~~~~~~~
   kernel/sched/sched.h:2484:25: note: in expansion of macro 'bgtask_latency'
    #define is_bg_task(p)  (bgtask_latency((p)->latency_nice))
                            ^~~~~~~~~~~~~~
   kernel/sched/core.c:3272:16: note: in expansion of macro 'is_bg_task'
      if (unlikely(is_bg_task(prev)))
                   ^~~~~~~~~~
   kernel/sched/sched.h:2484:45: error: 'struct task_struct' has no member named 'latency_nice'; did you mean 'latency_record'?
    #define is_bg_task(p)  (bgtask_latency((p)->latency_nice))
                                                ^
   include/linux/compiler.h:35:19: note: in definition of macro '__branch_check__'
              expect, is_constant); \
                      ^~~~~~~~~~~
>> kernel/sched/core.c:3272:7: note: in expansion of macro 'unlikely'
      if (unlikely(is_bg_task(prev)))
          ^~~~~~~~
   kernel/sched/sched.h:2484:25: note: in expansion of macro 'bgtask_latency'
    #define is_bg_task(p)  (bgtask_latency((p)->latency_nice))
                            ^~~~~~~~~~~~~~
   kernel/sched/core.c:3272:16: note: in expansion of macro 'is_bg_task'
      if (unlikely(is_bg_task(prev)))
                   ^~~~~~~~~~
   In file included from kernel/sched/core.c:9:0:
   kernel/sched/core.c: In function '__sched_setscheduler':
   kernel/sched/core.c:4801:44: error: 'const struct sched_attr' has no member named 'sched_latency_nice'; did you mean 'sched_nice'?
     bool attr_leniency = bgtask_latency(attr->sched_latency_nice);
                                               ^
   kernel/sched/sched.h:2483:31: note: in definition of macro 'bgtask_latency'
    #define bgtask_latency(lat) ((lat) == MAX_LATENCY_NICE)
                                  ^~~
   kernel/sched/sched.h:2483:39: error: 'MAX_LATENCY_NICE' undeclared (first use in this function); did you mean 'MAX_OPTINSN_SIZE'?
    #define bgtask_latency(lat) ((lat) == MAX_LATENCY_NICE)
                                          ^
   kernel/sched/core.c:4801:23: note: in expansion of macro 'bgtask_latency'
     bool attr_leniency = bgtask_latency(attr->sched_latency_nice);
                          ^~~~~~~~~~~~~~
   kernel/sched/sched.h:2484:45: error: 'struct task_struct' has no member named 'latency_nice'; did you mean 'latency_record'?
    #define is_bg_task(p)  (bgtask_latency((p)->latency_nice))
                                                ^
   kernel/sched/sched.h:2483:31: note: in definition of macro 'bgtask_latency'
    #define bgtask_latency(lat) ((lat) == MAX_LATENCY_NICE)
                                  ^~~
   kernel/sched/core.c:5018:6: note: in expansion of macro 'is_bg_task'
     if (is_bg_task(p) != attr_leniency)
         ^~~~~~~~~~

vim +/unlikely +3272 kernel/sched/core.c

  3190	
  3191	/**
  3192	 * finish_task_switch - clean up after a task-switch
  3193	 * @prev: the thread we just switched away from.
  3194	 *
  3195	 * finish_task_switch must be called after the context switch, paired
  3196	 * with a prepare_task_switch call before the context switch.
  3197	 * finish_task_switch will reconcile locking set up by prepare_task_switch,
  3198	 * and do any other architecture-specific cleanup actions.
  3199	 *
  3200	 * Note that we may have delayed dropping an mm in context_switch(). If
  3201	 * so, we finish that here outside of the runqueue lock. (Doing it
  3202	 * with the lock held can cause deadlocks; see schedule() for
  3203	 * details.)
  3204	 *
  3205	 * The context switch have flipped the stack from under us and restored the
  3206	 * local variables which were saved when this task called schedule() in the
  3207	 * past. prev == current is still correct but we need to recalculate this_rq
  3208	 * because prev may have moved to another CPU.
  3209	 */
  3210	static struct rq *finish_task_switch(struct task_struct *prev)
  3211		__releases(rq->lock)
  3212	{
  3213		struct rq *rq = this_rq();
  3214		struct mm_struct *mm = rq->prev_mm;
  3215		long prev_state;
  3216	
  3217		/*
  3218		 * The previous task will have left us with a preempt_count of 2
  3219		 * because it left us after:
  3220		 *
  3221		 *	schedule()
  3222		 *	  preempt_disable();			// 1
  3223		 *	  __schedule()
  3224		 *	    raw_spin_lock_irq(&rq->lock)	// 2
  3225		 *
  3226		 * Also, see FORK_PREEMPT_COUNT.
  3227		 */
  3228		if (WARN_ONCE(preempt_count() != 2*PREEMPT_DISABLE_OFFSET,
  3229			      "corrupted preempt_count: %s/%d/0x%x\n",
  3230			      current->comm, current->pid, preempt_count()))
  3231			preempt_count_set(FORK_PREEMPT_COUNT);
  3232	
  3233		rq->prev_mm = NULL;
  3234	
  3235		/*
  3236		 * A task struct has one reference for the use as "current".
  3237		 * If a task dies, then it sets TASK_DEAD in tsk->state and calls
  3238		 * schedule one last time. The schedule call will never return, and
  3239		 * the scheduled task must drop that reference.
  3240		 *
  3241		 * We must observe prev->state before clearing prev->on_cpu (in
  3242		 * finish_task), otherwise a concurrent wakeup can get prev
  3243		 * running on another CPU and we could rave with its RUNNING -> DEAD
  3244		 * transition, resulting in a double drop.
  3245		 */
  3246		prev_state = prev->state;
  3247		vtime_task_switch(prev);
  3248		perf_event_task_sched_in(prev, current);
  3249		finish_task(prev);
  3250		finish_lock_switch(rq);
  3251		finish_arch_post_lock_switch();
  3252		kcov_finish_switch(current);
  3253	
  3254		fire_sched_in_preempt_notifiers(current);
  3255		/*
  3256		 * When switching through a kernel thread, the loop in
  3257		 * membarrier_{private,global}_expedited() may have observed that
  3258		 * kernel thread and not issued an IPI. It is therefore possible to
  3259		 * schedule between user->kernel->user threads without passing though
  3260		 * switch_mm(). Membarrier requires a barrier after storing to
  3261		 * rq->curr, before returning to userspace, so provide them here:
  3262		 *
  3263		 * - a full memory barrier for {PRIVATE,GLOBAL}_EXPEDITED, implicitly
  3264		 *   provided by mmdrop(),
  3265		 * - a sync_core for SYNC_CORE.
  3266		 */
  3267		if (mm) {
  3268			membarrier_mm_sync_core_before_usermode(mm);
  3269			mmdrop(mm);
  3270		}
  3271		if (unlikely(prev_state == TASK_DEAD)) {
> 3272			if (unlikely(is_bg_task(prev)))
  3273				turbo_sched_put();
  3274	
  3275			if (prev->sched_class->task_dead)
  3276				prev->sched_class->task_dead(prev);
  3277	
  3278			/*
  3279			 * Remove function-return probe instances associated with this
  3280			 * task and put them back on the free list.
  3281			 */
  3282			kprobe_flush_task(prev);
  3283	
  3284			/* Task is done with its stack. */
  3285			put_task_stack(prev);
  3286	
  3287			put_task_struct_rcu_user(prev);
  3288		}
  3289	
  3290		tick_nohz_task_switch();
  3291		return rq;
  3292	}
  3293	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

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

  reply	other threads:[~2020-01-24  2:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21  6:33 [RFC v6 0/5] TurboSched: A scheduler for sustaining Turbo Frequencies for longer durations Parth Shah
2020-01-21  6:33 ` [RFC v6 1/5] sched: Introduce switch to enable TurboSched for task packing Parth Shah
2020-01-22 21:37   ` Tim Chen
2020-01-23  6:35     ` Parth Shah
2020-01-24  2:14   ` kbuild test robot
2020-01-21  6:33 ` [RFC v6 2/5] sched/core: Update turbo_sched count only when required Parth Shah
2020-01-24  2:28   ` kbuild test robot [this message]
2020-01-24  2:36   ` kbuild test robot
2020-01-21  6:33 ` [RFC v6 3/5] sched/fair: Tune task wake-up logic to pack small background tasks on fewer cores Parth Shah
2020-01-24  0:30   ` kbuild test robot
2020-01-24  3:53   ` kbuild test robot
2020-01-27  9:43   ` [RFC PATCH] sched/fair: __pcpu_scope_turbo_sched_mask can be static kbuild test robot
2020-01-21  6:33 ` [RFC v6 4/5] sched/fair: Provide arch hook to find domain for non idle core search scan Parth Shah
2020-01-21  6:33 ` [RFC v6 5/5] powerpc: Set turbo domain to NUMA node for task packing Parth Shah

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=202001241044.2R1aKuJY%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@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.