All of lore.kernel.org
 help / color / mirror / Atom feed
* [bristot:dl_server_v6 5/5] kernel/sched/fair.c:6732:58: sparse: sparse: incorrect type in argument 2 (different address spaces)
@ 2024-02-15 15:58 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-02-15 15:58 UTC (permalink / raw)
  To: Daniel Bristot de Oliveira; +Cc: oe-kbuild-all

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/bristot/linux dl_server_v6
head:   46a04dc08aec247d43247d411da82c4c78d048c5
commit: 46a04dc08aec247d43247d411da82c4c78d048c5 [5/5] sched/deadline: Account idle time for deferred server
config: x86_64-randconfig-121-20240215 (https://download.01.org/0day-ci/archive/20240215/202402152302.FCYrNlan-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240215/202402152302.FCYrNlan-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402152302.FCYrNlan-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   kernel/sched/fair.c:1143:38: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct task_struct *curr @@     got struct task_struct [noderef] __rcu *curr @@
   kernel/sched/fair.c:1143:38: sparse:     expected struct task_struct *curr
   kernel/sched/fair.c:1143:38: sparse:     got struct task_struct [noderef] __rcu *curr
   kernel/sched/fair.c:1190:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct sched_entity const *se @@     got struct sched_entity [noderef] __rcu * @@
   kernel/sched/fair.c:1190:34: sparse:     expected struct sched_entity const *se
   kernel/sched/fair.c:1190:34: sparse:     got struct sched_entity [noderef] __rcu *
   kernel/sched/fair.c:5925:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/fair.c:5925:22: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/fair.c:5925:22: sparse:    struct task_struct *
   kernel/sched/fair.c:6655:38: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct task_struct *curr @@     got struct task_struct [noderef] __rcu *curr @@
   kernel/sched/fair.c:6655:38: sparse:     expected struct task_struct *curr
   kernel/sched/fair.c:6655:38: sparse:     got struct task_struct [noderef] __rcu *curr
>> kernel/sched/fair.c:6732:58: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct task_struct *p @@     got struct task_struct [noderef] __rcu *curr @@
   kernel/sched/fair.c:6732:58: sparse:     expected struct task_struct *p
   kernel/sched/fair.c:6732:58: sparse:     got struct task_struct [noderef] __rcu *curr
   kernel/sched/fair.c:8290:38: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct task_struct *curr @@     got struct task_struct [noderef] __rcu *curr @@
   kernel/sched/fair.c:8290:38: sparse:     expected struct task_struct *curr
   kernel/sched/fair.c:8290:38: sparse:     got struct task_struct [noderef] __rcu *curr
   kernel/sched/fair.c:8586:38: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct task_struct *curr @@     got struct task_struct [noderef] __rcu *curr @@
   kernel/sched/fair.c:8586:38: sparse:     expected struct task_struct *curr
   kernel/sched/fair.c:8586:38: sparse:     got struct task_struct [noderef] __rcu *curr
   kernel/sched/fair.c: note: in included file:
   kernel/sched/sched.h:2160:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2160:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2160:25: sparse:    struct task_struct *
   kernel/sched/sched.h:2332:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2332:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2332:9: sparse:    struct task_struct *
   kernel/sched/sched.h:2160:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2160:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2160:25: sparse:    struct task_struct *
   kernel/sched/sched.h:2160:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2160:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2160:25: sparse:    struct task_struct *

vim +6732 kernel/sched/fair.c

  6707	
  6708	/*
  6709	 * The enqueue_task method is called before nr_running is
  6710	 * increased. Here we update the fair scheduling stats and
  6711	 * then put the task into the rbtree:
  6712	 */
  6713	static void
  6714	enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
  6715	{
  6716		struct cfs_rq *cfs_rq;
  6717		struct sched_entity *se = &p->se;
  6718		int idle_h_nr_running = task_has_idle_policy(p);
  6719		int task_new = !(flags & ENQUEUE_WAKEUP);
  6720	
  6721		/*
  6722		 * The code below (indirectly) updates schedutil which looks at
  6723		 * the cfs_rq utilization to select a frequency.
  6724		 * Let's add the task's estimated utilization to the cfs_rq's
  6725		 * estimated utilization, before we update schedutil.
  6726		 */
  6727		util_est_enqueue(&rq->cfs, p);
  6728	
  6729		if (!rq->cfs.h_nr_running) {
  6730			/* Account for idle runtime */
  6731			if (!rq->nr_running)
> 6732				dl_server_update_idle_time(rq, rq->curr);
  6733			dl_server_start(&rq->fair_server);
  6734		}
  6735	
  6736		/*
  6737		 * If in_iowait is set, the code below may not trigger any cpufreq
  6738		 * utilization updates, so do it here explicitly with the IOWAIT flag
  6739		 * passed.
  6740		 */
  6741		if (p->in_iowait)
  6742			cpufreq_update_util(rq, SCHED_CPUFREQ_IOWAIT);
  6743	
  6744		for_each_sched_entity(se) {
  6745			if (se->on_rq)
  6746				break;
  6747			cfs_rq = cfs_rq_of(se);
  6748			enqueue_entity(cfs_rq, se, flags);
  6749	
  6750			cfs_rq->h_nr_running++;
  6751			cfs_rq->idle_h_nr_running += idle_h_nr_running;
  6752	
  6753			if (cfs_rq_is_idle(cfs_rq))
  6754				idle_h_nr_running = 1;
  6755	
  6756			/* end evaluation on encountering a throttled cfs_rq */
  6757			if (cfs_rq_throttled(cfs_rq))
  6758				goto enqueue_throttle;
  6759	
  6760			flags = ENQUEUE_WAKEUP;
  6761		}
  6762	
  6763		for_each_sched_entity(se) {
  6764			cfs_rq = cfs_rq_of(se);
  6765	
  6766			update_load_avg(cfs_rq, se, UPDATE_TG);
  6767			se_update_runnable(se);
  6768			update_cfs_group(se);
  6769	
  6770			cfs_rq->h_nr_running++;
  6771			cfs_rq->idle_h_nr_running += idle_h_nr_running;
  6772	
  6773			if (cfs_rq_is_idle(cfs_rq))
  6774				idle_h_nr_running = 1;
  6775	
  6776			/* end evaluation on encountering a throttled cfs_rq */
  6777			if (cfs_rq_throttled(cfs_rq))
  6778				goto enqueue_throttle;
  6779		}
  6780	
  6781		/* At this point se is NULL and we are at root level*/
  6782		add_nr_running(rq, 1);
  6783	
  6784		/*
  6785		 * Since new tasks are assigned an initial util_avg equal to
  6786		 * half of the spare capacity of their CPU, tiny tasks have the
  6787		 * ability to cross the overutilized threshold, which will
  6788		 * result in the load balancer ruining all the task placement
  6789		 * done by EAS. As a way to mitigate that effect, do not account
  6790		 * for the first enqueue operation of new tasks during the
  6791		 * overutilized flag detection.
  6792		 *
  6793		 * A better way of solving this problem would be to wait for
  6794		 * the PELT signals of tasks to converge before taking them
  6795		 * into account, but that is not straightforward to implement,
  6796		 * and the following generally works well enough in practice.
  6797		 */
  6798		if (!task_new)
  6799			update_overutilized_status(rq);
  6800	
  6801	enqueue_throttle:
  6802		assert_list_leaf_cfs_rq(rq);
  6803	
  6804		hrtick_update(rq);
  6805	}
  6806	

-- 
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:[~2024-02-15 15:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-15 15:58 [bristot:dl_server_v6 5/5] kernel/sched/fair.c:6732:58: sparse: sparse: incorrect type in argument 2 (different address spaces) 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.