All of lore.kernel.org
 help / color / mirror / Atom feed
* [arm-de:tip/sched/core_20232906_proxy_exec_v4 9/12] kernel/sched/fair.c:7919:37: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2023-07-13 22:07 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-07-13 22:07 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: oe-kbuild-all, Dietmar Eggemann, Juri Lelli, Connor O'Brien,
	John Stultz

tree:   https://git.gitlab.arm.com/linux-arm/linux-de.git tip/sched/core_20232906_proxy_exec_v4
head:   6a8f4ce70148c468ef287fc38700ed2217f94c43
commit: bc1277464259d65e5044dcd2c2d988170e70e12a [9/12] sched: Split scheduler execution context
config: um-randconfig-r083-20230713 (https://download.01.org/0day-ci/archive/20230714/202307140644.TO5OTKF6-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230714/202307140644.TO5OTKF6-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/202307140644.TO5OTKF6-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   kernel/sched/fair.c:922:36: 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:922:36: sparse:     expected struct task_struct *curr
   kernel/sched/fair.c:922:36: sparse:     got struct task_struct [noderef] __rcu *curr
   kernel/sched/fair.c:967:32: 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:967:32: sparse:     expected struct sched_entity const *se
   kernel/sched/fair.c:967:32: sparse:     got struct sched_entity [noderef] __rcu *
   kernel/sched/fair.c:7885:36: 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:7885:36: sparse:     expected struct task_struct *curr
   kernel/sched/fair.c:7885:36: sparse:     got struct task_struct [noderef] __rcu *curr
>> kernel/sched/fair.c:7919:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct task_struct *tsk @@     got struct task_struct [noderef] __rcu *curr @@
   kernel/sched/fair.c:7919:37: sparse:     expected struct task_struct *tsk
   kernel/sched/fair.c:7919:37: sparse:     got struct task_struct [noderef] __rcu *curr
   kernel/sched/fair.c:8183: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:8183:38: sparse:     expected struct task_struct *curr
   kernel/sched/fair.c:8183:38: sparse:     got struct task_struct [noderef] __rcu *curr
   kernel/sched/fair.c:6177:35: sparse: sparse: marked inline, but without a definition
   kernel/sched/fair.c: note: in included file:
   kernel/sched/sched.h:2280:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2280:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2280:9: sparse:    struct task_struct *
   kernel/sched/sched.h:2116:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2116:32: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2116:32: sparse:    struct task_struct *
   kernel/sched/sched.h:2116:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2116:32: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2116:32: sparse:    struct task_struct *

vim +7919 kernel/sched/fair.c

  7879	
  7880	/*
  7881	 * Preempt the current task with a newly woken task if needed:
  7882	 */
  7883	static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_flags)
  7884	{
  7885		struct task_struct *curr = rq_selected(rq);
  7886		struct sched_entity *se = &curr->se, *pse = &p->se;
  7887		struct cfs_rq *cfs_rq = task_cfs_rq(curr);
  7888		int scale = cfs_rq->nr_running >= sched_nr_latency;
  7889		int next_buddy_marked = 0;
  7890		int cse_is_idle, pse_is_idle;
  7891	
  7892		if (unlikely(se == pse))
  7893			return;
  7894	
  7895		/*
  7896		 * This is possible from callers such as attach_tasks(), in which we
  7897		 * unconditionally check_preempt_curr() after an enqueue (which may have
  7898		 * lead to a throttle).  This both saves work and prevents false
  7899		 * next-buddy nomination below.
  7900		 */
  7901		if (unlikely(throttled_hierarchy(cfs_rq_of(pse))))
  7902			return;
  7903	
  7904		if (sched_feat(NEXT_BUDDY) && scale && !(wake_flags & WF_FORK)) {
  7905			set_next_buddy(pse);
  7906			next_buddy_marked = 1;
  7907		}
  7908	
  7909		/*
  7910		 * We can come here with TIF_NEED_RESCHED already set from new task
  7911		 * wake up path.
  7912		 *
  7913		 * Note: this also catches the edge-case of curr being in a throttled
  7914		 * group (e.g. via set_curr_task), since update_curr() (in the
  7915		 * enqueue of curr) will have resulted in resched being set.  This
  7916		 * prevents us from potentially nominating it as a false LAST_BUDDY
  7917		 * below.
  7918		 */
> 7919		if (test_tsk_need_resched(rq->curr))
  7920			return;
  7921	
  7922		/* Idle tasks are by definition preempted by non-idle tasks. */
  7923		if (unlikely(task_has_idle_policy(curr)) &&
  7924		    likely(!task_has_idle_policy(p)))
  7925			goto preempt;
  7926	
  7927		/*
  7928		 * Batch and idle tasks do not preempt non-idle tasks (their preemption
  7929		 * is driven by the tick):
  7930		 */
  7931		if (unlikely(p->policy != SCHED_NORMAL) || !sched_feat(WAKEUP_PREEMPTION))
  7932			return;
  7933	
  7934		find_matching_se(&se, &pse);
  7935		WARN_ON_ONCE(!pse);
  7936	
  7937		cse_is_idle = se_is_idle(se);
  7938		pse_is_idle = se_is_idle(pse);
  7939	
  7940		/*
  7941		 * Preempt an idle group in favor of a non-idle group (and don't preempt
  7942		 * in the inverse case).
  7943		 */
  7944		if (cse_is_idle && !pse_is_idle)
  7945			goto preempt;
  7946		if (cse_is_idle != pse_is_idle)
  7947			return;
  7948	
  7949		update_curr(cfs_rq_of(se));
  7950		if (wakeup_preempt_entity(se, pse) == 1) {
  7951			/*
  7952			 * Bias pick_next to pick the sched entity that is
  7953			 * triggering this preemption.
  7954			 */
  7955			if (!next_buddy_marked)
  7956				set_next_buddy(pse);
  7957			goto preempt;
  7958		}
  7959	
  7960		return;
  7961	
  7962	preempt:
  7963		resched_curr(rq);
  7964		/*
  7965		 * Only set the backward buddy when the current task is still
  7966		 * on the rq. This can happen when a wakeup gets interleaved
  7967		 * with schedule on the ->pre_schedule() or idle_balance()
  7968		 * point, either of which can * drop the rq lock.
  7969		 *
  7970		 * Also, during early boot the idle thread is in the fair class,
  7971		 * for obvious reasons its a bad idea to schedule back to it.
  7972		 */
  7973		if (unlikely(!se->on_rq || curr == rq->idle))
  7974			return;
  7975	
  7976		if (sched_feat(LAST_BUDDY) && scale && entity_is_task(se))
  7977			set_last_buddy(se);
  7978	}
  7979	

-- 
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-07-13 22:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-13 22:07 [arm-de:tip/sched/core_20232906_proxy_exec_v4 9/12] kernel/sched/fair.c:7919:37: sparse: sparse: incorrect type in argument 1 (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.