All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [peterz-queue:sched/core-sched 10/11] kernel/sched/core.c:5262 pick_next_task() error: we previously assumed 'next' could be null (see line 5258)
Date: Fri, 08 Jan 2021 22:32:10 +0800	[thread overview]
Message-ID: <202101082200.ouiinQm1-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
TO: "Joel Fernandes (Google)" <joel@joelfernandes.org>
CC: Peter Zijlstra <peterz@infradead.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core-sched
head:   ead81f232b5b31ab6240a719ff3bad564c3f0e4c
commit: 6f7eefbb382e8c5fa56180f8cd5becb5f882a3d6 [10/11] sched/fair: Snapshot the min_vruntime of CPUs on force idle
:::::: branch date: 24 hours ago
:::::: commit date: 24 hours ago
config: x86_64-randconfig-m001-20210108 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
kernel/sched/core.c:5262 pick_next_task() error: we previously assumed 'next' could be null (see line 5258)

vim +/next +5262 kernel/sched/core.c

6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5175) 
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5176  static struct task_struct *
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5177  pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5178  {
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5179  	struct task_struct *next, *max = NULL;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5180  	const struct sched_class *class;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5181  	const struct cpumask *smt_mask;
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5182) 	bool fi_before = false;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5183  	bool need_sync;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5184  	int i, j, cpu;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5185  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5186  	if (!sched_core_enabled(rq))
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5187  		return __pick_next_task(rq, prev, rf);
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5188  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5189  	cpu = cpu_of(rq);
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5190  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5191  	/* Stopper task is switching into idle, no need core-wide selection. */
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5192  	if (cpu_is_offline(cpu)) {
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5193  		/*
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5194  		 * Reset core_pick so that we don't enter the fastpath when
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5195  		 * coming online. core_pick would already be migrated to
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5196  		 * another cpu during offline.
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5197  		 */
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5198  		rq->core_pick = NULL;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5199  		return __pick_next_task(rq, prev, rf);
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5200  	}
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5201  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5202  	/*
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5203  	 * If there were no {en,de}queues since we picked (IOW, the task
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5204  	 * pointers are all still valid), and we haven't scheduled the last
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5205  	 * pick yet, do so now.
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5206  	 *
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5207  	 * rq->core_pick can be NULL if no selection was made for a CPU because
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5208  	 * it was either offline or went offline during a sibling's core-wide
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5209  	 * selection. In this case, do a core-wide selection.
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5210  	 */
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5211  	if (rq->core->core_pick_seq == rq->core->core_task_seq &&
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5212  	    rq->core->core_pick_seq != rq->core_sched_seq &&
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5213  	    rq->core_pick) {
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5214  		WRITE_ONCE(rq->core_sched_seq, rq->core->core_pick_seq);
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5215  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5216  		next = rq->core_pick;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5217  		if (next != prev) {
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5218  			put_prev_task(rq, prev);
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5219  			set_next_task(rq, next);
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5220  		}
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5221  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5222  		rq->core_pick = NULL;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5223  		return next;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5224  	}
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5225  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5226  	put_prev_task_balance(rq, prev, rf);
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5227  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5228  	smt_mask = cpu_smt_mask(cpu);
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5229) 	need_sync = !!rq->core->core_cookie;
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5230) 
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5231) 	/* reset state */
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5232) 	rq->core->core_cookie = 0UL;
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5233) 	if (rq->core->core_forceidle) {
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5234) 		need_sync = true;
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5235) 		fi_before = true;
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5236) 		rq->core->core_forceidle = false;
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5237) 	}
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5238  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5239  	/*
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5240  	 * core->core_task_seq, core->core_pick_seq, rq->core_sched_seq
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5241  	 *
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5242  	 * @task_seq guards the task state ({en,de}queues)
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5243  	 * @pick_seq is the @task_seq we did a selection on
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5244  	 * @sched_seq is the @pick_seq we scheduled
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5245  	 *
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5246  	 * However, preemptions can cause multiple picks on the same task set.
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5247  	 * 'Fix' this by also increasing @task_seq for every pick.
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5248  	 */
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5249  	rq->core->core_task_seq++;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5250  
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5251) 	/*
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5252) 	 * Optimize for common case where this CPU has no cookies
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5253) 	 * and there are no cookied tasks running on siblings.
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5254) 	 */
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5255) 	if (!need_sync) {
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5256) 		for_each_class(class) {
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5257) 			next = class->pick_task(rq);
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17 @5258) 			if (next)
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5259) 				break;
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5260) 		}
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5261) 
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17 @5262) 		if (!next->core_cookie) {
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5263) 			rq->core_pick = NULL;
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5264) 			/*
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5265) 			 * For robustness, update the min_vruntime_fi for
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5266) 			 * unconstrained picks as well.
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5267) 			 */
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5268) 			WARN_ON_ONCE(fi_before);
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5269) 			task_vruntime_update(rq, next, false);
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5270) 			goto done;
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5271) 		}
651b592b4b80bae Vineeth Pillai          2020-11-17  5272  	}
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5273) 
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5274  	for_each_cpu(i, smt_mask) {
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5275  		struct rq *rq_i = cpu_rq(i);
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5276  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5277  		rq_i->core_pick = NULL;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5278  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5279  		if (i != cpu)
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5280  			update_rq_clock(rq_i);
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5281  	}
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5282  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5283  	/*
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5284  	 * Try and select tasks for each sibling in decending sched_class
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5285  	 * order.
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5286  	 */
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5287  	for_each_class(class) {
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5288  again:
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5289  		for_each_cpu_wrap(i, smt_mask, cpu) {
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5290  			struct rq *rq_i = cpu_rq(i);
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5291  			struct task_struct *p;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5292  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5293  			if (rq_i->core_pick)
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5294  				continue;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5295  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5296  			/*
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5297  			 * If this sibling doesn't yet have a suitable task to
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5298  			 * run; ask for the most elegible task, given the
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5299  			 * highest priority task already selected for this
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5300  			 * core.
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5301  			 */
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5302) 			p = pick_task(rq_i, class, max, fi_before);
d7bbf5f9ab91135 Joel Fernandes (Google  2020-11-17  5303) 			if (!p)
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5304  				continue;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5305  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5306  			rq_i->core_pick = p;
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5307) 			if (rq_i->idle == p && rq_i->nr_running) {
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5308) 				rq->core->core_forceidle = true;
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5309) 				if (!fi_before)
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5310) 					rq->core->core_forceidle_seq++;
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5311) 			}
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5312  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5313  			/*
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5314  			 * If this new candidate is of higher priority than the
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5315  			 * previous; and they're incompatible; we need to wipe
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5316  			 * the slate and start over. pick_task makes sure that
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5317  			 * p's priority is more than max if it doesn't match
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5318  			 * max's cookie.
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5319  			 *
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5320  			 * NOTE: this is a linear max-filter and is thus bounded
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5321  			 * in execution time.
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5322  			 */
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5323  			if (!max || !cookie_match(max, p)) {
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5324  				struct task_struct *old_max = max;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5325  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5326  				rq->core->core_cookie = p->core_cookie;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5327  				max = p;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5328  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5329  				if (old_max) {
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5330) 					rq->core->core_forceidle = false;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5331  					for_each_cpu(j, smt_mask) {
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5332  						if (j == i)
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5333  							continue;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5334  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5335  						cpu_rq(j)->core_pick = NULL;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5336  					}
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5337  					goto again;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5338  				}
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5339  			}
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5340  		}
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5341  	}
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5342  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5343  	rq->core->core_pick_seq = rq->core->core_task_seq;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5344  	next = rq->core_pick;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5345  	rq->core_sched_seq = rq->core->core_pick_seq;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5346  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5347  	/* Something should have been selected for current CPU */
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5348  	WARN_ON_ONCE(!next);
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5349  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5350  	/*
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5351  	 * Reschedule siblings
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5352  	 *
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5353  	 * NOTE: L1TF -- at this point we're no longer running the old task and
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5354  	 * sending an IPI (below) ensures the sibling will no longer be running
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5355  	 * their task. This ensures there is no inter-sibling overlap between
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5356  	 * non-matching user state.
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5357  	 */
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5358  	for_each_cpu(i, smt_mask) {
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5359  		struct rq *rq_i = cpu_rq(i);
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5360  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5361  		/*
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5362  		 * An online sibling might have gone offline before a task
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5363  		 * could be picked for it, or it might be offline but later
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5364  		 * happen to come online, but its too late and nothing was
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5365  		 * picked for it.  That's Ok - it will pick tasks for itself,
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5366  		 * so ignore it.
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5367  		 */
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5368  		if (!rq_i->core_pick)
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5369  			continue;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5370  
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5371) 		/*
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5372) 		 * Update for new !FI->FI transitions, or if continuing to be in !FI:
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5373) 		 * fi_before     fi      update?
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5374) 		 *  0            0       1
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5375) 		 *  0            1       1
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5376) 		 *  1            0       1
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5377) 		 *  1            1       0
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5378) 		 */
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5379) 		if (!(fi_before && rq->core->core_forceidle))
6f7eefbb382e8c5 Joel Fernandes (Google  2020-11-17  5380) 			task_vruntime_update(rq_i, rq_i->core_pick, rq->core->core_forceidle);
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5381  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5382  		if (i == cpu) {
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5383  			rq_i->core_pick = NULL;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5384  			continue;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5385  		}
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5386  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5387  		/* Did we break L1TF mitigation requirements? */
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5388  		WARN_ON_ONCE(!cookie_match(next, rq_i->core_pick));
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5389  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5390  		if (rq_i->curr == rq_i->core_pick) {
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5391  			rq_i->core_pick = NULL;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5392  			continue;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5393  		}
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5394  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5395  		resched_curr(rq_i);
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5396  	}
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5397  
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5398  done:
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5399  	set_next_task(rq, next);
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5400  	return next;
2d8ac06b6ca3a0f Peter Zijlstra          2020-11-17  5401  }
2230396a2aab443 Peter Zijlstra          2020-11-17  5402  

:::::: The code at line 5262 was first introduced by commit
:::::: d7bbf5f9ab91135f8e39144df4189ae963e63cf8 sched: Simplify the core pick loop for optimized case

:::::: TO: Joel Fernandes (Google) <joel@joelfernandes.org>
:::::: CC: Peter Zijlstra <peterz@infradead.org>

---
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: 30068 bytes --]

             reply	other threads:[~2021-01-08 14:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08 14:32 kernel test robot [this message]
2021-01-11 10:41 [peterz-queue:sched/core-sched 10/11] kernel/sched/core.c:5262 pick_next_task() error: we previously assumed 'next' could be null (see line 5258) Dan Carpenter
2021-01-11 10:41 ` Dan Carpenter

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=202101082200.ouiinQm1-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.