more sched.h reorganization
Subsystems (13)
cover more sched.h reorganization
Ingo,
These two patches continue the sched.h reorganizatin. The first is a simple move of the RR_TIMESLICE definition from sysctl to rt.h.
The second moves the clock-related items from sched.h into sched/clock.h
Tested against allmodconfigs for x86_64, arm, mips, alpha and ia64.
Clark Williams (2):
sched: move RR_TIMESLICE from sysctl.h to rt.h
sched: move clock definitions from sched.h to new file
arch/arm/kernel/sched_clock.c | 2 +- arch/x86/kernel/cpu/amd.c | 2 +- arch/x86/kernel/cpu/intel.c | 2 +- arch/x86/kernel/tsc.c | 2 +- drivers/acpi/apei/ghes.c | 1 + drivers/acpi/processor_idle.c | 2 +- fs/bio-integrity.c | 1 + include/linux/blkdev.h | 2 +- include/linux/ftrace.h | 2 +- include/linux/sched.h | 61 ------------------------------------------- include/linux/sched/rt.h | 6 +++++ include/linux/sched/sysctl.h | 6 ----- init/do_mounts.c | 2 +- init/do_mounts_initrd.c | 2 +- init/main.c | 2 +- kernel/events/core.c | 1 + kernel/lockdep.c | 2 +- kernel/printk.c | 1 + kernel/rcutorture.c | 2 +- kernel/sched/sched.h | 1 + kernel/time/tick-sched.c | 2 +- kernel/trace/ring_buffer.c | 1 + kernel/trace/trace_clock.c | 2 +- kernel/watchdog.c | 1 + lib/plist.c | 2 +- 25 files changed, 28 insertions(+), 82 deletions(-)
Signature · 1 line
1.8.1.2
PATCH 1/2 sched: move RR_TIMESLICE from sysctl.h to rt.h
--- include/linux/sched/rt.h | 6 ++++++ include/linux/sched/sysctl.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-)
include/linux/sched/rt.h +6 -0
@@ -55,4 +55,10 @@ static inline bool tsk_is_pi_blocked(struct task_struct *tsk)extern void normalize_rt_tasks (void ); +/* +* default timeslice is 100 msecs (used only for SCHED_RR tasks). +* Timeslices get refilled after they expire. +*/ +#define RR_TIMESLICE (100 * HZ / 1000) +#endif /* _SCHED_RT_H */
include/linux/sched/sysctl.h +0 -6
@@ -91,12 +91,6 @@ extern unsigned int sysctl_sched_cfs_bandwidth_slice;extern unsigned int sysctl_sched_autogroup_enabled;#endif -/* -* default timeslice is 100 msecs (used only for SCHED_RR tasks). -* Timeslices get refilled after they expire. -*/ -#define RR_TIMESLICE (100 * HZ / 1000) -extern int sched_rr_timeslice; extern int sched_rr_handler(struct ctl_table *table, int write,
Signature · 1 line
1.8.1.2
Re: [PATCH 1/2] sched: move RR_TIMESLICE from sysctl.h to rt.h
Quoted 2 lines · Clark Williams
Signed-off-by Clark Williams <[email protected]>---
This happens to unbreak the ia64 build which is currently grumbling about:
arch/ia64/kernel/init_task.c:38: error: 'RR_TIMESLICE' undeclared here (not in a function)
So I'd be happy if it got applied directly to Linus tree before I get too big of a bisection gap.
Quoted 40 lines
include/linux/sched/rt.h | 6 ++++++ include/linux/sched/sysctl.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-)include/linux/sched/rt.h +6
-0@@ -55,4 +55,10 @@ static inline bool tsk_is_pi_blocked(struct task_struct *tsk)extern void normalize_rt_tasks (void ); +/* +* default timeslice is 100 msecs (used only for SCHED_RR tasks). +* Timeslices get refilled after they expire. +*/ +#define RR_TIMESLICE (100 * HZ / 1000) +#endif /* _SCHED_RT_H */ include/linux/sched/sysctl.h +0
-7@@ -91,12 +91,6 @@ extern unsigned int sysctl_sched_cfs_bandwidth_slice;extern unsigned int sysctl_sched_autogroup_enabled;#endif -/* -* default timeslice is 100 msecs (used only for SCHED_RR tasks). -* Timeslices get refilled after they expire. -*/ -#define RR_TIMESLICE (100 * HZ / 1000) -extern int sched_rr_timeslice; extern int sched_rr_handler(struct ctl_table *table, int write, --1.8.1.2
--
Ingo Molnar
maintainerRe: [PATCH 1/2] sched: move RR_TIMESLICE from sysctl.h to rt.h
Quoted 5 lines · Tony Luck
Quoted 2 lines · Clark Williams
Signed-off-by Clark Williams <[email protected]>---
Quoted 7 lines
This happens to unbreak the ia64 build which is currently grumbling about:
arch/ia64/kernel/init_task.c:38: error: 'RR_TIMESLICE' undeclared here (not in a function)So I'd be happy if it got applied directly to Linus tree before I get too big of a bisection gap.
Hm, didn't it get fixed via the commit below?
Thanks,
Ingo
--------------------->
commit 77852fea6e2442a0e654a9292060489895de18c7
Author: Ingo Molnar <[email protected]> Date: Sat Feb 16 09:46:48 2013 +0100
sched/rt: Add <linux/sched/rt.h> header to <linux/init_task.h>
IA64 relied on it through sched.h inclusion:
arch/ia64/kernel/init_task.c:38:11: error: 'MAX_PRIO' undeclared here (not in a function) arch/ia64/kernel/init_task.c:38:11: error: 'RR_TIMESLICE' undeclared here (not in a function)
Re: [PATCH 1/2] sched: move RR_TIMESLICE from sysctl.h to rt.h
Quoted 1 line · Ingo Molnar
Hm, didn't it get fixed via the commit below?
Together with moving RR_TIMESLICE to rt.h ... ia64 is good. But I see commit 77852fea6e24 in the tree I built and still see the RR_TIMESLICE errors.
I don't see the MAX_PRIO half of the problem - so it did help a bit.
-Tony
tip-bot for Clark Williams
merge bot[tip:sched/urgent] sched: Move RR_TIMESLICE from sysctl.h to rt.h
In reply to Clark Williamssched: Move RR_TIMESLICE from sysctl.h to rt.h
Commit-ID: 45ebd3945b2a3cf4eb89d5fb0090a3cb71af7973 Gitweb: http://git.kernel.org/tip/45ebd3945b2a3cf4eb89d5fb0090a3cb71af7973 Author: Clark Williams <[email protected]> AuthorDate: Wed, 20 Feb 2013 09:19:09 -0600 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 22 Feb 2013 10:44:46 +0100
sched: Move RR_TIMESLICE from sysctl.h to rt.h
This fixes an ia64 build bug reported by Tony Luck.
--- include/linux/sched/rt.h | 6 ++++++ include/linux/sched/sysctl.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-)
include/linux/sched/rt.h +6 -0
@@ -55,4 +55,10 @@ static inline bool tsk_is_pi_blocked(struct task_struct *tsk)extern void normalize_rt_tasks (void ); +/* +* default timeslice is 100 msecs (used only for SCHED_RR tasks). +* Timeslices get refilled after they expire. +*/ +#define RR_TIMESLICE (100 * HZ / 1000) +#endif /* _SCHED_RT_H */
include/linux/sched/sysctl.h +0 -6
@@ -91,12 +91,6 @@ extern unsigned int sysctl_sched_cfs_bandwidth_slice;extern unsigned int sysctl_sched_autogroup_enabled;#endif -/* -* default timeslice is 100 msecs (used only for SCHED_RR tasks). -* Timeslices get refilled after they expire. -*/ -#define RR_TIMESLICE (100 * HZ / 1000) -extern int sched_rr_timeslice; extern int sched_rr_handler(struct ctl_table *table, int write,
PATCH 2/2 sched: move clock definitions from sched.h to new file
In reply to Clark WilliamsMove the various scheduler clock definitions out of include/linux/sched.h into a new file include/linux/sched/clock.h.
--- arch/arm/kernel/sched_clock.c | 2 +- arch/x86/kernel/cpu/amd.c | 2 +- arch/x86/kernel/cpu/intel.c | 2 +- arch/x86/kernel/tsc.c | 2 +- drivers/acpi/apei/ghes.c | 1 + drivers/acpi/processor_idle.c | 2 +- fs/bio-integrity.c | 1 + include/linux/blkdev.h | 2 +- include/linux/ftrace.h | 2 +- include/linux/sched.h | 61 ------------------------------------------- init/do_mounts.c | 2 +- init/do_mounts_initrd.c | 2 +- init/main.c | 2 +- kernel/events/core.c | 1 + kernel/lockdep.c | 2 +- kernel/printk.c | 1 + kernel/rcutorture.c | 2 +- kernel/sched/sched.h | 1 + kernel/time/tick-sched.c | 2 +- kernel/trace/ring_buffer.c | 1 + kernel/trace/trace_clock.c | 2 +- kernel/watchdog.c | 1 + lib/plist.c | 2 +- 23 files changed, 22 insertions(+), 76 deletions(-)
arch/arm/kernel/sched_clock.c +1 -1
@@ -10,7 +10,7 @@#include <linux/jiffies.h> #include <linux/kernel.h> #include <linux/moduleparam.h> -#include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/syscore_ops.h> #include <linux/timer.h>
arch/x86/kernel/cpu/amd.c +1 -1
@@ -5,7 +5,7 @@#include <linux/mm.h> #include <linux/io.h> -#include <linux/sched.h> +#include <linux/sched/clock.h> #include <asm/processor.h> #include <asm/apic.h> #include <asm/cpu.h>
arch/x86/kernel/cpu/intel.c +1 -1
@@ -4,7 +4,7 @@#include <linux/string.h> #include <linux/bitops.h> #include <linux/smp.h> -#include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/thread_info.h> #include <linux/module.h> #include <linux/uaccess.h>
arch/x86/kernel/tsc.c +1 -1
@@ -1,7 +1,7 @@#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt#include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/init.h> #include <linux/module.h> #include <linux/timer.h>
drivers/acpi/apei/ghes.c +1 -0
@@ -48,6 +48,7 @@#include <linux/genalloc.h> #include <linux/pci.h> #include <linux/aer.h> +#include <linux/sched/clock.h> #include <acpi/apei.h> #include <acpi/hed.h> #include <asm/mce.h>
drivers/acpi/processor_idle.c +1 -1
@@ -36,7 +36,7 @@#include <linux/acpi.h> #include <linux/dmi.h> #include <linux/moduleparam.h> -#include <linux/sched.h> /* need_resched() */ +#include <linux/sched/clock.h> #include <linux/pm_qos.h> #include <linux/clockchips.h> #include <linux/cpuidle.h>
fs/bio-integrity.c +1 -0
@@ -26,6 +26,7 @@#include <linux/bio.h> #include <linux/workqueue.h> #include <linux/slab.h> +#include <linux/sched/clock.h> struct integrity_slab {struct kmem_cache *slab;
include/linux/blkdev.h +1 -1
@@ -1,7 +1,7 @@#ifndef _LINUX_BLKDEV_H#define _LINUX_BLKDEV_H -#include <linux/sched.h> +#include <linux/sched/clock.h> #ifdef CONFIG_BLOCK
include/linux/ftrace.h +1 -1
@@ -12,7 +12,7 @@#include <linux/bitops.h> #include <linux/ptrace.h> #include <linux/ktime.h> -#include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/types.h> #include <linux/init.h> #include <linux/fs.h>
include/linux/sched.h +0 -61
73 lines not on this page · raw message
init/do_mounts.c +1 -1
@@ -9,7 +9,7 @@#endif #include <linux/module.h> -#include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/ctype.h> #include <linux/fd.h> #include <linux/tty.h>
init/do_mounts_initrd.c +1 -1
@@ -14,7 +14,7 @@#include <linux/minix_fs.h> #include <linux/romfs_fs.h> #include <linux/initrd.h> -#include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/freezer.h> #include <linux/kmod.h>
init/main.c +1 -1
@@ -57,7 +57,7 @@#include <linux/pid_namespace.h> #include <linux/device.h> #include <linux/kthread.h> -#include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/signal.h> #include <linux/idr.h> #include <linux/kgdb.h>
kernel/events/core.c +1 -0
@@ -37,6 +37,7 @@#include <linux/ftrace_event.h> #include <linux/hw_breakpoint.h> #include <linux/mm_types.h> +#include <linux/sched/clock.h> #include "internal.h"
kernel/lockdep.c +1 -1
@@ -27,7 +27,7 @@*/ #define DISABLE_BRANCH_PROFILING #include <linux/mutex.h> -#include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/delay.h> #include <linux/module.h> #include <linux/proc_fs.h>
kernel/printk.c +1 -0
@@ -43,6 +43,7 @@#include <linux/rculist.h> #include <linux/poll.h> #include <linux/irq_work.h> +#include <linux/sched/clock.h> #include <asm/uaccess.h>
kernel/rcutorture.c +1 -1
@@ -32,7 +32,7 @@#include <linux/smp.h> #include <linux/rcupdate.h> #include <linux/interrupt.h> -#include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/atomic.h> #include <linux/bitops.h> #include <linux/completion.h>
kernel/sched/sched.h +1 -0
@@ -2,6 +2,7 @@#include <linux/sched.h> #include <linux/sched/sysctl.h> #include <linux/sched/rt.h> +#include <linux/sched/clock.h> #include <linux/mutex.h> #include <linux/spinlock.h> #include <linux/stop_machine.h>
kernel/time/tick-sched.c +1 -1
@@ -18,7 +18,7 @@#include <linux/kernel_stat.h> #include <linux/percpu.h> #include <linux/profile.h> -#include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/module.h> #include <linux/irq_work.h>
kernel/trace/ring_buffer.c +1 -0
@@ -21,6 +21,7 @@#include <linux/list.h> #include <linux/cpu.h> #include <linux/fs.h> +#include <linux/sched/clock.h> #include <asm/local.h>
kernel/trace/trace_clock.c +1 -1
@@ -17,7 +17,7 @@#include <linux/hardirq.h> #include <linux/module.h> #include <linux/percpu.h> -#include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/ktime.h> #include <linux/trace_clock.h>
kernel/watchdog.c +1 -0
@@ -24,6 +24,7 @@#include <linux/sysctl.h> #include <linux/smpboot.h> #include <linux/sched/rt.h> +#include <linux/sched/clock.h> #include <asm/irq_regs.h> #include <linux/kvm_para.h>
lib/plist.c +1 -1
@@ -135,7 +135,7 @@ void plist_del(struct plist_node *node, struct plist_head *head) }#ifdef CONFIG_DEBUG_PI_LIST -#include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/module.h> #include <linux/init.h>
Signature · 1 line
1.8.1.2