tree:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core-sched
head: b417ddaf222294bcc35e9857105ab37d9b0fd715
commit: 7841ce54261f3c407cf52de13712261521ae9403 [27/29] sched: Cgroup core-scheduling
interface
config: powerpc64-randconfig-r002-20210414 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
9829f5e6b1bca9b61efc629770d28bb9014dec45)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
#
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue sched/core-sched
git checkout 7841ce54261f3c407cf52de13712261521ae9403
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/sched/core.c:10:
In file included from include/trace/events/sched.h:740:
In file included from include/trace/define_trace.h:102:
In file included from include/trace/trace_events.h:21:
In file included from include/linux/trace_events.h:9:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:97:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/sched/core.c:10:
In file included from include/trace/events/sched.h:740:
In file included from include/trace/define_trace.h:102:
In file included from include/trace/trace_events.h:21:
In file included from include/linux/trace_events.h:9:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:99:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/sched/core.c:10:
In file included from include/trace/events/sched.h:740:
In file included from include/trace/define_trace.h:102:
In file included from include/trace/trace_events.h:21:
In file included from include/linux/trace_events.h:9:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:101:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/sched/core.c:10:
In file included from include/trace/events/sched.h:740:
In file included from include/trace/define_trace.h:102:
In file included from include/trace/trace_events.h:21:
In file included from include/linux/trace_events.h:9:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:103:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
kernel/sched/core.c:9359:2: error: implicit declaration of function
'sched_core_cgroup_free' [-Werror,-Wimplicit-function-declaration]
sched_core_cgroup_free(tg);
^
kernel/sched/core.c:9359:2: note: did you mean 'sched_core_free'?
include/linux/sched.h:2176:20: note: 'sched_core_free' declared here
static inline void sched_core_free(struct task_struct *tsk) { }
^
kernel/sched/core.c:9404:2: error: implicit declaration of function
'sched_core_cgroup_online' [-Werror,-Wimplicit-function-declaration]
sched_core_cgroup_online(parent, tg);
^
> kernel/sched/core.c:9497:11: error: implicit declaration of
function 'sched_core_cgroup_cookie' [-Werror,-Wimplicit-function-declaration]
cookie = sched_core_cgroup_cookie(tsk->sched_task_group);
^
kernel/sched/core.c:9498:11: error: implicit declaration of function
'sched_core_update_cookie' [-Werror,-Wimplicit-function-declaration]
cookie = sched_core_update_cookie(tsk, cookie);
^
kernel/sched/core.c:9498:11: note: did you mean 'sched_core_cgroup_cookie'?
kernel/sched/core.c:9497:11: note: 'sched_core_cgroup_cookie' declared here
cookie = sched_core_cgroup_cookie(tsk->sched_task_group);
^
kernel/sched/core.c:9499:2: error: implicit declaration of function
'sched_core_put_cookie' [-Werror,-Wimplicit-function-declaration]
sched_core_put_cookie(cookie);
^
kernel/sched/core.c:9499:2: note: did you mean 'sched_core_update_cookie'?
kernel/sched/core.c:9498:11: note: 'sched_core_update_cookie' declared here
cookie = sched_core_update_cookie(tsk, cookie);
^
12 warnings and 5 errors generated.
vim +/sched_core_cgroup_cookie +9497 kernel/sched/core.c
9353
9354 static void sched_free_group(struct task_group *tg)
9355 {
9356 free_fair_sched_group(tg);
9357 free_rt_sched_group(tg);
9358 autogroup_free(tg);
9359 sched_core_cgroup_free(tg);
9360 kmem_cache_free(task_group_cache, tg);
9361 }
9362
9363 /* allocate runqueue etc for a new task group */
9364 struct task_group *sched_create_group(struct task_group *parent)
9365 {
9366 struct task_group *tg;
9367
9368 tg = kmem_cache_alloc(task_group_cache, GFP_KERNEL | __GFP_ZERO);
9369 if (!tg)
9370 return ERR_PTR(-ENOMEM);
9371
9372 if (!alloc_fair_sched_group(tg, parent))
9373 goto err;
9374
9375 if (!alloc_rt_sched_group(tg, parent))
9376 goto err;
9377
9378 alloc_uclamp_sched_group(tg, parent);
9379
9380 return tg;
9381
9382 err:
9383 sched_free_group(tg);
9384 return ERR_PTR(-ENOMEM);
9385 }
9386
9387 void sched_online_group(struct task_group *tg, struct task_group *parent)
9388 {
9389 unsigned long flags;
9390
9391 spin_lock_irqsave(&task_group_lock, flags);
9392 list_add_rcu(&tg->list, &task_groups);
9393
9394 /* Root should already exist: */
9395 WARN_ON(!parent);
9396
9397 tg->parent = parent;
9398 INIT_LIST_HEAD(&tg->children);
9399 list_add_rcu(&tg->siblings, &parent->children);
9400 spin_unlock_irqrestore(&task_group_lock, flags);
9401
9402 online_fair_sched_group(tg);
9403
9404 sched_core_cgroup_online(parent, tg);
9405 }
9406
9407 /* rcu callback to free various structures associated with a task group */
9408 static void sched_free_group_rcu(struct rcu_head *rhp)
9409 {
9410 /* Now it should be safe to free those cfs_rqs: */
9411 sched_free_group(container_of(rhp, struct task_group, rcu));
9412 }
9413
9414 void sched_destroy_group(struct task_group *tg)
9415 {
9416 /* Wait for possible concurrent references to cfs_rqs complete: */
9417 call_rcu(&tg->rcu, sched_free_group_rcu);
9418 }
9419
9420 void sched_offline_group(struct task_group *tg)
9421 {
9422 unsigned long flags;
9423
9424 /* End participation in shares distribution: */
9425 unregister_fair_sched_group(tg);
9426
9427 spin_lock_irqsave(&task_group_lock, flags);
9428 list_del_rcu(&tg->list);
9429 list_del_rcu(&tg->siblings);
9430 spin_unlock_irqrestore(&task_group_lock, flags);
9431 }
9432
9433 static void sched_change_group(struct task_struct *tsk, int type)
9434 {
9435 struct task_group *tg;
9436
9437 /*
9438 * All callers are synchronized by task_rq_lock(); we do not use RCU
9439 * which is pointless here. Thus, we pass "true" to task_css_check()
9440 * to prevent lockdep warnings.
9441 */
9442 tg = container_of(task_css_check(tsk, cpu_cgrp_id, true),
9443 struct task_group, css);
9444 tg = autogroup_task_group(tsk, tg);
9445 tsk->sched_task_group = tg;
9446
9447 #ifdef CONFIG_FAIR_GROUP_SCHED
9448 if (tsk->sched_class->task_change_group)
9449 tsk->sched_class->task_change_group(tsk, type);
9450 else
9451 #endif
9452 set_task_rq(tsk, task_cpu(tsk));
9453 }
9454
9455 /*
9456 * Change task's runqueue when it moves between groups.
9457 *
9458 * The caller of this function should have put the task in its new group by
9459 * now. This function just updates tsk->se.cfs_rq and tsk->se.parent to
reflect
9460 * its new group.
9461 */
9462 void sched_move_task(struct task_struct *tsk)
9463 {
9464 int queued, running, queue_flags =
9465 DEQUEUE_SAVE | DEQUEUE_MOVE | DEQUEUE_NOCLOCK;
9466 unsigned long cookie;
9467 struct rq_flags rf;
9468 struct rq *rq;
9469
9470 rq = task_rq_lock(tsk, &rf);
9471 update_rq_clock(rq);
9472
9473 running = task_current(rq, tsk);
9474 queued = task_on_rq_queued(tsk);
9475
9476 if (queued)
9477 dequeue_task(rq, tsk, queue_flags);
9478 if (running)
9479 put_prev_task(rq, tsk);
9480
9481 sched_change_group(tsk, TASK_MOVE_GROUP);
9482
9483 if (queued)
9484 enqueue_task(rq, tsk, queue_flags);
9485 if (running) {
9486 set_next_task(rq, tsk);
9487 /*
9488 * After changing group, the running task may have joined a
9489 * throttled one but it's still the running task. Trigger a
9490 * resched to make sure that task can still run.
9491 */
9492 resched_curr(rq);
9493 }
9494
9495 task_rq_unlock(rq, tsk, &rf);
9496
9497 cookie = sched_core_cgroup_cookie(tsk->sched_task_group);
9498 cookie = sched_core_update_cookie(tsk, cookie);
9499 sched_core_put_cookie(cookie);
9500 }
9501
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org