Re: [PATCH] sched: Fix new task's load avg removed from source CPU in

From: kbuild test robot
Date: Wed Dec 16 2015 - 02:57:04 EST


Hi Yuyang,

[auto build test WARNING on tip/sched/core]
[also build test WARNING on v4.4-rc5 next-20151216]

url: https://github.com/0day-ci/linux/commits/Yuyang-Du/sched-Fix-new-task-s-load-avg-removed-from-source-CPU-in/20151216-154529
config: i386-randconfig-x000-12141102 (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All warnings (new ones prefixed by >>):

kernel/sched/fair.c: In function 'remove_entity_load_avg':
>> kernel/sched/fair.c:2919:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
u64 last_update_time_copy;
^

vim +2919 kernel/sched/fair.c

9ee474f5 Paul Turner 2012-10-04 2903 /*
9d89c257 Yuyang Du 2015-07-15 2904 * Task first catches up with cfs_rq, and then subtract
9d89c257 Yuyang Du 2015-07-15 2905 * itself from the cfs_rq (task must be off the queue now).
9ee474f5 Paul Turner 2012-10-04 2906 */
9d89c257 Yuyang Du 2015-07-15 2907 void remove_entity_load_avg(struct sched_entity *se)
2dac754e Paul Turner 2012-10-04 2908 {
9d89c257 Yuyang Du 2015-07-15 2909 struct cfs_rq *cfs_rq = cfs_rq_of(se);
9d89c257 Yuyang Du 2015-07-15 2910 u64 last_update_time;
9d89c257 Yuyang Du 2015-07-15 2911
a13869ac Yuyang Du 2015-12-16 2912 /*
a13869ac Yuyang Du 2015-12-16 2913 * Newly created task should not be removed from the source CPU before migration
a13869ac Yuyang Du 2015-12-16 2914 */
a13869ac Yuyang Du 2015-12-16 2915 if (se->avg.last_update_time == 0)
a13869ac Yuyang Du 2015-12-16 2916 return;
a13869ac Yuyang Du 2015-12-16 2917
9d89c257 Yuyang Du 2015-07-15 2918 #ifndef CONFIG_64BIT
9d89c257 Yuyang Du 2015-07-15 @2919 u64 last_update_time_copy;
9ee474f5 Paul Turner 2012-10-04 2920
9d89c257 Yuyang Du 2015-07-15 2921 do {
9d89c257 Yuyang Du 2015-07-15 2922 last_update_time_copy = cfs_rq->load_last_update_time_copy;
9d89c257 Yuyang Du 2015-07-15 2923 smp_rmb();
9d89c257 Yuyang Du 2015-07-15 2924 last_update_time = cfs_rq->avg.last_update_time;
9d89c257 Yuyang Du 2015-07-15 2925 } while (last_update_time != last_update_time_copy);
9d89c257 Yuyang Du 2015-07-15 2926 #else
9d89c257 Yuyang Du 2015-07-15 2927 last_update_time = cfs_rq->avg.last_update_time;

:::::: The code at line 2919 was first introduced by commit
:::::: 9d89c257dfb9c51a532d69397f6eed75e5168c35 sched/fair: Rewrite runnable load and utilization average tracking

:::::: TO: Yuyang Du <yuyang.du@xxxxxxxxx>
:::::: CC: Ingo Molnar <mingo@xxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data