All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-common:mirror-chromeos-5.10-arcvm 19/30] kernel/sched/fair.c:5712:28: error: 'struct sched_entity' has no member named 'avg'
@ 2023-05-31 19:33 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-05-31 19:33 UTC (permalink / raw)
  To: cros-kernel-buildreports; +Cc: oe-kbuild-all

tree:   https://android.googlesource.com/kernel/common mirror-chromeos-5.10-arcvm
head:   2d9bf29161d378d58600e7897007478e0b156a63
commit: e0515f89730a8597730e11f244a80d37c7970d4a [19/30] CHROMIUM: FROMLIST: sched/fair: Add util_guest for tasks
config: i386-randconfig-i094-20230531 (https://download.01.org/0day-ci/archive/20230601/202306010320.bFBVc6Fl-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build):
        git remote add android-common https://android.googlesource.com/kernel/common
        git fetch --no-tags android-common mirror-chromeos-5.10-arcvm
        git checkout e0515f89730a8597730e11f244a80d37c7970d4a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 olddefconfig
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306010320.bFBVc6Fl-lkp@intel.com/

All errors (new ones prefixed by >>):

   kernel/sched/fair.c:4594:6: warning: no previous prototype for 'set_next_entity' [-Wmissing-prototypes]
    4594 | void set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
         |      ^~~~~~~~~~~~~~~
   In file included from <command-line>:
   kernel/sched/fair.c: In function 'enqueue_task_fair':
>> kernel/sched/fair.c:5712:28: error: 'struct sched_entity' has no member named 'avg'
    5712 |         if (READ_ONCE(p->se.avg.util_guest))
         |                            ^
   include/linux/compiler_types.h:297:23: note: in definition of macro '__compiletime_assert'
     297 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:317:9: note: in expansion of macro '_compiletime_assert'
     317 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |         ^~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |                            ^~~~~~~~~~~~~
   include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/sched/fair.c:5712:13: note: in expansion of macro 'READ_ONCE'
    5712 |         if (READ_ONCE(p->se.avg.util_guest))
         |             ^~~~~~~~~
>> kernel/sched/fair.c:5712:28: error: 'struct sched_entity' has no member named 'avg'
    5712 |         if (READ_ONCE(p->se.avg.util_guest))
         |                            ^
   include/linux/compiler_types.h:297:23: note: in definition of macro '__compiletime_assert'
     297 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:317:9: note: in expansion of macro '_compiletime_assert'
     317 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |         ^~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |                            ^~~~~~~~~~~~~
   include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/sched/fair.c:5712:13: note: in expansion of macro 'READ_ONCE'
    5712 |         if (READ_ONCE(p->se.avg.util_guest))
         |             ^~~~~~~~~
>> kernel/sched/fair.c:5712:28: error: 'struct sched_entity' has no member named 'avg'
    5712 |         if (READ_ONCE(p->se.avg.util_guest))
         |                            ^
   include/linux/compiler_types.h:297:23: note: in definition of macro '__compiletime_assert'
     297 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:317:9: note: in expansion of macro '_compiletime_assert'
     317 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |         ^~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |                            ^~~~~~~~~~~~~
   include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/sched/fair.c:5712:13: note: in expansion of macro 'READ_ONCE'
    5712 |         if (READ_ONCE(p->se.avg.util_guest))
         |             ^~~~~~~~~
>> kernel/sched/fair.c:5712:28: error: 'struct sched_entity' has no member named 'avg'
    5712 |         if (READ_ONCE(p->se.avg.util_guest))
         |                            ^
   include/linux/compiler_types.h:297:23: note: in definition of macro '__compiletime_assert'
     297 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:317:9: note: in expansion of macro '_compiletime_assert'
     317 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |         ^~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |                            ^~~~~~~~~~~~~
   include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/sched/fair.c:5712:13: note: in expansion of macro 'READ_ONCE'
    5712 |         if (READ_ONCE(p->se.avg.util_guest))
         |             ^~~~~~~~~
>> kernel/sched/fair.c:5712:28: error: 'struct sched_entity' has no member named 'avg'
    5712 |         if (READ_ONCE(p->se.avg.util_guest))
         |                            ^
   include/linux/compiler_types.h:297:23: note: in definition of macro '__compiletime_assert'
     297 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:317:9: note: in expansion of macro '_compiletime_assert'
     317 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |         ^~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/sched/fair.c:5712:13: note: in expansion of macro 'READ_ONCE'
    5712 |         if (READ_ONCE(p->se.avg.util_guest))
         |             ^~~~~~~~~
>> kernel/sched/fair.c:5712:28: error: 'struct sched_entity' has no member named 'avg'
    5712 |         if (READ_ONCE(p->se.avg.util_guest))
         |                            ^
   include/linux/compiler_types.h:274:27: note: in definition of macro '__unqual_scalar_typeof'
     274 |                 _Generic((x),                                           \
         |                           ^
   include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE'
      50 |         __READ_ONCE(x);                                                 \
         |         ^~~~~~~~~~~
   kernel/sched/fair.c:5712:13: note: in expansion of macro 'READ_ONCE'
    5712 |         if (READ_ONCE(p->se.avg.util_guest))
         |             ^~~~~~~~~
   In file included from ./arch/x86/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:248,
                    from arch/x86/include/asm/current.h:5,
                    from include/linux/sched.h:12,
                    from kernel/sched/sched.h:5,
                    from kernel/sched/fair.c:23:
>> kernel/sched/fair.c:5712:28: error: 'struct sched_entity' has no member named 'avg'
    5712 |         if (READ_ONCE(p->se.avg.util_guest))
         |                            ^
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   kernel/sched/fair.c:5712:13: note: in expansion of macro 'READ_ONCE'
    5712 |         if (READ_ONCE(p->se.avg.util_guest))
         |             ^~~~~~~~~
--
   kernel/sched/core.c: In function '__setscheduler_task_util':
>> kernel/sched/core.c:1660:14: error: 'struct sched_entity' has no member named 'avg'
    1660 |         p->se.avg.util_guest = attr->sched_util_min;
         |              ^


vim +5712 kernel/sched/fair.c

  5683	
  5684	/*
  5685	 * The enqueue_task method is called before nr_running is
  5686	 * increased. Here we update the fair scheduling stats and
  5687	 * then put the task into the rbtree:
  5688	 */
  5689	static void
  5690	enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
  5691	{
  5692		struct cfs_rq *cfs_rq;
  5693		struct sched_entity *se = &p->se;
  5694		int idle_h_nr_running = task_has_idle_policy(p);
  5695		int task_new = !(flags & ENQUEUE_WAKEUP);
  5696		int should_iowait_boost;
  5697	
  5698		/*
  5699		 * The code below (indirectly) updates schedutil which looks at
  5700		 * the cfs_rq utilization to select a frequency.
  5701		 * Let's add the task's estimated utilization to the cfs_rq's
  5702		 * estimated utilization, before we update schedutil.
  5703		 */
  5704		util_est_enqueue(&rq->cfs, p);
  5705	
  5706		/*
  5707		 * The normal code path for host thread enqueue doesn't take into
  5708		 * account guest task migrations when updating cpufreq util.
  5709		 * So, always update the cpufreq when a vCPU thread has a
  5710		 * non-zero util_guest value.
  5711		 */
> 5712		if (READ_ONCE(p->se.avg.util_guest))
  5713			cpufreq_update_util(rq, 0);
  5714	
  5715		/*
  5716		 * If in_iowait is set, the code below may not trigger any cpufreq
  5717		 * utilization updates, so do it here explicitly with the IOWAIT flag
  5718		 * passed.
  5719		 */
  5720		should_iowait_boost = p->in_iowait;
  5721		trace_android_rvh_set_iowait(p, &should_iowait_boost);
  5722		if (should_iowait_boost)
  5723			cpufreq_update_util(rq, SCHED_CPUFREQ_IOWAIT);
  5724	
  5725		for_each_sched_entity(se) {
  5726			if (se->on_rq)
  5727				break;
  5728			cfs_rq = cfs_rq_of(se);
  5729			enqueue_entity(cfs_rq, se, flags);
  5730	
  5731			cfs_rq->h_nr_running++;
  5732			cfs_rq->idle_h_nr_running += idle_h_nr_running;
  5733	
  5734			/* end evaluation on encountering a throttled cfs_rq */
  5735			if (cfs_rq_throttled(cfs_rq))
  5736				goto enqueue_throttle;
  5737	
  5738			flags = ENQUEUE_WAKEUP;
  5739		}
  5740	
  5741		trace_android_rvh_enqueue_task_fair(rq, p, flags);
  5742		for_each_sched_entity(se) {
  5743			cfs_rq = cfs_rq_of(se);
  5744	
  5745			update_load_avg(cfs_rq, se, UPDATE_TG);
  5746			se_update_runnable(se);
  5747			update_cfs_group(se);
  5748	
  5749			cfs_rq->h_nr_running++;
  5750			cfs_rq->idle_h_nr_running += idle_h_nr_running;
  5751	
  5752			/* end evaluation on encountering a throttled cfs_rq */
  5753			if (cfs_rq_throttled(cfs_rq))
  5754				goto enqueue_throttle;
  5755	
  5756	               /*
  5757	                * One parent has been throttled and cfs_rq removed from the
  5758	                * list. Add it back to not break the leaf list.
  5759	                */
  5760	               if (throttled_hierarchy(cfs_rq))
  5761	                       list_add_leaf_cfs_rq(cfs_rq);
  5762		}
  5763	
  5764		/* At this point se is NULL and we are at root level*/
  5765		add_nr_running(rq, 1);
  5766	
  5767		/*
  5768		 * Since new tasks are assigned an initial util_avg equal to
  5769		 * half of the spare capacity of their CPU, tiny tasks have the
  5770		 * ability to cross the overutilized threshold, which will
  5771		 * result in the load balancer ruining all the task placement
  5772		 * done by EAS. As a way to mitigate that effect, do not account
  5773		 * for the first enqueue operation of new tasks during the
  5774		 * overutilized flag detection.
  5775		 *
  5776		 * A better way of solving this problem would be to wait for
  5777		 * the PELT signals of tasks to converge before taking them
  5778		 * into account, but that is not straightforward to implement,
  5779		 * and the following generally works well enough in practice.
  5780		 */
  5781		if (!task_new)
  5782			update_overutilized_status(rq);
  5783	
  5784	enqueue_throttle:
  5785		if (cfs_bandwidth_used()) {
  5786			/*
  5787			 * When bandwidth control is enabled; the cfs_rq_throttled()
  5788			 * breaks in the above iteration can result in incomplete
  5789			 * leaf list maintenance, resulting in triggering the assertion
  5790			 * below.
  5791			 */
  5792			for_each_sched_entity(se) {
  5793				cfs_rq = cfs_rq_of(se);
  5794	
  5795				if (list_add_leaf_cfs_rq(cfs_rq))
  5796					break;
  5797			}
  5798		}
  5799	
  5800		assert_list_leaf_cfs_rq(rq);
  5801	
  5802		hrtick_update(rq);
  5803	}
  5804	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-31 19:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-31 19:33 [android-common:mirror-chromeos-5.10-arcvm 19/30] kernel/sched/fair.c:5712:28: error: 'struct sched_entity' has no member named 'avg' kernel test robot

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.