Major reorganization of <linux/sched.h>
Subsystems (316)
Ingo Molnar
maintainercover Major reorganization of <linux/sched.h>
So 25+ years ago, in Linux-0.01, include/linux/sched.h was already the biggest core kernel header file:
triton:~/linux-0.01/linux/include/linux> ls -lS
total 44
-rw-r--r-- 1 mingo mingo 5686 Sep 17 1991 sched.h -rw-r--r-- 1 mingo mingo 4770 Sep 11 1991 fs.h -rw-r--r-- 1 mingo mingo 2712 Jul 10 1991 hdreg.h -rw-r--r-- 1 mingo mingo 2380 Sep 8 1991 sys.h -rw-r--r-- 1 mingo mingo 2014 Sep 8 1991 tty.h -rw-r--r-- 1 mingo mingo 1360 Sep 17 1991 config.h -rw-r--r-- 1 mingo mingo 304 Jun 19 1991 head.h -rw-r--r-- 1 mingo mingo 269 Jul 9 1991 kernel.h -rw-r--r-- 1 mingo mingo 219 Jul 29 1991 mm.h
... and today, if we do not count driver or networking headers like pci_ids.h or skbuff.h, the v4.10-rc7 version of sched.h is ~20 times larger and still the biggest core kernel header file:
triton:~/tip/include/linux> ls -lS
total 10352
...
-rw-rw-r-- 1 mingo mingo 106793 Feb 6 13:48 sched.h -rw-rw-r-- 1 mingo mingo 104369 Feb 5 10:52 fs.h ... -rw-rw-r-- 1 mingo mingo 85643 Feb 5 10:50 lsm_hooks.h -rw-rw-r-- 1 mingo mingo 78213 Feb 5 10:52 mm.h
...
The <linux/sched.h> header is also included in almost every driver, it's built into over 2,200 files, or around 10% of all kernel files.
sched.h is even larger when fully preprocessed - the following file is the result of expanding a single '#include <linux/sched.h>' line on v4.10-rc7, x86-defconfig:
triton:~/tip> ls -l kernel/sched/test.i
-rw-rw-r-- 1 mingo mingo 682459 Feb 6 13:57 kernel/sched/test.i
triton:~/tip> wc -l kernel/sched/test.i
22196 kernel/sched/test.i
Those 22K lines all get built for the 2,000+ .c kernel files that include <linux/sched.h> ... even if the .c file is small.
The main reason why it's so large is that since Linux 0.01 it had been the Rome of the kernel: all headers lead to it, due to almost every kernel subsystem having fields embedded in task_struct.
sched.h has to know about the various structure definitions of various kernel subsysems - even if the scheduler never makes direct use of 90% of those fields.
This series reorganizes, decouples and shrinks linux/sched.h both in its direct linecount and in terms of preprocessed size.
With these changes, preprocessed size drops significantly:
triton:~/tip> ls -l kernel/sched/test.i
-rw-rw-r-- 1 mingo mingo 450063 Feb 6 14:01 kernel/sched/test.i
triton:~/tip> wc -l kernel/sched/test.i
14891 kernel/sched/test.i
That's a size reduction of about 33%. The linecount of sched.h itself went down from ~3,600 lines to ~1,500 lines.
This reduction has a material impact on kernel build performance. Here's the GCC build times of a single .c module to a .o object, that only includes <linux/sched.h>, with various configs on 64-bit x86:
[ Smaller is better. Standard deviation: smaller than 1 msec ]
allnoconfig defconfig allmodconfig
------------------------------------------------------------------------------
v4.10-rc7: 57.3 ms 69.1 ms 89.9 ms -patched: 40.9 ms (-40%) 49.0 ms (-41%) 68.8 ms (-30%)
On an allyesconfig kernel these patches should save a build time of about 30 seconds CPU time.
How is this done? By using 3 approaches:
- 'Splitting' up sched.: moving non-driver scheduler interfaces from sched.h into new headers, which are under include/linux/sched/.
There's 27 such headers now:
triton:~/tip> ls -l include/linux/sched
total 132
-rw-rw-r-- 1 mingo mingo 1190 Feb 6 14:00 autogroup.h
-rw-rw-r-- 1 mingo mingo 2585 Feb 6 14:00 clock.h
-rw-rw-r-- 1 mingo mingo 2451 Feb 6 14:00 coredump.h
-rw-rw-r-- 1 mingo mingo 759 Feb 6 14:00 cpufreq.h
-rw-rw-r-- 1 mingo mingo 5114 Feb 6 14:00 cputime.h
-rw-rw-r-- 1 mingo mingo 558 Feb 6 14:00 deadline.h
-rw-rw-r-- 1 mingo mingo 1348 Feb 6 14:00 debug.h
-rw-rw-r-- 1 mingo mingo 2494 Feb 3 21:55 fork.h.orig
-rw-rw-r-- 1 mingo mingo 539 Feb 6 14:00 hotplug.h
-rw-rw-r-- 1 mingo mingo 1772 Feb 6 14:00 idle.h
-rw-rw-r-- 1 mingo mingo 201 Feb 6 14:00 init.h
-rw-rw-r-- 1 mingo mingo 1460 Feb 6 14:00 jobctl.h
-rw-rw-r-- 1 mingo mingo 1160 Feb 6 14:00 loadavg.h
-rw-rw-r-- 1 mingo mingo 3750 Feb 6 14:00 mm.h
-rw-rw-r-- 1 mingo mingo 1208 Feb 6 14:00 nohz.h
-rw-rw-r-- 1 mingo mingo 1229 Feb 6 14:00 numa_balancing.h
-rw-rw-r-- 1 mingo mingo 1715 Feb 6 14:00 prio.h
-rw-rw-r-- 1 mingo mingo 1411 Feb 6 14:00 rt.h
-rw-rw-r-- 1 mingo mingo 17621 Feb 6 14:00 signal.h
-rw-rw-r-- 1 mingo mingo 1007 Feb 6 14:00 stat.h
-rw-rw-r-- 1 mingo mingo 2475 Feb 6 14:00 sysctl.h
-rw-rw-r-- 1 mingo mingo 3947 Feb 6 14:00 task.h
-rw-rw-r-- 1 mingo mingo 2950 Feb 6 14:00 task_stack.h
-rw-rw-r-- 1 mingo mingo 6285 Feb 6 14:00 topology.h
-rw-rw-r-- 1 mingo mingo 1868 Feb 6 14:00 user.h
-rw-rw-r-- 1 mingo mingo 1846 Feb 6 14:00 wake_q.h
-rw-rw-r-- 1 mingo mingo 815 Feb 6 14:00 xacct.h ... and these headers now contain twice as much code as sched.h itself - while 90% of the sched.h users still only have to include sched.h and none of the extra headers.
- 'Decoupling' sched.h types from five major kernel headers that sched.h got entangled with over the years:
signal.h
mm_types.h
topology.h
wait.h
rculist.h
It's an interesting detail that wait.h was implicitly included in all sched.h inclusions, via the spaghetti of secondary dependencies. I.e. including sched.h would include wait.h, and including wait.h alone in a driver did not make sense, as it would not work without the sched.h primitives.
The new sched.h does not include any of these headers anymore.
- 'Slimming' sched.h: there were a number of unnecessary, unjustified header inclusions in it that came there historically and were never removed. There was also other types of fat, such as dead interfaces.
A complicating problem is that because sched.h is so central, lots of code that included it learned to rely on the often incidental inclusions of various kernel headers. Removing those headers from sched.h broke the build in those files - so all these dependencies had to be identified and fixed.
For all those reasons the scope of the series is pretty invasive:
1196 files changed, 7431 insertions(+), 5815 deletions(-)
... but I've done thousands of build tests (many of them cross-arch builds), and I think most of the build bugs are shaken out already. Inevitably there are some left - I'll work on finding and fixing those.
Due to the fundamental intrusiveness of this series I don't think it's a good idea to include this series in linux-next, so my plan is, if there's rough agreement about this approach, that I'll send it to Linus near the end of the merge window, to cause the least amount of disruption to pending patches in linux-next.
This is one of those high impact patch series - but I think all around I think it's worth the pain, as the resulting sched.h is so much nicer.
I have more changes planned to further simplify and clean up sched.h, but wanted to get this series out for discussion before advancing any further.
The series can also be accessed in the WIP.sched/core branch of the -tip tree:
git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.sched/core
(The series has a base commit of 248fd141c4c1.)
Thanks,
Ingo
Ingo Molnar (89):
sched/core: Clean up comments
delayacct: Include <uapi/linux/taskstats.h>
sched/rq_clock: Consolidate the ordering of the rq_clock methods
sched/core: Remove unnecessary #include headers
sched/topology: Split out scheduler topology code from core.c into topology.c
sched/topology: Split out scheduler topology interfaces from <linux/sched.h> into <linux/sched/topology.h> sched/idle: Create <linux/sched/idle.h> for idle CPU related definitions
sched/idle: Move wake_up_if_idle prototype to <linux/sched/idle.h>
sched/wake_q: Move the wake-queue types and interfaces from sched.h into <linux/sched/wake_q.h>
sched/clock: Introduce <linux/sched/clock.h>
sched/headers, delayacct: Move the 'struct task_delay_info' definition from <linux/sched.h> to <linux/delayacct.h> sched/abi: Introduce <uapi/linux/sched/types.h>
sched/loadavg: Move loadavg related definitions from <linux/sched.h> to <linux/sched/loadavg.h> sched/autogroup: Collect extern APIs into <linux/sched/autogroup.h>
sched/autogroup: Rename auto_group.[ch] to autogroup.[ch]
sched/idle: Move polling methods to <linux/sched/idle.h>
sched/idle: Remove tsk_is_polling()
sched/core: Move task->mm handling methods to <linux/sched/mm.h>
sched/core: Move task->mm coredumping related defines and methods from <linux/sched.h> to <linux/sched/coredump.h> sched/headers, signals: Separate out task_struct::signal and task_struct::sighand types and accessors into <linux/sched/signal.h> sched/headers: Remove unused 'task_can_switch_user()' prototype
sched/headers: Move 'struct user_struct' definition and APIs to the new <linux/sched/user.h> header sched/headers, softlockup: Move softlockup detector watchdog methods to <linux/nmi.h>
sched/headers: Remove #include <linux/capability.h> from <linux/sched.h>
sched/headers, cgroups: Remove the threadgroup_change_*() wrappery
sched/headers: Remove unused <linux/cgroup-defs.h> include from <linux/sched.h>
sched/headers: Move 'struct pacct_struct' and 'struct cpu_itimer' form <linux/sched.h> to <linux/sched/signal.h> sched/cpufreq: Move the cpufreq interface to <linux/sched/cpufreq.h>
sched/headers: Move more mm_struct related functionality from <linux/sched.h> to <linux/sched/mm.h> sched/headers: Move the 'init_mm' declaration from <linux/sched.h> to <linux/mm_types.h>
sched/headers: Move in_vfork() from <linux/sched.h> to <linux/sched/mm.h>
sched/numa: Split <linux/sched/numa_balancing.h> out of <linux/sched.h>
sched/headers: Move the JOBCTL_ defines and methods from <linux/sched.h> to <linux/sched/jobctl.h> sched/core: Move <asm/paravirt.h> include to kernel/sched/sched.h
kasan, sched/headers: Remove <linux/sched.h> from <linux/kasan.h> and uninline kasan_enable/disable_current() sched/headers: Remove <linux/cred.h> inclusion from <linux/sched.h>
sched/headers: Remove <asm/ptrace.h> from <linux/sched.h>
sched/headers: Remove <linux/rtmutex.h> from <linux/sched.h>
sched/headers: Remove various unrelated headers from <linux/sched.h>
sched/headers: Move CONFIG_TASK_XACCT bits out of <linux/sched.h> into <linux/sched/xacct.h>
sched/headers: Move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> sched/headers: Move the memalloc_noio_*() APIs to <linux/sched/mm.h>
sched/headers: Remove <linux/gfp.h> include from <linux/sched.h>
sched/headers: Move task statistics from <linux/sched.h> to <linux/sched/stat.h>
mm/vmacache, sched/headers: Introduce 'struct vmacache' and move it from <linux/sched.h> to <linux/mm_types> sched/headers: Move the NOHZ APIs from <linux/sched.h> to <linux/sched/nohz.h>
sched/headers: Move debugging functions from <linux/sched.h> to <linux/sched/debug.h>
sched/headers, time/timekeeping: Move the xtime_update() prototype from <linux/sched.h> to <linux/time.h> sched/headers: Move <asm/current.h> include from the middle of <linux/sched.h> to the header portion sched/core: Convert ___assert_task_state() link time assert to BUILD_BUG_ON()
sched/headers: Split hotplug CPU interfaces out of <linux/sched.h> into <linux/sched/hotplug.h> sched/headers: Split <linux/sched/task.h> out of <linux/sched.h>
sched/headers: Simplify <linux/sched/task.h> dependencies
sched/headers: Make the include/linux/sched/*.h headers build standalone
sched/core: Clean up <linux/sched.h> structure predeclarations and remove stale entries
sched/headers: Move the PREEMPT_COUNT defines from <linux/sched.h> to <linux/preempt.h>
sched/headers: Split <linux/sched/task_stack> out of <linux/sched.h>
sched/headers: Move the 'root_task_group' declaration to <linux/sched/autogroup.h>
sched/core: Move the get_preempt_disable_ip() inline to sched/core.c
signals: Split out <linux/signal_types.h> from <linux/signal.h>
sched/headers: Reduce <linux/sched.h> signal API dependency
mm/headers, sched/headers: Split <linux/mm_types_task.h> out of <linux/mm_types.h>
sched/headers: Remove the <linux/mm_types.h> dependency from <linux/sched.h>
sched/headers: Remove 'init_pid_ns' prototype from <linux/sched.h>
sched/headers: Move 'init_task' and 'init_thread_union' from <linux/sched.h> to <linux/sched/task.h> sched/headers: Use <linux/rcuupdate.h> instead of <linux/rculist.h> in <linux/sched.h>
sched/headers: Move the task_lock()/unlock() APIs to <linux/sched/task.h>
sched/headers: Split cputime functionality out of <linux/sched.h>, into <linux/sched/cputime.h> sched/headers: Move sched_info_on() and force_schedstat_enabled() from <linux/sched.h> to <linux/sched/stat.h> sched/core: Remove unused prefetch_stack()
sched/headers, vfs/execve: Move the do_execve*() prototypes from <linux/sched.h> to <linux/binfmts.h> sched/headers: Move kstack_end() from <linux/sched.h> to <linux/sched/task_stack.h>
sched/headers: Move exit_files() and exit_itimers() from <linux/sched.h> to <linux/sched/task.h> sched/headers: Move _init() prototypes from <linux/sched.h> to <linux/sched/init.h>
sched/headers, timekeeping: Consolidate the timer tick function prototypes
sched/headers, mm: Move 'struct tlbflush_unmap_batch' from <linux/sched.h> to <linux/mm_types_task.h> sched/headers: Move the get_task_struct()/put_task_struct() and related APIs from <linux/sched.h> to <linux/sched/task.h> sched/core: Remove the tsk_cpus_allowed() wrapper
sched/core: Remove the tsk_nr_cpus_allowed() wrapper
sched/headers: Move the <linux/magic.h> include to <linux/sched/task_stack.h>
sched/headers: Remove spurious <linux/sched.h> inclusion dependencies
rcu: Separate the rcu synchronization types and APIs into <linux/rcupdate_wait.h>
timers: Remove the <linux/sysctl.h> include from <linux/timer.h>
x86/apic: Remove the <linux/pm.h> header inclusion from <asm/apic.h>
hrtimer: Remove the <linux/wait.h> include from <linux/hrtimer.h>
sched/headers: Remove the <linux/topology.h> include from <linux/sched.h>
sched/headers: Move the sched_exec() prototype to <linux/sched/task.h>
sched/headers: Remove #ifdefs from <linux/sched.h>
sched/headers: Clean up <linux/sched.h>
arch/alpha/include/asm/a.out-core.h | 1 +
arch/alpha/include/asm/mmu_context.h | 2 +
arch/alpha/kernel/osf_sys.c | 5 +-
arch/alpha/kernel/process.c | 3 +
arch/alpha/kernel/ptrace.c | 1 +
arch/alpha/kernel/signal.c | 3 +-
arch/alpha/kernel/traps.c | 3 +-
arch/alpha/math-emu/math.c | 1 +
arch/alpha/mm/fault.c | 2 +-
arch/arc/include/asm/mmu_context.h | 1 +
arch/arc/kernel/ctx_sw.c | 1 +
arch/arc/kernel/kgdb.c | 1 +
arch/arc/kernel/process.c | 3 +
arch/arc/kernel/ptrace.c | 1 +
arch/arc/kernel/signal.c | 2 +
arch/arc/kernel/stacktrace.c | 2 +
arch/arc/kernel/traps.c | 2 +-
arch/arc/kernel/troubleshoot.c | 3 +
arch/arc/mm/fault.c | 2 +-
arch/arc/mm/mmap.c | 3 +-
arch/arc/mm/tlb.c | 2 +
arch/arm/common/bL_switcher.c | 4 +-
arch/arm/include/asm/mmu_context.h | 2 +
arch/arm/include/asm/tlbflush.h | 7 +-
arch/arm/kernel/perf_regs.c | 1 +
arch/arm/kernel/process.c | 3 +
arch/arm/kernel/ptrace.c | 3 +-
arch/arm/kernel/smp.c | 2 +
arch/arm/kernel/stacktrace.c | 1 +
arch/arm/kernel/suspend.c | 1 +
arch/arm/kernel/swp_emulate.c | 1 +
arch/arm/kernel/sys_oabi-compat.c | 1 +
arch/arm/kernel/topology.c | 1 +
arch/arm/kernel/traps.c | 4 +-
arch/arm/mach-bcm/platsmp.c | 1 +
arch/arm/mach-omap2/pm-debug.c | 1 +
arch/arm/mach-rpc/ecard.c | 1 +
arch/arm/mm/alignment.c | 3 +-
arch/arm/mm/fault.c | 3 +-
arch/arm/mm/idmap.c | 1 +
arch/arm/mm/init.c | 2 +
arch/arm/mm/mmap.c | 3 +-
arch/arm/probes/kprobes/core.c | 1 +
arch/arm/probes/kprobes/test-core.c | 1 +
arch/arm/vfp/vfpmodule.c | 2 +-
arch/arm64/include/asm/compat.h | 1 +
arch/arm64/include/asm/mmu_context.h | 2 +
arch/arm64/kernel/debug-monitors.c | 1 +
arch/arm64/kernel/fpsimd.c | 2 +-
arch/arm64/kernel/kgdb.c | 2 +
arch/arm64/kernel/perf_regs.c | 1 +
arch/arm64/kernel/probes/kprobes.c | 1 +
arch/arm64/kernel/process.c | 3 +
arch/arm64/kernel/ptrace.c | 3 +-
arch/arm64/kernel/setup.c | 1 +
arch/arm64/kernel/smp.c | 2 +
arch/arm64/kernel/stacktrace.c | 2 +
arch/arm64/kernel/sys_compat.c | 1 +
arch/arm64/kernel/topology.c | 1 +
arch/arm64/kernel/traps.c | 5 +-
arch/arm64/mm/fault.c | 3 +-
arch/arm64/mm/kasan_init.c | 1 +
arch/arm64/mm/mmap.c | 3 +-
arch/avr32/include/asm/mmu_context.h | 2 +
arch/avr32/kernel/nmi_debug.c | 1 +
arch/avr32/kernel/process.c | 3 +
arch/avr32/kernel/ptrace.c | 1 +
arch/avr32/kernel/stacktrace.c | 1 +
arch/avr32/kernel/traps.c | 2 +-
arch/blackfin/include/asm/mmu_context.h | 2 +
arch/blackfin/kernel/dumpstack.c | 2 +
arch/blackfin/kernel/early_printk.c | 1 +
arch/blackfin/kernel/flat.c | 1 +
arch/blackfin/kernel/nmi.c | 1 +
arch/blackfin/kernel/process.c | 4 +
arch/blackfin/kernel/ptrace.c | 1 +
arch/blackfin/kernel/signal.c | 1 +
arch/blackfin/kernel/stacktrace.c | 1 +
arch/blackfin/kernel/trace.c | 4 +-
arch/blackfin/kernel/traps.c | 2 +
arch/blackfin/mach-common/ints-priority.c | 1 +
arch/blackfin/mach-common/smp.c | 1 +
arch/blackfin/mm/isram-driver.c | 1 +
arch/blackfin/mm/sram-alloc.c | 2 +
arch/c6x/kernel/process.c | 2 +
arch/c6x/kernel/ptrace.c | 1 +
arch/c6x/kernel/traps.c | 1 +
arch/cris/arch-v10/drivers/sync_serial.c | 2 +-
arch/cris/arch-v10/kernel/process.c | 3 +
arch/cris/arch-v10/kernel/ptrace.c | 1 +
arch/cris/arch-v10/kernel/signal.c | 1 +
arch/cris/arch-v10/kernel/traps.c | 2 +
arch/cris/arch-v10/mm/tlb.c | 2 +
arch/cris/arch-v32/drivers/sync_serial.c | 2 +-
arch/cris/arch-v32/kernel/process.c | 3 +
arch/cris/arch-v32/kernel/ptrace.c | 1 +
arch/cris/arch-v32/kernel/signal.c | 1 +
arch/cris/arch-v32/kernel/traps.c | 2 +
arch/cris/arch-v32/mm/tlb.c | 1 +
arch/cris/include/asm/pgtable.h | 2 +-
arch/cris/kernel/irq.c | 1 +
arch/cris/kernel/process.c | 1 +
arch/cris/kernel/stacktrace.c | 2 +-
arch/cris/kernel/time.c | 2 +-
arch/cris/kernel/traps.c | 1 +
arch/cris/mm/fault.c | 1 +
arch/cris/mm/tlb.c | 2 +
arch/frv/kernel/process.c | 3 +
arch/frv/kernel/traps.c | 3 +-
arch/frv/mm/elf-fdpic.c | 1 +
arch/frv/mm/init.c | 1 +
arch/frv/mm/mmu-context.c | 2 +
arch/h8300/kernel/process.c | 3 +
arch/h8300/kernel/ptrace_s.c | 2 +-
arch/h8300/kernel/signal.c | 1 +
arch/h8300/kernel/traps.c | 2 +
arch/hexagon/include/asm/mmu_context.h | 2 +
arch/hexagon/kernel/kgdb.c | 1 +
arch/hexagon/kernel/process.c | 3 +
arch/hexagon/kernel/ptrace.c | 1 +
arch/hexagon/kernel/signal.c | 2 +
arch/hexagon/kernel/smp.c | 1 +
arch/hexagon/kernel/stacktrace.c | 1 +
arch/hexagon/kernel/traps.c | 4 +-
arch/hexagon/kernel/vm_events.c | 1 +
arch/hexagon/mm/vm_fault.c | 1 +
arch/ia64/hp/sim/simserial.c | 1 +
arch/ia64/include/asm/mmu_context.h | 1 +
arch/ia64/include/asm/pgtable.h | 2 +-
arch/ia64/include/asm/processor.h | 2 -
arch/ia64/kernel/asm-offsets.c | 2 +-
arch/ia64/kernel/brl_emu.c | 2 +-
arch/ia64/kernel/entry.S | 23 -
arch/ia64/kernel/mca.c | 4 +-
arch/ia64/kernel/perfmon.c | 2 +
arch/ia64/kernel/process.c | 4 +
arch/ia64/kernel/ptrace.c | 2 +
arch/ia64/kernel/setup.c | 3 +
arch/ia64/kernel/sys_ia64.c | 2 +
arch/ia64/kernel/time.c | 3 +-
arch/ia64/kernel/traps.c | 3 +-
arch/ia64/kernel/unaligned.c | 2 +-
arch/ia64/kernel/uncached.c | 1 +
arch/ia64/mm/fault.c | 2 +-
arch/ia64/mm/init.c | 1 +
arch/ia64/sn/kernel/sn2/sn2_smp.c | 1 +
arch/m32r/include/asm/mmu_context.h | 2 +
arch/m32r/kernel/process.c | 3 +
arch/m32r/kernel/ptrace.c | 1 +
arch/m32r/kernel/smpboot.c | 1 +
arch/m32r/kernel/traps.c | 4 +
arch/m68k/include/asm/a.out-core.h | 1 +
arch/m68k/include/asm/mmu_context.h | 1 +
arch/m68k/kernel/process.c | 3 +
arch/m68k/kernel/ptrace.c | 1 +
arch/m68k/kernel/time.c | 1 +
arch/m68k/kernel/traps.c | 1 +
arch/m68k/mac/macints.c | 1 +
arch/m68k/sun3/mmu_emu.c | 1 +
arch/metag/include/asm/mmu_context.h | 1 +
arch/metag/kernel/process.c | 3 +
arch/metag/kernel/ptrace.c | 2 +
arch/metag/kernel/signal.c | 1 +
arch/metag/kernel/smp.c | 2 +
arch/metag/kernel/stacktrace.c | 2 +
arch/metag/kernel/traps.c | 3 +
arch/metag/mm/fault.c | 1 +
arch/metag/mm/init.c | 1 +
arch/microblaze/include/asm/mmu_context_mm.h | 2 +
arch/microblaze/kernel/exceptions.c | 1 +
arch/microblaze/kernel/heartbeat.c | 1 +
arch/microblaze/kernel/process.c | 3 +
arch/microblaze/kernel/ptrace.c | 1 +
arch/microblaze/kernel/timer.c | 1 +
arch/microblaze/kernel/traps.c | 1 +
arch/microblaze/kernel/unwind.c | 1 +
arch/microblaze/mm/pgtable.c | 1 +
arch/mips/cavium-octeon/smp.c | 1 +
arch/mips/include/asm/abi.h | 2 +
arch/mips/include/asm/elf.h | 2 +
arch/mips/include/asm/fpu.h | 1 +
arch/mips/include/asm/mmu_context.h | 2 +
arch/mips/kernel/branch.c | 2 +-
arch/mips/kernel/crash.c | 1 +
arch/mips/kernel/mips-mt-fpaff.c | 2 +
arch/mips/kernel/perf_event.c | 1 +
arch/mips/kernel/process.c | 3 +
arch/mips/kernel/ptrace.c | 1 +
arch/mips/kernel/ptrace32.c | 1 +
arch/mips/kernel/rtlx.c | 2 +
arch/mips/kernel/signal_o32.c | 1 +
arch/mips/kernel/smp-bmips.c | 1 +
arch/mips/kernel/smp-cps.c | 1 +
arch/mips/kernel/smp.c | 2 +-
arch/mips/kernel/stacktrace.c | 2 +
arch/mips/kernel/syscall.c | 1 +
arch/mips/kernel/traps.c | 1 +
arch/mips/kvm/mips.c | 2 +
arch/mips/loongson64/loongson-3/smp.c | 1 +
arch/mips/math-emu/dsemul.c | 2 +
arch/mips/mm/ioremap.c | 1 +
arch/mips/mm/mmap.c | 3 +-
arch/mips/sgi-ip22/ip22-berr.c | 2 +-
arch/mips/sgi-ip22/ip22-reset.c | 2 +-
arch/mips/sgi-ip22/ip28-berr.c | 1 +
arch/mips/sgi-ip27/ip27-berr.c | 1 +
arch/mips/sgi-ip32/ip32-berr.c | 1 +
arch/mips/sgi-ip32/ip32-irq.c | 1 +
arch/mips/sibyte/bcm1480/smp.c | 1 +
arch/mn10300/include/asm/mmu_context.h | 2 +
arch/mn10300/kernel/fpu.c | 2 +
arch/mn10300/kernel/process.c | 3 +
arch/mn10300/kernel/ptrace.c | 1 +
arch/mn10300/kernel/smp.c | 3 +-
arch/mn10300/kernel/time.c | 1 +
arch/mn10300/kernel/traps.c | 1 +
arch/mn10300/mm/tlb-smp.c | 2 +-
arch/nios2/include/asm/mmu_context.h | 2 +
arch/nios2/kernel/process.c | 4 +
arch/nios2/kernel/ptrace.c | 1 +
arch/nios2/kernel/setup.c | 1 +
arch/nios2/kernel/traps.c | 1 +
arch/nios2/mm/fault.c | 1 +
arch/openrisc/kernel/process.c | 3 +
arch/openrisc/kernel/ptrace.c | 1 +
arch/openrisc/kernel/traps.c | 2 +
arch/openrisc/mm/fault.c | 2 +-
arch/parisc/kernel/cache.c | 1 +
arch/parisc/kernel/pa7300lc.c | 1 +
arch/parisc/kernel/process.c | 3 +
arch/parisc/kernel/setup.c | 1 +
arch/parisc/kernel/signal.c | 1 +
arch/parisc/kernel/sys_parisc.c | 2 +
arch/parisc/kernel/time.c | 1 +
arch/parisc/kernel/traps.c | 1 +
arch/parisc/kernel/unaligned.c | 3 +-
arch/parisc/math-emu/driver.c | 3 +-
arch/parisc/mm/fault.c | 1 +
arch/parisc/mm/hugetlbpage.c | 1 +
arch/powerpc/kernel/io-workarounds.c | 2 +-
arch/powerpc/kernel/paca.c | 1 +
arch/powerpc/kernel/process.c | 3 +
arch/powerpc/kernel/smp.c | 3 +-
arch/powerpc/kernel/stacktrace.c | 1 +
arch/powerpc/kernel/swsusp_64.c | 1 +
arch/powerpc/kernel/time.c | 3 +-
arch/powerpc/kernel/traps.c | 1 +
arch/powerpc/kvm/book3s_64_vio.c | 1 +
arch/powerpc/kvm/book3s_hv.c | 3 +-
arch/powerpc/kvm/book3s_mmu_hpte.c | 1 +
arch/powerpc/kvm/e500_mmu_host.c | 2 +-
arch/powerpc/kvm/powerpc.c | 1 +
arch/powerpc/lib/feature-fixups.c | 1 +
arch/powerpc/mm/fault.c | 1 +
arch/powerpc/mm/hash_utils_64.c | 2 +-
arch/powerpc/mm/mmap.c | 3 +-
arch/powerpc/mm/mmu_context_iommu.c | 2 +-
arch/powerpc/mm/pgtable-book3s64.c | 2 +
arch/powerpc/mm/pgtable-hash64.c | 2 +
arch/powerpc/mm/pgtable-radix.c | 2 +-
arch/powerpc/mm/slb.c | 2 +
arch/powerpc/perf/perf_regs.c | 1 +
arch/powerpc/platforms/83xx/suspend.c | 1 +
arch/powerpc/platforms/85xx/smp.c | 1 +
arch/powerpc/platforms/cell/cpufreq_spudemand.c | 1 +
arch/powerpc/platforms/cell/spufs/context.c | 2 +
arch/powerpc/platforms/cell/spufs/fault.c | 2 +-
arch/powerpc/platforms/cell/spufs/sched.c | 5 +-
arch/powerpc/platforms/cell/spufs/spufs.h | 1 +
arch/powerpc/platforms/powermac/smp.c | 1 +
arch/powerpc/platforms/powernv/smp.c | 1 +
arch/powerpc/platforms/pseries/hotplug-cpu.c | 1 +
arch/powerpc/xmon/xmon.c | 2 +-
arch/s390/appldata/appldata_os.c | 2 +
arch/s390/crypto/prng.c | 2 +
arch/s390/include/asm/compat.h | 1 +
arch/s390/include/asm/elf.h | 2 +-
arch/s390/include/asm/kprobes.h | 1 +
arch/s390/include/asm/mmu_context.h | 1 +
arch/s390/kernel/compat_signal.c | 1 +
arch/s390/kernel/dumpstack.c | 2 +
arch/s390/kernel/idle.c | 2 +-
arch/s390/kernel/nmi.c | 3 +
arch/s390/kernel/process.c | 3 +
arch/s390/kernel/processor.c | 1 +
arch/s390/kernel/ptrace.c | 1 +
arch/s390/kernel/runtime_instr.c | 2 +
arch/s390/kernel/setup.c | 2 +
arch/s390/kernel/signal.c | 1 +
arch/s390/kernel/smp.c | 2 +
arch/s390/kernel/stacktrace.c | 1 +
arch/s390/kernel/time.c | 1 +
arch/s390/kernel/topology.c | 1 +
arch/s390/kernel/traps.c | 1 +
arch/s390/kernel/uprobes.c | 2 +
arch/s390/kernel/vtime.c | 2 +-
arch/s390/kvm/gaccess.c | 2 +
arch/s390/kvm/kvm-s390.c | 2 +
arch/s390/kvm/priv.c | 2 +
arch/s390/kvm/vsie.c | 2 +
arch/s390/mm/fault.c | 1 +
arch/s390/mm/mmap.c | 2 +
arch/score/include/asm/mmu_context.h | 2 +
arch/score/kernel/process.c | 2 +
arch/score/kernel/ptrace.c | 1 +
arch/score/kernel/traps.c | 4 +-
arch/sh/drivers/heartbeat.c | 1 +
arch/sh/include/asm/mmu_context.h | 2 +
arch/sh/kernel/cpu/fpu.c | 5 +-
arch/sh/kernel/cpu/sh2a/fpu.c | 2 +-
arch/sh/kernel/disassemble.c | 2 +
arch/sh/kernel/dumpstack.c | 2 +
arch/sh/kernel/hw_breakpoint.c | 1 +
arch/sh/kernel/kgdb.c | 2 +
arch/sh/kernel/nmi_debug.c | 1 +
arch/sh/kernel/process.c | 4 +-
arch/sh/kernel/process_32.c | 3 +
arch/sh/kernel/process_64.c | 3 +
arch/sh/kernel/ptrace_32.c | 1 +
arch/sh/kernel/ptrace_64.c | 1 +
arch/sh/kernel/signal_32.c | 1 +
arch/sh/kernel/smp.c | 1 +
arch/sh/kernel/stacktrace.c | 1 +
arch/sh/kernel/sys_sh32.c | 1 +
arch/sh/kernel/traps.c | 4 +
arch/sh/kernel/traps_32.c | 2 +
arch/sh/kernel/traps_64.c | 1 +
arch/sh/math-emu/math.c | 2 +-
arch/sh/mm/asids-debugfs.c | 3 +
arch/sh/mm/fault.c | 1 +
arch/sh/mm/mmap.c | 1 +
arch/sparc/include/asm/mmu_context_64.h | 2 +
arch/sparc/include/asm/pgtable_64.h | 3 +
arch/sparc/kernel/asm-offsets.c | 1 +
arch/sparc/kernel/ds.c | 1 +
arch/sparc/kernel/led.c | 1 +
arch/sparc/kernel/process_32.c | 3 +
arch/sparc/kernel/process_64.c | 3 +
arch/sparc/kernel/ptrace_64.c | 1 +
arch/sparc/kernel/smp_64.c | 1 +
arch/sparc/kernel/stacktrace.c | 1 +
arch/sparc/kernel/sun4m_irq.c | 1 +
arch/sparc/kernel/sys_sparc_32.c | 4 +-
arch/sparc/kernel/sys_sparc_64.c | 4 +-
arch/sparc/kernel/sysfs.c | 2 +-
arch/sparc/kernel/traps_32.c | 2 +
arch/sparc/kernel/traps_64.c | 1 +
arch/sparc/kernel/unaligned_32.c | 2 +-
arch/sparc/kernel/viohs.c | 1 +
arch/sparc/mm/fault_64.c | 1 +
arch/sparc/mm/hugetlbpage.c | 1 +
arch/sparc/mm/tsb.c | 2 +
arch/tile/include/asm/mmu_context.h | 2 +
arch/tile/include/asm/stack.h | 2 +
arch/tile/kernel/compat_signal.c | 1 +
arch/tile/kernel/kgdb.c | 2 +
arch/tile/kernel/process.c | 3 +
arch/tile/kernel/ptrace.c | 2 +
arch/tile/kernel/signal.c | 2 +
arch/tile/kernel/smpboot.c | 1 +
arch/tile/kernel/stack.c | 2 +
arch/tile/kernel/time.c | 1 +
arch/tile/kernel/traps.c | 1 +
arch/tile/kernel/unaligned.c | 2 +
arch/tile/mm/fault.c | 3 +
arch/tile/mm/hugetlbpage.c | 1 +
arch/tile/mm/mmap.c | 3 +-
arch/um/drivers/line.c | 3 +-
arch/um/drivers/mconsole_kern.c | 1 +
arch/um/drivers/random.c | 2 +-
arch/um/include/asm/mmu_context.h | 2 +
arch/um/kernel/exec.c | 4 +-
arch/um/kernel/process.c | 3 +
arch/um/kernel/reboot.c | 4 +-
arch/um/kernel/skas/mmu.c | 3 +-
arch/um/kernel/skas/process.c | 5 +-
arch/um/kernel/sysrq.c | 3 +
arch/um/kernel/tlb.c | 3 +-
arch/um/kernel/trap.c | 3 +-
arch/um/kernel/um_arch.c | 2 +
arch/unicore32/kernel/fpu-ucf64.c | 2 +-
arch/unicore32/kernel/process.c | 3 +
arch/unicore32/kernel/ptrace.c | 1 +
arch/unicore32/kernel/stacktrace.c | 1 +
arch/unicore32/kernel/traps.c | 3 +
arch/unicore32/mm/alignment.c | 1 +
arch/unicore32/mm/fault.c | 2 +-
arch/x86/entry/common.c | 1 +
arch/x86/entry/vdso/vma.c | 1 +
arch/x86/entry/vsyscall/vsyscall_64.c | 2 +
arch/x86/events/amd/ibs.c | 1 +
arch/x86/events/core.c | 3 +-
arch/x86/ia32/ia32_aout.c | 1 +
arch/x86/ia32/ia32_signal.c | 1 +
arch/x86/include/asm/a.out-core.h | 2 +
arch/x86/include/asm/apic.h | 1 -
arch/x86/include/asm/intel_rdt.h | 1 +
arch/x86/include/asm/mpx.h | 2 +
arch/x86/include/asm/mwait.h | 1 +
arch/x86/kernel/amd_gart_64.c | 1 +
arch/x86/kernel/apm_32.c | 3 +-
arch/x86/kernel/cpu/amd.c | 1 +
arch/x86/kernel/cpu/centaur.c | 1 +
arch/x86/kernel/cpu/common.c | 2 +
arch/x86/kernel/cpu/cyrix.c | 1 +
arch/x86/kernel/cpu/intel.c | 1 +
arch/x86/kernel/cpu/intel_cacheinfo.c | 1 +
arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 3 +-
arch/x86/kernel/cpu/transmeta.c | 1 +
arch/x86/kernel/doublefault.c | 1 +
arch/x86/kernel/dumpstack.c | 2 +
arch/x86/kernel/dumpstack_32.c | 1 +
arch/x86/kernel/dumpstack_64.c | 1 +
arch/x86/kernel/fpu/init.c | 1 +
arch/x86/kernel/fpu/regset.c | 1 +
arch/x86/kernel/ioport.c | 1 +
arch/x86/kernel/irq_64.c | 1 +
arch/x86/kernel/kprobes/core.c | 1 +
arch/x86/kernel/kvmclock.c | 1 +
arch/x86/kernel/nmi.c | 2 +
arch/x86/kernel/perf_regs.c | 1 +
arch/x86/kernel/process.c | 4 +
arch/x86/kernel/process_32.c | 2 +
arch/x86/kernel/process_64.c | 2 +
arch/x86/kernel/ptrace.c | 1 +
arch/x86/kernel/pvclock.c | 2 +
arch/x86/kernel/signal.c | 1 +
arch/x86/kernel/smpboot.c | 3 +
arch/x86/kernel/stacktrace.c | 2 +
arch/x86/kernel/step.c | 1 +
arch/x86/kernel/sys_x86_64.c | 1 +
arch/x86/kernel/traps.c | 1 +
arch/x86/kernel/tsc.c | 1 +
arch/x86/kernel/unwind_frame.c | 2 +
arch/x86/kernel/vm86_32.c | 1 +
arch/x86/kvm/cpuid.c | 2 +
arch/x86/kvm/hyperv.c | 2 +
arch/x86/kvm/irq_comm.c | 2 +
arch/x86/kvm/mmu.c | 1 +
arch/x86/kvm/page_track.c | 2 +
arch/x86/kvm/x86.c | 2 +
arch/x86/mm/extable.c | 2 +
arch/x86/mm/fault.c | 1 +
arch/x86/mm/hugetlbpage.c | 1 +
arch/x86/mm/kasan_init_64.c | 1 +
arch/x86/mm/mmap.c | 3 +-
arch/x86/mm/mpx.c | 1 +
arch/x86/platform/uv/uv_nmi.c | 1 +
arch/x86/um/syscalls_64.c | 1 +
arch/x86/um/sysrq_32.c | 1 +
arch/x86/um/sysrq_64.c | 1 +
arch/x86/xen/mmu.c | 2 +-
arch/x86/xen/smp.c | 1 +
arch/xtensa/include/asm/mmu_context.h | 1 +
arch/xtensa/kernel/process.c | 3 +
arch/xtensa/kernel/ptrace.c | 1 +
arch/xtensa/kernel/signal.c | 1 +
arch/xtensa/kernel/smp.c | 2 +
arch/xtensa/kernel/syscall.c | 1 +
arch/xtensa/kernel/traps.c | 4 +-
block/blk-cgroup.c | 1 +
block/blk-ioc.c | 1 +
block/blk-map.c | 1 +
block/blk-mq.c | 2 +
block/blk-softirq.c | 1 +
block/cfq-iosched.c | 1 +
block/ioprio.c | 3 +
crypto/algboss.c | 2 +-
crypto/algif_aead.c | 1 +
crypto/algif_skcipher.c | 1 +
crypto/api.c | 2 +-
crypto/crypto_engine.c | 3 +-
crypto/mcryptd.c | 1 +
drivers/acpi/acpi_pad.c | 2 +-
drivers/acpi/apei/ghes.c | 1 +
drivers/android/binder.c | 3 +-
drivers/atm/horizon.c | 1 +
drivers/base/core.c | 1 +
drivers/base/power/main.c | 1 +
drivers/base/power/runtime.c | 2 +-
drivers/base/power/wakeup.c | 2 +-
drivers/block/drbd/drbd_int.h | 2 +-
drivers/block/drbd/drbd_main.c | 1 +
drivers/block/drbd/drbd_receiver.c | 4 +-
drivers/block/drbd/drbd_worker.c | 2 +-
drivers/block/swim3.c | 2 +-
drivers/char/applicom.c | 2 +-
drivers/char/hpet.c | 1 +
drivers/char/hw_random/core.c | 1 +
drivers/char/ipmi/ipmi_watchdog.c | 1 +
drivers/char/lp.c | 2 +-
drivers/char/ppdev.c | 2 +-
drivers/char/rtc.c | 2 +-
drivers/char/snsc.c | 2 +-
drivers/char/snsc_event.c | 2 +-
drivers/clocksource/arm_arch_timer.c | 1 +
drivers/clocksource/pxa_timer.c | 1 +
drivers/clocksource/timer-digicolor.c | 1 +
drivers/cpufreq/cpufreq_governor.c | 1 -
drivers/cpufreq/cpufreq_governor.h | 1 +
drivers/cpufreq/cpufreq_ondemand.c | 1 +
drivers/cpufreq/intel_pstate.c | 2 +-
drivers/cpufreq/sparc-us2e-cpufreq.c | 4 +-
drivers/cpufreq/sparc-us3-cpufreq.c | 4 +-
drivers/cpuidle/cpuidle.c | 1 +
drivers/cpuidle/driver.c | 1 +
drivers/cpuidle/governors/menu.c | 2 +
drivers/dax/dax.c | 1 +
drivers/dma-buf/dma-fence.c | 1 +
drivers/dma/dmatest.c | 1 +
drivers/firmware/psci_checker.c | 1 +
drivers/firmware/tegra/bpmp.c | 1 +
drivers/gpu/drm/amd/amdkfd/kfd_events.c | 2 +-
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 2 +
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 2 +
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 1 +
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 1 +
drivers/gpu/drm/drm_lock.c | 2 +
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 2 +
drivers/gpu/drm/i915/i915_gem_request.c | 3 +
drivers/gpu/drm/i915/i915_gem_userptr.c | 1 +
drivers/gpu/drm/i915/intel_breadcrumbs.c | 1 +
drivers/gpu/drm/i915/intel_drv.h | 1 +
drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 2 +-
drivers/gpu/drm/ttm/ttm_lock.c | 2 +-
drivers/gpu/drm/vc4/vc4_gem.c | 1 +
drivers/gpu/vga/vgaarb.c | 2 +-
drivers/hid/hid-debug.c | 2 +-
drivers/hid/hid-roccat.c | 2 +-
drivers/hid/hidraw.c | 2 +-
drivers/hid/usbhid/hiddev.c | 1 +
drivers/hsi/clients/cmt_speech.c | 2 +-
drivers/hv/vmbus_drv.c | 2 +
drivers/i2c/busses/i2c-ibm_iic.c | 2 +
drivers/i2c/busses/i2c-mpc.c | 2 +-
drivers/ide/ide-cd.c | 1 +
drivers/ide/ide-taskfile.c | 1 +
drivers/iio/industrialio-buffer.c | 2 +-
drivers/infiniband/core/umem.c | 3 +-
drivers/infiniband/core/umem_odp.c | 2 +
drivers/infiniband/hw/cxgb3/iwch_provider.c | 2 +-
drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 2 +-
drivers/infiniband/hw/hfi1/affinity.c | 2 +-
drivers/infiniband/hw/hfi1/file_ops.c | 1 +
drivers/infiniband/hw/hfi1/sdma.c | 2 +-
drivers/infiniband/hw/hfi1/user_pages.c | 2 +-
drivers/infiniband/hw/mlx4/main.c | 3 +
drivers/infiniband/hw/mlx5/main.c | 2 +
drivers/infiniband/hw/qib/qib_user_pages.c | 1 +
drivers/infiniband/hw/usnic/usnic_uiom.c | 3 +-
drivers/infiniband/ulp/ipoib/ipoib_cm.c | 1 +
drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 1 +
drivers/iommu/amd_iommu_v2.c | 1 +
drivers/iommu/intel-svm.c | 1 +
drivers/isdn/capi/kcapi.c | 2 +-
drivers/isdn/i4l/isdn_tty.c | 1 +
drivers/isdn/mISDN/l1oip_core.c | 2 +
drivers/isdn/mISDN/stack.c | 3 +
drivers/isdn/mISDN/timerdev.c | 2 +
drivers/leds/trigger/ledtrig-heartbeat.c | 1 +
drivers/lguest/core.c | 1 +
drivers/lguest/lguest_user.c | 1 +
drivers/macintosh/adb.c | 2 +-
drivers/macintosh/smu.c | 1 +
drivers/macintosh/via-pmu.c | 2 +-
drivers/mailbox/mailbox-test.c | 1 +
drivers/md/bcache/bset.c | 1 +
drivers/md/bcache/btree.c | 3 +
drivers/md/bcache/closure.h | 1 +
drivers/md/bcache/sysfs.c | 1 +
drivers/md/bcache/util.c | 1 +
drivers/md/bcache/util.h | 1 +
drivers/md/bcache/writeback.c | 1 +
drivers/md/dm-bufio.c | 1 +
drivers/md/dm-ioctl.c | 1 +
drivers/md/dm.c | 1 +
drivers/md/md.c | 1 +
drivers/md/persistent-data/dm-block-manager.c | 1 +
drivers/md/raid1.c | 3 +
drivers/md/raid5.c | 2 +
drivers/media/dvb-core/dvb_ca_en50221.c | 2 +-
drivers/media/dvb-core/dvb_demux.c | 2 +-
drivers/media/dvb-core/dvb_frontend.c | 2 +-
drivers/media/pci/cx18/cx18-driver.h | 2 +-
drivers/media/pci/ivtv/ivtv-driver.c | 1 +
drivers/media/pci/ivtv/ivtv-driver.h | 2 +-
drivers/media/pci/pt1/pt1.c | 1 +
drivers/media/pci/pt3/pt3.c | 1 +
drivers/media/pci/solo6x10/solo6x10-i2c.c | 1 +
drivers/media/pci/zoran/zoran_device.c | 1 +
drivers/media/platform/vivid/vivid-radio-rx.c | 2 +
drivers/media/platform/vivid/vivid-radio-tx.c | 1 +
drivers/media/rc/lirc_dev.c | 2 +-
drivers/media/usb/cpia2/cpia2_core.c | 1 +
drivers/media/usb/gspca/cpia1.c | 2 +
drivers/media/v4l2-core/videobuf-dma-sg.c | 2 +-
drivers/misc/cxl/fault.c | 3 +-
drivers/misc/cxl/file.c | 2 +-
drivers/misc/cxl/main.c | 2 +
drivers/misc/cxl/native.c | 1 +
drivers/misc/eeprom/eeprom.c | 1 +
drivers/misc/genwqe/card_dev.c | 2 +-
drivers/misc/ibmasm/r_heartbeat.c | 2 +-
drivers/misc/kgdbts.c | 2 +
drivers/misc/lis3lv02d/lis3lv02d.c | 1 +
drivers/misc/lkdtm_heap.c | 1 +
drivers/misc/lkdtm_usercopy.c | 1 +
drivers/misc/mei/bus.c | 2 +-
drivers/misc/mei/client.c | 2 +-
drivers/misc/mei/main.c | 2 +-
drivers/misc/mic/cosm/cosm_scif_server.c | 2 +
drivers/misc/mic/cosm_client/cosm_scif_client.c | 2 +
drivers/misc/mic/scif/scif_main.h | 2 +-
drivers/misc/mic/scif/scif_rma.c | 3 +
drivers/misc/vexpress-syscfg.c | 2 +-
drivers/misc/vmw_vmci/vmci_context.c | 1 +
drivers/misc/vmw_vmci/vmci_event.c | 1 +
drivers/misc/vmw_vmci/vmci_host.c | 1 +
drivers/misc/vmw_vmci/vmci_resource.c | 1 +
drivers/mmc/core/sdio_irq.c | 1 +
drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 1 +
drivers/mtd/nand/nand_base.c | 1 +
drivers/mtd/tests/mtd_test.h | 2 +-
drivers/net/bonding/bond_options.c | 2 +
drivers/net/bonding/bond_sysfs.c | 2 +-
drivers/net/can/softing/softing_fw.c | 2 +-
drivers/net/ethernet/broadcom/tg3.c | 1 +
drivers/net/ethernet/cavium/liquidio/octeon_main.h | 2 +
drivers/net/ethernet/sfc/falcon/falcon.c | 2 +
drivers/net/irda/pxaficp_ir.c | 1 +
drivers/net/irda/stir4200.c | 1 +
drivers/net/macvtap.c | 2 +-
drivers/net/ppp/ppp_generic.c | 1 +
drivers/net/slip/slip.c | 2 +-
drivers/net/tun.c | 1 +
drivers/net/usb/hso.c | 2 +-
drivers/net/usb/qmi_wwan.c | 1 +
drivers/net/wan/cosa.c | 2 +-
drivers/net/wireless/ath/ath6kl/cfg80211.c | 1 +
drivers/net/wireless/broadcom/b43legacy/main.c | 2 +-
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +-
drivers/net/wireless/intersil/hostap/hostap_hw.c | 2 +-
drivers/net/wireless/intersil/hostap/hostap_ioctl.c | 2 +-
drivers/net/xen-netback/interface.c | 1 +
drivers/nvme/target/admin-cmd.c | 2 +
drivers/nvme/target/core.c | 2 +
drivers/oprofile/buffer_sync.c | 2 +
drivers/oprofile/cpu_buffer.c | 2 +
drivers/oprofile/event_buffer.c | 2 +-
drivers/parisc/power.c | 2 +-
drivers/parport/daisy.c | 2 +-
drivers/parport/ieee1284.c | 2 +-
drivers/parport/ieee1284_ops.c | 2 +-
drivers/parport/parport_ip32.c | 2 +-
drivers/parport/parport_pc.c | 2 +-
drivers/parport/share.c | 2 +-
drivers/pci/access.c | 2 +-
drivers/pci/hotplug/cpci_hotplug_core.c | 1 +
drivers/pci/hotplug/cpqphp.h | 2 +-
drivers/pci/hotplug/pciehp.h | 2 +-
drivers/pci/hotplug/shpchp.h | 2 +-
drivers/perf/arm_pmu.c | 1 +
drivers/platform/x86/intel_ips.c | 1 +
drivers/ps3/ps3-sys-manager.c | 1 +
drivers/rtc/rtc-dev.c | 2 +-
drivers/s390/char/fs3270.c | 1 +
drivers/s390/char/keyboard.c | 2 +-
drivers/s390/cio/cio.c | 2 +-
drivers/s390/cio/device.c | 1 +
drivers/s390/cio/qdio_thinint.c | 2 +
drivers/scsi/bnx2fc/bnx2fc.h | 2 +-
drivers/scsi/bnx2i/bnx2i.h | 2 +-
drivers/scsi/libfc/fc_disc.c | 2 +
drivers/scsi/libfc/fc_rport.c | 2 +
drivers/scsi/libiscsi.c | 1 +
drivers/scsi/lpfc/lpfc_vport.c | 1 +
drivers/scsi/osst.c | 2 +-
drivers/scsi/st.c | 2 +-
drivers/soc/fsl/qbman/dpaa_sys.h | 1 +
drivers/spi/spi.c | 1 +
drivers/staging/android/ion/ion.c | 1 +
drivers/staging/android/ion/ion_heap.c | 1 +
drivers/staging/android/lowmemorykiller.c | 2 +-
drivers/staging/comedi/comedi_fops.c | 2 +-
drivers/staging/dgnc/dgnc_tty.c | 2 +-
drivers/staging/dgnc/dgnc_utils.c | 2 +-
drivers/staging/greybus/uart.c | 2 +-
drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c | 2 +-
drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 1 +
drivers/staging/lustre/lustre/include/lustre_compat.h | 1 +
drivers/staging/lustre/lustre/include/lustre_lib.h | 2 +-
drivers/staging/lustre/lustre/include/obd_support.h | 2 +
drivers/staging/lustre/lustre/ptlrpc/sec.c | 2 +
drivers/staging/media/lirc/lirc_parallel.c | 2 +-
drivers/staging/media/lirc/lirc_sir.c | 2 +-
drivers/staging/media/lirc/lirc_zilog.c | 2 +-
drivers/staging/rtl8188eu/include/osdep_service.h | 2 +-
drivers/staging/rtl8712/osdep_service.h | 2 +-
drivers/staging/rtl8712/rtl8712_cmd.c | 1 +
drivers/staging/speakup/speakup_soft.c | 2 +-
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 1 +
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.h | 2 +-
drivers/target/iscsi/cxgbit/cxgbit_target.c | 2 +
drivers/target/iscsi/iscsi_target.c | 1 +
drivers/target/iscsi/iscsi_target_erl0.c | 2 +
drivers/target/iscsi/iscsi_target_login.c | 1 +
drivers/target/iscsi/iscsi_target_nego.c | 1 +
drivers/thermal/intel_powerclamp.c | 1 +
drivers/tty/n_gsm.c | 2 +-
drivers/tty/pty.c | 2 +-
drivers/tty/serial/crisv10.c | 2 +-
drivers/tty/serial/sc16is7xx.c | 1 +
drivers/tty/serial/serial_core.c | 1 +
drivers/tty/sysrq.c | 4 +-
drivers/tty/tty_io.c | 3 +-
drivers/tty/tty_ioctl.c | 2 +-
drivers/tty/tty_ldsem.c | 2 +
drivers/tty/tty_port.c | 2 +-
drivers/tty/vt/keyboard.c | 4 +-
drivers/tty/vt/vt.c | 2 +-
drivers/tty/vt/vt_ioctl.c | 2 +-
drivers/uio/uio.c | 2 +-
drivers/usb/atm/usbatm.c | 2 +-
drivers/usb/class/cdc-acm.c | 1 +
drivers/usb/class/usblp.c | 2 +-
drivers/usb/core/devio.c | 1 +
drivers/usb/core/hub.c | 2 +-
drivers/usb/gadget/function/f_fs.c | 1 +
drivers/usb/gadget/function/f_mass_storage.c | 1 +
drivers/usb/image/mdc800.c | 2 +-
drivers/usb/misc/adutux.c | 1 +
drivers/usb/misc/idmouse.c | 1 +
drivers/usb/misc/rio500.c | 2 +-
drivers/usb/misc/uss720.c | 1 +
drivers/usb/mon/mon_bin.c | 1 +
drivers/usb/mon/mon_text.c | 1 +
drivers/usb/serial/digi_acceleport.c | 1 +
drivers/usb/serial/generic.c | 1 +
drivers/usb/usbip/usbip_common.h | 1 +
drivers/vfio/vfio_iommu_spapr_tce.c | 3 +
drivers/vfio/vfio_iommu_type1.c | 3 +-
drivers/vhost/net.c | 2 +
drivers/vhost/vhost.c | 2 +
drivers/video/fbdev/cobalt_lcdfb.c | 1 +
drivers/video/fbdev/nvidia/nv_accel.c | 2 +
drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 2 +-
drivers/virtio/virtio_balloon.c | 1 +
drivers/w1/w1_family.c | 2 +-
drivers/w1/w1_int.c | 1 +
drivers/xen/balloon.c | 1 +
drivers/xen/gntdev.c | 1 +
fs/9p/v9fs.c | 1 +
fs/affs/inode.c | 1 +
fs/affs/super.c | 1 +
fs/afs/rxrpc.c | 2 +
fs/aio.c | 2 +-
fs/attr.c | 1 +
fs/autofs4/autofs_i.h | 1 +
fs/autofs4/dev-ioctl.c | 1 +
fs/autofs4/waitq.c | 1 +
fs/befs/linuxvfs.c | 1 +
fs/binfmt_aout.c | 1 +
fs/binfmt_elf.c | 4 +
fs/binfmt_elf_fdpic.c | 3 +
fs/binfmt_flat.c | 1 +
fs/binfmt_misc.c | 2 +-
fs/btrfs/ctree.h | 1 +
fs/btrfs/extent-tree.c | 1 +
fs/btrfs/free-space-cache.c | 1 +
fs/buffer.c | 1 +
fs/cachefiles/internal.h | 1 +
fs/ceph/addr.c | 1 +
fs/ceph/caps.c | 2 +-
fs/cifs/connect.c | 1 +
fs/cifs/inode.c | 2 +
fs/coda/psdev.c | 2 +-
fs/coda/upcall.c | 2 +-
fs/compat.c | 1 +
fs/coredump.c | 4 +-
fs/dax.c | 1 +
fs/dlm/user.c | 1 +
fs/ecryptfs/read_write.c | 2 +
fs/eventfd.c | 2 +-
fs/eventpoll.c | 2 +-
fs/exec.c | 11 +-
fs/exportfs/expfs.c | 1 +
fs/ext2/balloc.c | 1 +
fs/ext4/ext4.h | 1 +
fs/ext4/ialloc.c | 2 +
fs/f2fs/data.c | 1 +
fs/fcntl.c | 1 +
fs/file.c | 2 +-
fs/file_table.c | 1 +
fs/fs_struct.c | 3 +-
fs/fuse/dev.c | 1 +
fs/gfs2/inode.c | 1 +
fs/gfs2/lock_dlm.c | 1 +
fs/gfs2/super.c | 2 +-
fs/gfs2/sys.c | 1 +
fs/hfs/inode.c | 1 +
fs/hfsplus/inode.c | 1 +
fs/hpfs/hpfs_fn.h | 2 +-
fs/hugetlbfs/inode.c | 2 +-
fs/ioctl.c | 2 +
fs/iomap.c | 2 +
fs/isofs/inode.c | 1 +
fs/jffs2/background.c | 2 +-
fs/jffs2/fs.c | 1 +
fs/jffs2/nodemgmt.c | 2 +-
fs/kernfs/file.c | 2 +-
fs/libfs.c | 1 +
fs/lockd/svc.c | 2 +-
fs/namespace.c | 3 +
fs/ncpfs/inode.c | 1 +
fs/ncpfs/ioctl.c | 1 +
fs/ncpfs/sock.c | 1 +
fs/nfs/callback.c | 1 +
fs/nfs/inode.c | 2 +-
fs/nfsd/nfssvc.c | 2 +-
fs/nilfs2/segment.c | 2 +
fs/notify/fanotify/fanotify.c | 1 +
fs/notify/fanotify/fanotify_user.c | 1 +
fs/notify/inotify/inotify_fsnotify.c | 1 +
fs/notify/inotify/inotify_user.c | 2 +-
fs/ntfs/file.c | 2 +-
fs/ocfs2/alloc.c | 1 +
fs/ocfs2/cluster/tcp.c | 1 +
fs/ocfs2/dlm/dlmdomain.c | 1 +
fs/ocfs2/dlmfs/userdlm.c | 1 +
fs/ocfs2/dlmglue.c | 1 +
fs/ocfs2/super.c | 1 +
fs/omfs/inode.c | 1 +
fs/orangefs/orangefs-kernel.h | 2 +-
fs/overlayfs/copy_up.c | 3 +-
fs/overlayfs/inode.c | 1 +
fs/overlayfs/namei.c | 1 +
fs/overlayfs/super.c | 1 +
fs/overlayfs/util.c | 1 +
fs/posix_acl.c | 1 +
fs/proc/array.c | 4 +
fs/proc/base.c | 5 +
fs/proc/fd.c | 2 +-
fs/proc/internal.h | 2 +
fs/proc/kcore.c | 1 +
fs/proc/loadavg.c | 2 +
fs/proc/proc_net.c | 1 +
fs/proc/proc_sysctl.c | 1 +
fs/proc/root.c | 2 +
fs/proc/stat.c | 3 +-
fs/proc/task_mmu.c | 1 +
fs/proc/task_nommu.c | 2 +
fs/proc_namespace.c | 2 +
fs/quota/dquot.c | 1 +
fs/read_write.c | 3 +-
fs/select.c | 4 +-
fs/splice.c | 2 +
fs/stat.c | 1 +
fs/userfaultfd.c | 3 +-
fs/xfs/kmem.c | 1 +
fs/xfs/xfs_buf.c | 1 +
fs/xfs/xfs_ioctl.c | 1 +
fs/xfs/xfs_linux.h | 2 +-
include/drm/drm_mm.h | 1 +
include/drm/drm_os_linux.h | 1 +
include/linux/binfmts.h | 10 +
include/linux/blkdev.h | 1 +
include/linux/cgroup-defs.h | 13 +-
include/linux/cpu.h | 2 +
include/linux/cpuset.h | 2 +
include/linux/cputime.h | 13 -
include/linux/cred.h | 3 +-
include/linux/dcache.h | 1 +
include/linux/delayacct.h | 39 +-
include/linux/dmar.h | 2 +-
include/linux/elfcore.h | 2 +
include/linux/hrtimer.h | 1 -
include/linux/i2c.h | 1 +
include/linux/init_task.h | 4 +-
include/linux/kasan.h | 11 +-
include/linux/khugepaged.h | 3 +-
include/linux/ksm.h | 1 +
include/linux/mm_types.h | 45 +-
include/linux/mm_types_task.h | 87 +
include/linux/nmi.h | 37 +
include/linux/oom.h | 2 +-
include/linux/perf_regs.h | 2 +
include/linux/pid.h | 2 +-
include/linux/preempt.h | 21 +
include/linux/ptrace.h | 1 +
include/linux/rcupdate.h | 40 -
include/linux/rcupdate_wait.h | 50 +
include/linux/rcutiny.h | 11 +-
include/linux/rhashtable.h | 2 +-
include/linux/sched.h | 4157 +++++++---------------------
include/linux/sched/autogroup.h | 31 +
include/linux/sched/clock.h | 104 +
include/linux/sched/coredump.h | 74 +
include/linux/sched/cpufreq.h | 27 +
include/linux/sched/cputime.h | 187 ++
include/linux/sched/deadline.h | 8 +-
include/linux/sched/debug.h | 50 +
include/linux/sched/hotplug.h | 24 +
include/linux/sched/idle.h | 86 +
include/linux/sched/init.h | 11 +
include/linux/sched/jobctl.h | 36 +
include/linux/sched/loadavg.h | 31 +
include/linux/sched/mm.h | 131 +
include/linux/sched/nohz.h | 43 +
include/linux/sched/numa_balancing.h | 46 +
include/linux/sched/prio.h | 6 +-
include/linux/sched/rt.h | 10 +-
include/linux/sched/signal.h | 610 ++++
include/linux/sched/stat.h | 40 +
include/linux/sched/sysctl.h | 10 +-
include/linux/sched/task.h | 139 +
include/linux/sched/task_stack.h | 121 +
include/linux/sched/topology.h | 226 ++
include/linux/sched/user.h | 65 +
include/linux/sched/wake_q.h | 57 +
include/linux/sched/xacct.h | 48 +
include/linux/signal.h | 57 +-
include/linux/signal_types.h | 66 +
include/linux/signalfd.h | 2 +-
include/linux/skbuff.h | 1 +
include/linux/sunrpc/types.h | 1 +
include/linux/taskstats_kern.h | 2 +-
include/linux/timekeeping.h | 4 +
include/linux/timer.h | 2 +-
include/linux/user_namespace.h | 3 +
include/linux/vmacache.h | 2 +-
include/linux/wait.h | 1 +
include/media/v4l2-ioctl.h | 1 +
include/net/bluetooth/hci_core.h | 2 +
include/net/busy_poll.h | 2 +
include/net/scm.h | 1 +
include/rdma/ib.h | 1 +
include/sound/control.h | 1 +
include/target/target_core_base.h | 2 +
include/trace/events/sched.h | 2 +-
include/uapi/linux/sched/types.h | 74 +
init/init_task.c | 1 +
init/main.c | 5 +
ipc/mqueue.c | 3 +
ipc/msg.c | 1 +
ipc/namespace.c | 2 +
ipc/sem.c | 1 +
kernel/acct.c | 2 +
kernel/bpf/syscall.c | 1 +
kernel/cgroup.c | 1 +
kernel/cgroup_pids.c | 2 +-
kernel/cpu.c | 4 +-
kernel/cpuset.c | 2 +
kernel/cred.c | 1 +
kernel/debug/debug_core.c | 5 +-
kernel/debug/gdbstub.c | 1 +
kernel/debug/kdb/kdb_bt.c | 3 +-
kernel/debug/kdb/kdb_main.c | 3 +
kernel/delayacct.c | 2 +
kernel/events/callchain.c | 2 +
kernel/events/core.c | 2 +
kernel/events/uprobes.c | 2 +
kernel/exit.c | 6 +
kernel/fork.c | 33 +-
kernel/futex.c | 2 +
kernel/hung_task.c | 3 +
kernel/irq/manage.c | 2 +
kernel/kmod.c | 2 +
kernel/kthread.c | 2 +
kernel/latencytop.c | 2 +
kernel/locking/lockdep.c | 2 +
kernel/locking/locktorture.c | 2 +
kernel/locking/mutex.c | 4 +-
kernel/locking/qspinlock_stat.h | 1 +
kernel/locking/rtmutex-debug.c | 1 +
kernel/locking/rtmutex.c | 4 +-
kernel/locking/rtmutex_common.h | 1 +
kernel/locking/rwsem-spinlock.c | 3 +-
kernel/locking/rwsem-xadd.c | 4 +-
kernel/locking/rwsem.c | 1 +
kernel/locking/semaphore.c | 1 +
kernel/panic.c | 1 +
kernel/pid.c | 1 +
kernel/pid_namespace.c | 3 +
kernel/power/hibernate.c | 1 +
kernel/power/process.c | 2 +
kernel/power/snapshot.c | 1 +
kernel/printk/printk.c | 3 +
kernel/profile.c | 2 +
kernel/ptrace.c | 3 +
kernel/rcu/rcuperf.c | 1 +
kernel/rcu/rcutorture.c | 3 +-
kernel/rcu/srcu.c | 2 +-
kernel/rcu/tiny.c | 14 +-
kernel/rcu/tree.c | 4 +-
kernel/rcu/tree.h | 1 +
kernel/rcu/tree_plugin.h | 2 +
kernel/rcu/update.c | 4 +-
kernel/sched/Makefile | 4 +-
kernel/sched/{auto_group.c => autogroup.c} | 0
kernel/sched/{auto_group.h => autogroup.h} | 1 +
kernel/sched/clock.c | 2 +
kernel/sched/completion.c | 3 +-
kernel/sched/core.c | 2275 ++-------------
kernel/sched/cpudeadline.c | 4 +-
kernel/sched/cpufreq_schedutil.c | 1 +
kernel/sched/cpupri.c | 4 +-
kernel/sched/cputime.c | 6 +-
kernel/sched/deadline.c | 35 +-
kernel/sched/debug.c | 3 +-
kernel/sched/fair.c | 29 +-
kernel/sched/idle.c | 1 +
kernel/sched/loadavg.c | 1 +
kernel/sched/rt.c | 29 +-
kernel/sched/sched.h | 49 +-
kernel/sched/stats.h | 111 -
kernel/sched/swait.c | 2 +-
kernel/sched/topology.c | 1658 +++++++++++
kernel/sched/wait.c | 3 +-
kernel/seccomp.c | 1 +
kernel/signal.c | 13 +-
kernel/smp.c | 1 +
kernel/smpboot.c | 1 +
kernel/sys.c | 7 +
kernel/sysctl.c | 1 +
kernel/time/alarmtimer.c | 2 +
kernel/time/hrtimer.c | 4 +-
kernel/time/itimer.c | 2 +
kernel/time/posix-cpu-timers.c | 3 +-
kernel/time/posix-timers.c | 1 +
kernel/time/sched_clock.c | 1 +
kernel/time/tick-sched.c | 6 +-
kernel/time/timekeeping.c | 2 +
kernel/time/timer.c | 4 +-
kernel/torture.c | 1 +
kernel/trace/ftrace.c | 1 +
kernel/trace/ring_buffer.c | 1 +
kernel/trace/ring_buffer_benchmark.c | 1 +
kernel/trace/trace_clock.c | 1 +
kernel/trace/trace_events_hist.c | 1 +
kernel/trace/trace_events_trigger.c | 1 +
kernel/trace/trace_hwlat.c | 1 +
kernel/trace/trace_kprobe.c | 1 +
kernel/trace/trace_output.c | 2 +
kernel/trace/trace_selftest.c | 1 +
kernel/trace/trace_stack.c | 1 +
kernel/trace/trace_uprobe.c | 1 +
kernel/tracepoint.c | 3 +-
kernel/tsacct.c | 4 +-
kernel/ucount.c | 1 +
kernel/uid16.c | 1 +
kernel/user.c | 1 +
kernel/user_namespace.c | 1 +
kernel/utsname.c | 2 +
kernel/utsname_sysctl.c | 1 +
kernel/watchdog.c | 3 +
kernel/watchdog_hld.c | 2 +
lib/bug.c | 1 +
lib/debugobjects.c | 1 +
lib/dma-debug.c | 2 +
lib/dump_stack.c | 1 +
lib/is_single_threaded.c | 5 +-
lib/nmi_backtrace.c | 1 +
lib/percpu_ida.c | 3 +-
lib/plist.c | 1 +
lib/rhashtable.c | 1 +
lib/sbitmap.c | 1 +
lib/smp_processor_id.c | 2 +-
lib/syscall.c | 1 +
mm/compaction.c | 1 +
mm/filemap.c | 1 +
mm/gup.c | 2 +-
mm/huge_memory.c | 2 +
mm/hugetlb.c | 1 +
mm/kasan/kasan.c | 11 +
mm/khugepaged.c | 2 +
mm/kmemleak.c | 4 +-
mm/ksm.c | 2 +
mm/memcontrol.c | 1 +
mm/memory-failure.c | 3 +-
mm/memory.c | 4 +
mm/memory_hotplug.c | 1 +
mm/mempolicy.c | 3 +
mm/migrate.c | 1 +
mm/mlock.c | 1 +
mm/mmu_context.c | 2 +
mm/mmu_notifier.c | 1 +
mm/nommu.c | 3 +-
mm/oom_kill.c | 3 +
mm/page-writeback.c | 1 +
mm/page_alloc.c | 1 +
mm/process_vm_access.c | 1 +
mm/rmap.c | 2 +
mm/shmem.c | 1 +
mm/slab.c | 1 +
mm/swapfile.c | 2 +
mm/usercopy.c | 3 +
mm/userfaultfd.c | 1 +
mm/util.c | 2 +
mm/vmacache.c | 13 +-
mm/vmscan.c | 1 +
mm/zsmalloc.c | 1 +
net/9p/client.c | 2 +-
net/atm/common.c | 2 +-
net/atm/svc.c | 2 +-
net/ax25/af_ax25.c | 2 +-
net/bluetooth/af_bluetooth.c | 2 +
net/bluetooth/cmtp/capi.c | 2 +-
net/bluetooth/hci_request.c | 2 +
net/bluetooth/l2cap_sock.c | 1 +
net/bluetooth/rfcomm/sock.c | 1 +
net/bluetooth/sco.c | 1 +
net/bridge/br_sysfs_br.c | 1 +
net/bridge/br_sysfs_if.c | 1 +
net/caif/caif_socket.c | 2 +-
net/ceph/crypto.c | 1 +
net/core/ethtool.c | 2 +-
net/core/net-sysfs.c | 1 +
net/core/net_namespace.c | 2 +
net/core/netclassid_cgroup.c | 2 +
net/core/netprio_cgroup.c | 2 +
net/core/scm.c | 1 +
net/core/stream.c | 1 +
net/dccp/output.c | 1 +
net/decnet/af_decnet.c | 2 +-
net/dns_resolver/dns_query.c | 2 +
net/ipv4/devinet.c | 1 +
net/ipv4/tcp_cdg.c | 2 +
net/ipv6/addrconf.c | 1 +
net/irda/af_irda.c | 1 +
net/irda/ircomm/ircomm_tty.c | 2 +-
net/irda/irnet/irnet_ppp.c | 3 +-
net/iucv/af_iucv.c | 2 +-
net/kcm/kcmsock.c | 2 +
net/llc/af_llc.c | 2 +
net/mac80211/mesh_plink.c | 2 +
net/mac802154/llsec.c | 2 +
net/netfilter/xt_owner.c | 2 +
net/netrom/af_netrom.c | 2 +-
net/nfc/llcp_sock.c | 1 +
net/phonet/pep.c | 1 +
net/phonet/socket.c | 2 +
net/rose/af_rose.c | 2 +-
net/rxrpc/conn_client.c | 2 +
net/rxrpc/recvmsg.c | 2 +
net/rxrpc/sendmsg.c | 2 +
net/sched/em_meta.c | 1 +
net/sctp/socket.c | 1 +
net/sunrpc/auth.c | 1 +
net/sunrpc/svc.c | 2 +-
net/tipc/socket.c | 2 +
net/unix/af_unix.c | 2 +-
net/vmw_vsock/af_vsock.c | 1 +
net/vmw_vsock/virtio_transport_common.c | 1 +
net/x25/af_x25.c | 2 +-
samples/trace_events/trace-events-sample.c | 2 +-
security/apparmor/policy.c | 2 +
security/integrity/evm/evm_main.c | 2 +
security/keys/internal.h | 1 +
security/keys/keyctl.c | 2 +
security/keys/persistent.c | 2 +
security/keys/process_keys.c | 1 +
security/selinux/hooks.c | 3 +-
security/tomoyo/domain.c | 2 +
security/tomoyo/group.c | 2 +
security/tomoyo/util.c | 2 +
sound/core/control.c | 1 +
sound/core/hwdep.c | 1 +
sound/core/oss/pcm_oss.c | 1 +
sound/core/pcm_lib.c | 1 +
sound/core/pcm_native.c | 1 +
sound/core/rawmidi.c | 2 +-
sound/core/seq/oss/seq_oss_device.h | 2 +-
sound/core/seq/oss/seq_oss_writeq.c | 1 +
sound/core/seq/seq_fifo.c | 2 +
sound/core/seq/seq_memory.c | 1 +
sound/core/timer.c | 1 +
sound/firewire/bebob/bebob.h | 1 +
sound/firewire/dice/dice.h | 1 +
sound/firewire/digi00x/digi00x.h | 1 +
sound/firewire/fireworks/fireworks.h | 1 +
sound/firewire/oxfw/oxfw.h | 1 +
sound/firewire/tascam/tascam.h | 1 +
sound/isa/gus/gus_pcm.c | 2 +
sound/isa/msnd/msnd.c | 1 +
sound/isa/sb/emu8000.c | 2 +-
sound/isa/sb/emu8000_patch.c | 2 +
sound/isa/sb/emu8000_pcm.c | 2 +
sound/isa/wavefront/wavefront_synth.c | 1 +
sound/oss/dmabuf.c | 2 +
sound/oss/dmasound/dmasound_core.c | 1 +
sound/oss/midibuf.c | 2 +
sound/oss/msnd_pinnacle.c | 2 +
sound/oss/sound_config.h | 1 +
sound/oss/swarm_cs4297a.c | 2 +-
virt/kvm/async_pf.c | 1 +
virt/kvm/kvm_main.c | 4 +-
1196 files changed, 7431 insertions(+), 5815 deletions(-)
delete mode 100644 include/linux/cputime.h
create mode 100644 include/linux/mm_types_task.h
create mode 100644 include/linux/rcupdate_wait.h
create mode 100644 include/linux/sched/autogroup.h
create mode 100644 include/linux/sched/clock.h
create mode 100644 include/linux/sched/coredump.h
create mode 100644 include/linux/sched/cpufreq.h
create mode 100644 include/linux/sched/cputime.h
create mode 100644 include/linux/sched/debug.h
create mode 100644 include/linux/sched/hotplug.h
create mode 100644 include/linux/sched/idle.h
create mode 100644 include/linux/sched/init.h
create mode 100644 include/linux/sched/jobctl.h
create mode 100644 include/linux/sched/loadavg.h
create mode 100644 include/linux/sched/mm.h
create mode 100644 include/linux/sched/nohz.h
create mode 100644 include/linux/sched/numa_balancing.h
create mode 100644 include/linux/sched/signal.h
create mode 100644 include/linux/sched/stat.h
create mode 100644 include/linux/sched/task.h
create mode 100644 include/linux/sched/task_stack.h
create mode 100644 include/linux/sched/topology.h
create mode 100644 include/linux/sched/user.h
create mode 100644 include/linux/sched/wake_q.h
create mode 100644 include/linux/sched/xacct.h
create mode 100644 include/linux/signal_types.h
create mode 100644 include/uapi/linux/sched/types.h
rename kernel/sched/{auto_group.c => autogroup.c} (100%)
rename kernel/sched/{auto_group.h => autogroup.h} (97%)
create mode 100644 kernel/sched/topology.cSignature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 1/89 sched/core: Clean up comments
Refresh the comments in the core scheduler code:
- Capitalize sentences consistently
- Capitalize 'CPU' consistently
- ... and other small details.
--- kernel/sched/core.c | 358 +++++++++++++++++++++++++++++++++++++----------------------------------- 1 file changed, 182 insertions(+), 176 deletions(-)
kernel/sched/core.c +182 -176
@@ -1,31 +1,10 @@/* * kernel/sched/core.c * -* Kernel scheduler and related syscalls +* Core kernel scheduler code and related syscalls * * Copyright (C) 1991-2002 Linus Torvalds -* -* 1996-12-23 Modified by Dave Grothe to fix bugs in semaphores and -* make semaphores SMP safe -* 1998-11-19 Implemented schedule_timeout() and related stuff -* by Andrea Arcangeli -* 2002-01-04 New ultra-scalable O(1) scheduler by Ingo Molnar: -* hybrid priority-list and round-robin design with -* an array-switch method of distributing timeslices -* and per-CPU runqueues. Cleanups and useful suggestions -* by Davide Libenzi, preemptible kernel bits by Robert Love. -* 2003-09-03 Interactivity tuning by Con Kolivas. -* 2004-04-02 Scheduler domains code by Nick Piggin -* 2007-04-15 Work begun on replacing all interactivity tuning with a -* fair scheduling design by Con Kolivas. -* 2007-05-05 Load balancing (smp-nice) and other improvements -* by Peter Williams -* 2007-05-06 Interactivity improvements to CFS by Mike Galbraith -* 2007-07-01 Group scheduling enhancements by Srivatsa Vaddagiri -* 2007-11-29 RT balancing improvements by Steven Rostedt, Gregory Haskins, -* Thomas Gleixner, Mike Kravetz */ -#include <linux/kasan.h> #include <linux/mm.h> #include <linux/module.h>
@@ -143,7 +122,7 @@ const_debug unsigned int sysctl_sched_nr_migrate = 32; const_debug unsigned int sysctl_sched_time_avg = MSEC_PER_SEC;/* -* period over which we measure -rt task cpu usage in us. +* period over which we measure -rt task CPU usage in us. * default: 1s */ unsigned int sysctl_sched_rt_period =1000000 ;
@@ -156,7 +135,7 @@ __read_mostly int scheduler_running;*/ int sysctl_sched_rt_runtime =950000 ; -/* cpus with isolated domains */ +/* CPUs with isolated domains */ cpumask_var_t cpu_isolated_map;/*
@@ -224,7 +203,7 @@ struct rq *task_rq_lock(struct task_struct *p, struct rq_flags *rf)* If we observe the old cpu in task_rq_lock, the acquire of * the old rq->lock will fully serialize against the stores. * -* If we observe the new cpu in task_rq_lock, the acquire will +* If we observe the new CPU in task_rq_lock, the acquire will * pair with the WMB to ensure we must then also see migrating. */ if (likely (rq ==task_rq (p) && !task_on_rq_migrating (p))) {
@@ -461,7 +440,7 @@ void wake_up_q(struct wake_q_head *head) task = container_of(node, struct task_struct, wake_q);BUG_ON (!task); -/* task can safely be re-inserted now */ +/* Task can safely be re-inserted now: */ node = node->next; task->wake_q.next =NULL ;
@@ -519,12 +498,12 @@ void resched_cpu(int cpu) #ifdef CONFIG_SMP #ifdef CONFIG_NO_HZ_COMMON /* - * In the semi idle case, use the nearest busy cpu for migrating timers - * from an idle cpu. This is good for power-savings. + * In the semi idle case, use the nearest busy CPU for migrating timers + * from an idle CPU. This is good for power-savings. * * We don't do similar optimization for completely idle system, as - * selecting an idle cpu will add more delays to the timers than intended - * (as that cpu's timer base may not be uptodate wrt jiffies etc). + * selecting an idle CPU will add more delays to the timers than intended + * (as that CPU's timer base may not be uptodate wrt jiffies etc). */ int get_nohz_timer_target(void) {
@@ -553,6 +532,7 @@ int get_nohz_timer_target(void)rcu_read_unlock ();return cpu; } +/* * When add_timer_on() enqueues a timer into the timer wheel of an * idle CPU then this timer might expire before the next timer event
@@ -1021,7 +1001,7 @@ struct migration_arg { };/* -* Move (not current) task off this cpu, onto dest cpu. We're doing +* Move (not current) task off this CPU, onto the destination CPU. We're doing * this because either it can't run here any more (set_cpus_allowed() * away from this CPU, or CPU going down), or because we're * attempting to rebalance this task on exec (sched_exec).
@@ -1055,8 +1035,8 @@ static int migration_cpu_stop(void *data)struct rq *rq =this_rq ();/* -* The original target cpu might have gone down and we might -* be on another cpu but it doesn't matter. +* The original target CPU might have gone down and we might +* be on another CPU but it doesn't matter. */ local_irq_disable ();/*
@@ -1174,7 +1154,7 @@ static int __set_cpus_allowed_ptr(struct task_struct *p,if (p->flags &PF_KTHREAD ) {/* * For kernel threads that do indeed end up on online && -* !active we want to ensure they are strict per-cpu threads. +* !active we want to ensure they are strict per-CPU threads. */ WARN_ON(cpumask_intersects(new_mask, cpu_online_mask) && !cpumask_intersects(new_mask, cpu_active_mask) &&
@@ -1279,7 +1259,7 @@ static void __migrate_swap_task(struct task_struct *p, int cpu)/* * Task isn't running anymore; make it appear like we migrated * it before it went to sleep. This means on wakeup we make the -* previous cpu our target instead of where it really is. +* previous CPU our target instead of where it really is. */ p->wake_cpu = cpu; }
@@ -1511,12 +1491,12 @@ EXPORT_SYMBOL_GPL(kick_process);* * - on cpu-up we allow per-cpu kthreads on the online && !active cpu, * see __set_cpus_allowed_ptr(). At this point the newly online -* cpu isn't yet part of the sched domains, and balancing will not +* CPU isn't yet part of the sched domains, and balancing will not * see it. * -* - on cpu-down we clear cpu_active() to mask the sched domains and +* - on CPU-down we clear cpu_active() to mask the sched domains and * avoid the load balancer to place new tasks on the to be removed -* cpu. Existing tasks will remain running there and will be taken +* CPU. Existing tasks will remain running there and will be taken * off. * * This means that fallback selection must not select !active CPUs.
@@ -1532,9 +1512,9 @@ static int select_fallback_rq(int cpu, struct task_struct *p)int dest_cpu;/* -* If the node that the cpu is on has been offlined, cpu_to_node() -* will return -1. There is no cpu on the node, and we should -* select the cpu on the other node. +* If the node that the CPU is on has been offlined, cpu_to_node() +* will return -1. There is no CPU on the node, and we should +* select the CPU on the other node. */ if (nid !=-1 ) { nodemask =cpumask_of_node (nid);
@@ -1566,7 +1546,7 @@ static int select_fallback_rq(int cpu, struct task_struct *p) state = possible;break ; } -/* fall-through */ +/* Fall-through */ case possible:do_set_cpus_allowed (p, cpu_possible_mask); state = fail;
@@ -1610,7 +1590,7 @@ int select_task_rq(struct task_struct *p, int cpu, int sd_flags, int wake_flags)/* * In order not to call set_task_cpu() on a blocking task we need * to rely on ttwu() to place the task on a valid ->cpus_allowed -* cpu. +* CPU. * * Since this is common to all placement strategies, this lives here. *
@@ -1684,7 +1664,7 @@ static inline void ttwu_activate(struct rq *rq, struct task_struct *p, int en_flactivate_task (rq, p, en_flags); p->on_rq =TASK_ON_RQ_QUEUED ; -/* if a worker is waking up, notify workqueue */ +/* If a worker is waking up, notify the workqueue: */ if (p->flags &PF_WQ_WORKER )wq_worker_waking_up (p,cpu_of (rq)); }
@@ -1867,7 +1847,7 @@ void wake_up_if_idle(int cpu)raw_spin_lock_irqsave (&rq->lock, flags);if (is_idle_task (rq->curr))smp_send_reschedule (cpu); -/* Else cpu is not in idle, do nothing here */ +/* Else CPU is not idle, do nothing here: */ raw_spin_unlock_irqrestore (&rq->lock, flags); }
@@ -1888,7 +1868,7 @@ static void ttwu_queue(struct task_struct *p, int cpu, int wake_flags)#if defined(CONFIG_SMP )if (sched_feat (TTWU_QUEUE ) && !cpus_share_cache (smp_processor_id (), cpu)) { -sched_clock_cpu (cpu);/* sync clocks x-cpu */ +sched_clock_cpu (cpu);/* Sync clocks across CPUs */ ttwu_queue_remote (p, cpu, wake_flags);return ; }
@@ -1907,8 +1887,8 @@ static void ttwu_queue(struct task_struct *p, int cpu, int wake_flags)* MIGRATION * * The basic program-order guarantee on SMP systems is that when a task [t] -* migrates, all its activity on its old cpu [c0] happens-before any subsequent -* execution on its new cpu [c1]. +* migrates, all its activity on its old CPU [c0] happens-before any subsequent +* execution on its new CPU [c1]. * * For migration (of runnable tasks) this is provided by the following means: *
@@ -1919,7 +1899,7 @@ static void ttwu_queue(struct task_struct *p, int cpu, int wake_flags)* * Transitivity guarantees that B happens after A and C after B. * Note: we only require RCpc transitivity. -* Note: the cpu doing B need not be c0 or c1 +* Note: the CPU doing B need not be c0 or c1 * * Example: *
@@ -2027,7 +2007,8 @@ try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags)trace_sched_waking (p); - success =1 ;/* we're going to change ->state */ +/* We're going to change ->state: */ + success =1 ; cpu =task_cpu (p);/*
@@ -2076,7 +2057,7 @@ try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags)smp_rmb ();/* -* If the owning (remote) cpu is still in the middle of schedule() with +* If the owning (remote) CPU is still in the middle of schedule() with * this task as prev, wait until its done referencing the task. * * Pairs with the smp_store_release() in finish_lock_switch().
@@ -2448,7 +2429,7 @@ int sched_fork(unsigned long clone_flags, struct task_struct *p)*/ raw_spin_lock_irqsave (&p->pi_lock, flags);/* -* We're setting the cpu for the first time, we don't migrate, +* We're setting the CPU for the first time, we don't migrate, * so use __set_task_cpu(). */ __set_task_cpu (p, cpu);
@@ -2591,7 +2572,7 @@ void wake_up_new_task(struct task_struct *p)/* * Fork balancing, do it here and not earlier because: * - cpus_allowed can change in the fork path -* - any previously selected cpu might disappear through hotplug +* - any previously selected CPU might disappear through hotplug * * Use __set_task_cpu() to avoid calling sched_class::migrate_task_rq, * as we're not fully set-up yet.
@@ -2945,7 +2926,7 @@ unsigned long nr_running(void) }/* -* Check if only the current task is running on the cpu. +* Check if only the current task is running on the CPU. * * Caution: this function does not check that the caller has disabled * preemption, thus the result might have a time-of-check-to-time-of-use
@@ -3104,8 +3085,8 @@ unsigned long long task_sched_runtime(struct task_struct *p)* So we have a optimization chance when the task's delta_exec is 0. * Reading ->on_cpu is racy, but this is ok. * -* If we race with it leaving cpu, we'll take a lock. So we're correct. -* If we race with it entering cpu, unaccounted time is 0. This is +* If we race with it leaving CPU, we'll take a lock. So we're correct. +* If we race with it entering CPU, unaccounted time is 0. This is * indistinguishable from the read occurring a few cycles earlier. * If we see ->on_cpu without ->on_rq, the task is leaving, and has * been accounted, so we're correct here as well.
@@ -3333,7 +3314,7 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)if (unlikely (p ==RETRY_TASK )) goto again; -/* assumes fair_sched_class->next == idle_sched_class */ +/* Assumes fair_sched_class->next == idle_sched_class */ if (unlikely (!p)) p = idle_sched_class.pick_next_task (rq, prev, rf);
@@ -3350,7 +3331,8 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf) } } -BUG ();/* the idle class will always have a runnable task */ +/* The idle class should always have a runnable task: */ +BUG (); }/*
@@ -3421,7 +3403,8 @@ static void __sched notrace __schedule(bool preempt)raw_spin_lock (&rq->lock);rq_pin_lock (rq, &rf); - rq->clock_update_flags <<=1 ;/* promote REQ to ACT */ +/* Promote REQ to ACT */ + rq->clock_update_flags <<=1 ; switch_count = &prev->nivcsw;if (!preempt && prev->state) {
@@ -3465,7 +3448,9 @@ static void __sched notrace __schedule(bool preempt) ++*switch_count;trace_sched_switch (preempt, prev, next); - rq =context_switch (rq, prev, next, &rf);/* unlocks the rq */ + +/* Also unlocks the rq: */ + rq =context_switch (rq, prev, next, &rf); }else { rq->clock_update_flags &= ~(RQCF_ACT_SKIP |RQCF_REQ_SKIP );rq_unpin_lock (rq, &rf);
@@ -3492,14 +3477,18 @@ void __noreturn do_task_dead(void)smp_mb ();raw_spin_unlock_wait (¤t->pi_lock); -/* causes final put_task_struct in finish_task_switch(). */ +/* Causes final put_task_struct in finish_task_switch(): */ __set_current_state (TASK_DEAD ); - current->flags |=PF_NOFREEZE ;/* tell freezer to ignore us */ + +/* Tell freezer to ignore us: */ + current->flags |=PF_NOFREEZE ; +__schedule (false);BUG (); -/* Avoid "noreturn function does return". */ + +/* Avoid "noreturn function does return" - but don't continue if BUG() is a NOP: */ for (;;) -cpu_relax ();/* For when BUG is null */ +cpu_relax (); }static inline void sched_submit_work (struct task_struct *tsk)
@@ -3792,7 +3781,8 @@ void rt_mutex_setprio(struct task_struct *p, int prio)check_class_changed (rq, p, prev_class, oldprio); out_unlock: -preempt_disable ();/* avoid rq from going away on us */ +/* Avoid rq from going away on us: */ +preempt_disable ();__task_rq_unlock (rq, &rf);balance_callback (rq);
@@ -3862,7 +3852,7 @@ EXPORT_SYMBOL(set_user_nice);*/ int can_nice (const struct task_struct *p,const int nice) { -/* convert nice value [19,-20] to rlimit style value [1,40] */ +/* Convert nice value [19,-20] to rlimit style value [1,40]: */ int nice_rlim =nice_to_rlimit (nice); return (nice_rlim <= task_rlimit(p, RLIMIT_NICE) ||
@@ -3918,7 +3908,7 @@ int task_prio(const struct task_struct *p) }/** -* idle_cpu - is a given cpu idle currently? +* idle_cpu - is a given CPU idle currently? * @cpu: the processor in question. * * Return: 1 if the CPU is currently idle. 0 otherwise.
@@ -3942,10 +3932,10 @@ int idle_cpu(int cpu) }/** -* idle_task - return the idle task for a given cpu. +* idle_task - return the idle task for a given CPU. * @cpu: the processor in question. * -* Return: The idle task for the cpu @cpu. +* Return: The idle task for the CPU @cpu. */ struct task_struct *idle_task (int cpu) {
@@ -4111,7 +4101,7 @@ __checkparam_dl(const struct sched_attr *attr) }/* -* check the target process has a UID that matches the current process's +* Check the target process has a UID that matches the current process's: */ static bool check_same_owner (struct task_struct *p) {
@@ -4126,8 +4116,7 @@ static bool check_same_owner(struct task_struct *p)return match; } -static bool dl_param_changed (struct task_struct *p, -const struct sched_attr *attr) +static bool dl_param_changed (struct task_struct *p,const struct sched_attr *attr) {struct sched_dl_entity *dl_se = &p->dl;
@@ -4154,10 +4143,10 @@ static int __sched_setscheduler(struct task_struct *p,int queue_flags =DEQUEUE_SAVE |DEQUEUE_MOVE ;struct rq *rq; -/* may grab non-irq protected spin_locks */ +/* May grab non-irq protected spin_locks: */ BUG_ON (in_interrupt ()); recheck: -/* double check policy once rq lock held */ +/* Double check policy once rq lock held: */ if (policy <0 ) { reset_on_fork = p->sched_reset_on_fork; policy = oldpolicy = p->policy;
@@ -4197,11 +4186,11 @@ static int __sched_setscheduler(struct task_struct *p,unsigned long rlim_rtprio =task_rlimit (p,RLIMIT_RTPRIO ); -/* can't set/change the rt policy */ +/* Can't set/change the rt policy: */ if (policy != p->policy && !rlim_rtprio)return -EPERM ; -/* can't increase priority */ +/* Can't increase priority: */ if (attr->sched_priority > p->rt_priority && attr->sched_priority > rlim_rtprio)return -EPERM ;
@@ -4225,11 +4214,11 @@ static int __sched_setscheduler(struct task_struct *p,return -EPERM ; } -/* can't change other user's priorities */ +/* Can't change other user's priorities: */ if (!check_same_owner (p))return -EPERM ; -/* Normal users shall not reset the sched_reset_on_fork flag */ +/* Normal users shall not reset the sched_reset_on_fork flag: */ if (p->sched_reset_on_fork && !reset_on_fork)return -EPERM ; }
@@ -4241,7 +4230,7 @@ static int __sched_setscheduler(struct task_struct *p, }/* -* make sure no PI-waiters arrive (or leave) while we are +* Make sure no PI-waiters arrive (or leave) while we are * changing the priority of the task: * * To be able to change p->policy safely, the appropriate
@@ -4251,7 +4240,7 @@ static int __sched_setscheduler(struct task_struct *p,update_rq_clock (rq);/* -* Changing the policy of the stop threads its a very bad idea +* Changing the policy of the stop threads its a very bad idea: */ if (p == rq->stop) {task_rq_unlock (rq, p, &rf);
@@ -4307,7 +4296,7 @@ static int __sched_setscheduler(struct task_struct *p,#endif } -/* recheck policy now with rq lock held */ +/* Re-check policy now with rq lock held: */ if (unlikely (oldpolicy !=-1 && oldpolicy != p->policy)) { policy = oldpolicy =-1 ;task_rq_unlock (rq, p, &rf);
@@ -4364,15 +4353,15 @@ static int __sched_setscheduler(struct task_struct *p,set_curr_task (rq, p);check_class_changed (rq, p, prev_class, oldprio); -preempt_disable ();/* avoid rq from going away on us */ + +/* Avoid rq from going away on us: */ +preempt_disable ();task_rq_unlock (rq, p, &rf);if (pi)rt_mutex_adjust_pi (p); -/* -* Run balance callbacks after we've adjusted the PI chain. -*/ +/* Run balance callbacks after we've adjusted the PI chain: */ balance_callback (rq);preempt_enable ();
@@ -4465,8 +4454,7 @@ do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)/* * Mimics kernel/events/core.c perf_copy_attr(). */ -static int sched_copy_attr (struct sched_attr __user *uattr, -struct sched_attr *attr) +static int sched_copy_attr (struct sched_attr __user *uattr,struct sched_attr *attr) {u32 size;int ret;
@@ -4474,19 +4462,19 @@ static int sched_copy_attr(struct sched_attr __user *uattr,if (!access_ok (VERIFY_WRITE , uattr,SCHED_ATTR_SIZE_VER0 ))return -EFAULT ; -/* -* zero the full structure, so that a short copy will be nice. -*/ +/* Zero the full structure, so that a short copy will be nice: */ memset (attr,0 ,sizeof (*attr)); ret =get_user (size, &uattr->size);if (ret)return ret; -if (size >PAGE_SIZE )/* silly large */ +/* Bail out on silly large: */ +if (size >PAGE_SIZE ) goto err_size; -if (!size)/* abi compat */ +/* ABI compatibility quirk: */ +if (!size) size =SCHED_ATTR_SIZE_VER0 ;if (size <SCHED_ATTR_SIZE_VER0 )
@@ -4521,7 +4509,7 @@ static int sched_copy_attr(struct sched_attr __user *uattr,return -EFAULT ;/* -* XXX: do we want to be lenient like existing syscalls; or do we want +* XXX: Do we want to be lenient like existing syscalls; or do we want * to be strict and return an error on out-of-bounds values? */ attr->sched_nice =clamp (attr->sched_nice,MIN_NICE ,MAX_NICE );
@@ -4541,10 +4529,8 @@ static int sched_copy_attr(struct sched_attr __user *uattr,* * Return: 0 on success. An error code otherwise. */ -SYSCALL_DEFINE3 (sched_setscheduler, pid_t, pid, int, policy, - struct sched_param __user *, param) +SYSCALL_DEFINE3(sched_setscheduler, pid_t, pid, int, policy, struct sched_param __user *, param) { -/* negative values for policy are not valid */ if (policy <0 )return -EINVAL ;
@@ -4854,10 +4840,10 @@ static int get_user_cpu_mask(unsigned long __user *user_mask_ptr, unsigned len, }/** -* sys_sched_setaffinity - set the cpu affinity of a process +* sys_sched_setaffinity - set the CPU affinity of a process * @pid: pid of the process * @len: length in bytes of the bitmask pointed to by user_mask_ptr -* @user_mask_ptr: user-space pointer to the new cpu mask +* @user_mask_ptr: user-space pointer to the new CPU mask * * Return: 0 on success. An error code otherwise. */
@@ -4905,10 +4891,10 @@ long sched_getaffinity(pid_t pid, struct cpumask *mask) }/** -* sys_sched_getaffinity - get the cpu affinity of a process +* sys_sched_getaffinity - get the CPU affinity of a process * @pid: pid of the process * @len: length in bytes of the bitmask pointed to by user_mask_ptr -* @user_mask_ptr: user-space pointer to hold the current cpu mask +* @user_mask_ptr: user-space pointer to hold the current CPU mask * * Return: size of CPU mask copied to user_mask_ptr on success. An * error code otherwise.
@@ -5036,7 +5022,7 @@ EXPORT_SYMBOL(__cond_resched_softirq);* Typical broken usage is: * * while (!event) -* yield(); +* yield(); * * where one assumes that yield() will let 'the other' process run that will * make event true. If the current task is a SCHED_FIFO task that will never
@@ -5351,7 +5337,7 @@ void init_idle_bootup_task(struct task_struct *idle)/** * init_idle - set up an idle thread for a given CPU * @idle: task in question -* @cpu: cpu the idle task belongs to +* @cpu: CPU the idle task belongs to * * NOTE: this function does not set the idle thread's NEED_RESCHED * flag, to make booting more robust.
@@ -5382,7 +5368,7 @@ void init_idle(struct task_struct *idle, int cpu)#endif /* * We're having a chicken and egg problem, even though we are -* holding rq->lock, the cpu isn't yet set to this cpu so the +* holding rq->lock, the CPU isn't yet set to this CPU so the * lockdep check in task_group() will fail. * * Similar case to sched_fork(). / Alternatively we could
@@ -5447,7 +5433,7 @@ int task_can_attach(struct task_struct *p,/* * Kthreads which disallow setaffinity shouldn't be moved -* to a new cpuset; we don't want to change their cpu +* to a new cpuset; we don't want to change their CPU * affinity and isolating such threads by their set of * allowed nodes is unnecessary. Thus, cpusets are not * applicable for such threads. This prevents checking for
@@ -5548,7 +5534,7 @@ void sched_setnuma(struct task_struct *p, int nid)#ifdef CONFIG_HOTPLUG_CPU /* -* Ensures that the idle task is using init_mm right before its cpu goes +* Ensure that the idle task is using init_mm right before its CPU goes * offline. */ void idle_task_exit (void )
@@ -5632,13 +5618,13 @@ static void migrate_tasks(struct rq *dead_rq)for (;;) {/* * There's this thread running, bail when that's the only -* remaining thread. +* remaining thread: */ if (rq->nr_running ==1 )break ;/* -* pick_next_task assumes pinned rq->lock. +* pick_next_task() assumes pinned rq->lock: */ rq_pin_lock (rq, &rf); next =pick_next_task (rq, &fake_task, &rf);
@@ -5730,7 +5716,8 @@ static void set_cpu_rq_start_time(unsigned int cpu) rq->age_stamp =sched_clock_cpu (cpu); } -static cpumask_var_t sched_domains_tmpmask;/* sched_domains_mutex */ +/* Protected by sched_domains_mutex: */ +static cpumask_var_t sched_domains_tmpmask;#ifdef CONFIG_SCHED_DEBUG
@@ -5997,7 +5984,7 @@ static int init_rootdomain(struct root_domain *rd) }/* -* By default the system creates a single root-domain with all cpus as +* By default the system creates a single root-domain with all CPUs as * members (mimicking the global state we have today). */ struct root_domain def_root_domain;
@@ -6083,9 +6070,9 @@ static void destroy_sched_domains(struct sched_domain *sd)* SD_SHARE_PKG_RESOURCE set (Last Level Cache Domain) for this * allows us to avoid some pointer chasing select_idle_sibling(). * -* Also keep a unique ID per domain (we use the first cpu number in +* Also keep a unique ID per domain (we use the first CPU number in * the cpumask of the domain), this allows us to quickly tell if -* two cpus are in the same cache domain, see cpus_share_cache(). +* two CPUs are in the same cache domain, see cpus_share_cache(). */ DEFINE_PER_CPU(struct sched_domain *, sd_llc);DEFINE_PER_CPU (int, sd_llc_size);
@@ -6170,7 +6157,7 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu)update_top_cache_domain (cpu); } -/* Setup the mask of cpus configured for isolated domains */ +/* Setup the mask of CPUs configured for isolated domains */ static int __init isolated_cpu_setup (char *str) {int ret;
@@ -6207,8 +6194,7 @@ enum s_alloc {* * In that case build_sched_domains() will have terminated the iteration early * and our sibling sd spans will be empty. Domains should always include the -* cpu they're built on, so check that. -* +* CPU they're built on, so check that. */ static void build_group_mask (struct sched_domain *sd,struct sched_group *sg) {
@@ -6227,7 +6213,7 @@ static void build_group_mask(struct sched_domain *sd, struct sched_group *sg) }/* -* Return the canonical balance cpu for this group, this is the first cpu +* Return the canonical balance CPU for this group, this is the first CPU * of this group that's also in the iteration mask. */ int group_balance_cpu (struct sched_group *sg)
@@ -6287,7 +6273,7 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu)/* * Make sure the first group of this domain contains the -* canonical balance cpu. Otherwise the sched_domain iteration +* canonical balance CPU. Otherwise the sched_domain iteration * breaks. See update_sg_lb_stats(). */ if ((!groups && cpumask_test_cpu(cpu, sg_span)) ||
@@ -6322,7 +6308,9 @@ static int get_group(int cpu, struct sd_data *sdd, struct sched_group **sg)if (sg) { *sg = *per_cpu_ptr (sdd->sg, cpu); (*sg)->sgc = *per_cpu_ptr (sdd->sgc, cpu); -atomic_set (&(*sg)->sgc->ref,1 );/* for claim_allocations */ + +/* For claim_allocations: */ +atomic_set (&(*sg)->sgc->ref,1 ); }return cpu;
@@ -6456,10 +6444,10 @@ static void set_domain_attribute(struct sched_domain *sd, }else request = attr->relax_domain_level;if (request < sd->level) { -/* turn off idle balance on this domain */ +/* Turn off idle balance on this domain: */ sd->flags &= ~(SD_BALANCE_WAKE |SD_BALANCE_NEWIDLE ); }else { -/* turn on idle balance on this domain */ +/* Turn on idle balance on this domain: */ sd->flags |= (SD_BALANCE_WAKE |SD_BALANCE_NEWIDLE ); } }
@@ -6473,18 +6461,21 @@ static void __free_domain_allocs(struct s_data *d, enum s_alloc what,switch (what) {case sa_rootdomain:if (!atomic_read (&d->rd->refcount)) -free_rootdomain (&d->rd->rcu);/* fall through */ +free_rootdomain (&d->rd->rcu); +/* Fall through */ case sa_sd: -free_percpu (d->sd);/* fall through */ +free_percpu (d->sd); +/* Fall through */ case sa_sd_storage: -__sdt_free (cpu_map);/* fall through */ +__sdt_free (cpu_map); +/* Fall through */ case sa_none:break ; } } -static enum s_alloc __visit_domain_allocation_hell (struct s_data *d, -const struct cpumask *cpu_map) +static enum s_alloc +__visit_domain_allocation_hell (struct s_data *d,const struct cpumask *cpu_map) {memset (d,0 ,sizeof (*d));
@@ -6883,7 +6874,7 @@ static void sched_init_numa(void)/* * Now for each level, construct a mask per node which contains all -* cpus of nodes that are that many hops away from us. +* CPUs of nodes that are that many hops away from us. */ for (i =0 ; i < level; i++) { sched_domains_numa_masks[i] =
@@ -7103,11 +7094,11 @@ struct sched_domain *build_sched_domain(struct sched_domain_topology_level *tl, }/* -* Build sched domains for a given set of cpus and attach the sched domains -* to the individual cpus +* Build sched domains for a given set of CPUs and attach the sched domains +* to the individual CPUs */ -static int build_sched_domains (const struct cpumask *cpu_map, -struct sched_domain_attr *attr) +static int +build_sched_domains (const struct cpumask *cpu_map,struct sched_domain_attr *attr) {enum s_alloc alloc_state;struct sched_domain *sd;
@@ -7119,7 +7110,7 @@ static int build_sched_domains(const struct cpumask *cpu_map,if (alloc_state != sa_rootdomain) goto error; -/* Set up domains for cpus specified by the cpu_map. */ +/* Set up domains for CPUs specified by the cpu_map: */ for_each_cpu (i, cpu_map) {struct sched_domain_topology_level *tl;
@@ -7185,21 +7176,25 @@ static int build_sched_domains(const struct cpumask *cpu_map,return ret; } -static cpumask_var_t *doms_cur;/* current sched domains */ -static int ndoms_cur;/* number of sched domains in 'doms_cur' */ -static struct sched_domain_attr *dattr_cur; -/* attribues of custom domains in 'doms_cur' */ +/* Current sched domains: */ +static cpumask_var_t *doms_cur; + +/* Number of sched domains in 'doms_cur': */ +static int ndoms_cur; + +/* Attribues of custom domains in 'doms_cur' */ +static struct sched_domain_attr *dattr_cur;/* -* Special case: If a kmalloc of a doms_cur partition (array of +* Special case: If a kmalloc() of a doms_cur partition (array of * cpumask) fails, then fallback to a single sched domain, * as determined by the single cpumask fallback_doms. */ -static cpumask_var_t fallback_doms; +static cpumask_var_t fallback_doms;/* * arch_update_cpu_topology lets virtualized architectures update the -* cpu core maps. It is supposed to return 1 if the topology changed +* CPU core maps. It is supposed to return 1 if the topology changed * or 0 if it stayed the same. */ int __weak arch_update_cpu_topology (void )
@@ -7234,7 +7229,7 @@ void free_sched_domains(cpumask_var_t doms[], unsigned int ndoms)/* * Set up scheduler domains and groups. Callers must hold the hotplug lock. -* For now this just excludes isolated cpus, but could be used to +* For now this just excludes isolated CPUs, but could be used to * exclude other special cases in the future. */ static int init_sched_domains (const struct cpumask *cpu_map)
@@ -7254,8 +7249,8 @@ static int init_sched_domains(const struct cpumask *cpu_map) }/* -* Detach sched domains from a group of cpus specified in cpu_map -* These cpus will now be attached to the NULL domain +* Detach sched domains from a group of CPUs specified in cpu_map +* These CPUs will now be attached to the NULL domain */ static void detach_destroy_domains (const struct cpumask *cpu_map) {
@@ -7273,7 +7268,7 @@ static int dattrs_equal(struct sched_domain_attr *cur, int idx_cur, {struct sched_domain_attr tmp; -/* fast path */ +/* Fast path: */ if (!new && !cur)return 1 ;
@@ -7317,22 +7312,22 @@ void partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[],mutex_lock (&sched_domains_mutex); -/* always unregister in case we don't destroy any domains */ +/* Always unregister in case we don't destroy any domains: */ unregister_sched_domain_sysctl (); -/* Let architecture update cpu core mappings. */ +/* Let the architecture update CPU core mappings: */ new_topology =arch_update_cpu_topology (); n = doms_new ? ndoms_new :0 ; -/* Destroy deleted domains */ +/* Destroy deleted domains: */ for (i =0 ; i < ndoms_cur; i++) {for (j =0 ; j < n && !new_topology; j++) {if (cpumask_equal (doms_cur[i], doms_new[j]) &&dattrs_equal (dattr_cur, i, dattr_new, j)) goto match1; } -/* no match - a current sched domain not in new doms_new[] */ +/* No match - a current sched domain not in new doms_new[] */ detach_destroy_domains (doms_cur[i]); match1: ;
@@ -7346,23 +7341,24 @@ void partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[],WARN_ON_ONCE (dattr_new); } -/* Build new domains */ +/* Build new domains: */ for (i =0 ; i < ndoms_new; i++) {for (j =0 ; j < n && !new_topology; j++) {if (cpumask_equal (doms_new[i], doms_cur[j]) &&dattrs_equal (dattr_new, i, dattr_cur, j)) goto match2; } -/* no match - add a new doms_new */ +/* No match - add a new doms_new */ build_sched_domains (doms_new[i], dattr_new ? dattr_new + i :NULL ); match2: ; } -/* Remember the new sched domains */ +/* Remember the new sched domains: */ if (doms_cur != &fallback_doms)free_sched_domains (doms_cur, ndoms_cur); -kfree (dattr_cur);/* kfree(NULL) is safe */ + +kfree (dattr_cur); doms_cur = doms_new; dattr_cur = dattr_new; ndoms_cur = ndoms_new;
@@ -7372,7 +7368,10 @@ void partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[],mutex_unlock (&sched_domains_mutex); } -static int num_cpus_frozen;/* used to mark begin/end of suspend/resume */ +/* +* used to mark begin/end of suspend/resume: +*/ +static int num_cpus_frozen;/* * Update cpusets according to cpu_active mask. If cpusets are
@@ -7449,7 +7448,7 @@ int sched_cpu_activate(unsigned int cpu)* Put the rq online, if not already. This happens: * * 1) In the early boot process, because we build the real domains -* after all cpus have been brought up. +* after all CPUs have been brought up. * * 2) At runtime, if cpuset_cpu_active() fails to rebuild the * domains.
@@ -7564,7 +7563,7 @@ void __init sched_init_smp(void)/* * There's no userspace yet to cause hotplug operations; hence all the -* cpu masks are stable and all blatant races in the below code cannot +* CPU masks are stable and all blatant races in the below code cannot * happen. */ mutex_lock (&sched_domains_mutex);
@@ -7684,10 +7683,8 @@ void __init sched_init(void) }#endif /* CONFIG_CPUMASK_OFFSTACK */ -init_rt_bandwidth (&def_rt_bandwidth, -global_rt_period (),global_rt_runtime ()); -init_dl_bandwidth (&def_dl_bandwidth, -global_rt_period (),global_rt_runtime ()); +init_rt_bandwidth (&def_rt_bandwidth,global_rt_period (),global_rt_runtime ()); +init_dl_bandwidth (&def_dl_bandwidth,global_rt_period (),global_rt_runtime ());#ifdef CONFIG_SMP init_defrootdomain ();
@@ -7723,18 +7720,18 @@ void __init sched_init(void)INIT_LIST_HEAD (&rq->leaf_cfs_rq_list); rq->tmp_alone_branch = &rq->leaf_cfs_rq_list;/* -* How much cpu bandwidth does root_task_group get? +* How much CPU bandwidth does root_task_group get? * * In case of task-groups formed thr' the cgroup filesystem, it -* gets 100% of the cpu resources in the system. This overall -* system cpu resource is divided among the tasks of +* gets 100% of the CPU resources in the system. This overall +* system CPU resource is divided among the tasks of * root_task_group and its child task-groups in a fair manner, * based on each entity's (task or task-group's) weight * (se->load.weight). * * In other words, if root_task_group has 10 tasks of weight * 1024) and two child groups A0 and A1 (of weight 1024 each), -* then A0's share of the cpu resource is: +* then A0's share of the CPU resource is: * * A0's bandwidth = 1024 / (10*1024 + 1024 + 1024) = 8.33% *
@@ -7843,10 +7840,14 @@ EXPORT_SYMBOL(__might_sleep);void ___might_sleep (const char *file,int line,int preempt_offset) { -static unsigned long prev_jiffy;/* ratelimiting */ +/* Ratelimiting timestamp: */ +static unsigned long prev_jiffy; +unsigned long preempt_disable_ip; -rcu_sleep_check ();/* WARN_ON_ONCE() by default, no rate limit reqd. */ +/* WARN_ON_ONCE() by default, no rate limit required: */ +rcu_sleep_check (); +if ((preempt_count_equals (preempt_offset) && !irqs_disabled () && !is_idle_task (current)) || system_state !=SYSTEM_RUNNING || oops_in_progress)
@@ -7855,7 +7856,7 @@ void ___might_sleep(const char *file, int line, int preempt_offset)return ; prev_jiffy = jiffies; -/* Save this before calling printk(), since that will clobber it */ +/* Save this before calling printk(), since that will clobber it: */ preempt_disable_ip =get_preempt_disable_ip (current); printk(KERN_ERR
@@ -7934,7 +7935,7 @@ void normalize_rt_tasks(void)*/ /** -* curr_task - return the current task for a given cpu. +* curr_task - return the current task for a given CPU. * @cpu: the processor in question. * * ONLY VALID WHEN THE WHOLE SYSTEM IS STOPPED!
@@ -7950,13 +7951,13 @@ struct task_struct *curr_task(int cpu)#ifdef CONFIG_IA64 /** -* set_curr_task - set the current task for a given cpu. +* set_curr_task - set the current task for a given CPU. * @cpu: the processor in question. * @p: the task pointer to set. * * Description: This function must only be used when non-maskable interrupts * are serviced on a separate stack. It allows the architecture to switch the -* notion of the current task on a cpu in a non-blocking manner. This function +* notion of the current task on a CPU in a non-blocking manner. This function * must be called with all CPU's synchronized, and interrupts disabled, the * and caller must save the original value of the current task (see * curr_task() above) and restore that value before reenabling interrupts and
@@ -8012,7 +8013,8 @@ void sched_online_group(struct task_group *tg, struct task_group *parent)spin_lock_irqsave (&task_group_lock, flags);list_add_rcu (&tg->list, &task_groups); -WARN_ON (!parent);/* root should already exist */ +/* Root should already exist: */ +WARN_ON (!parent); tg->parent = parent;INIT_LIST_HEAD (&tg->children);
@@ -8025,13 +8027,13 @@ void sched_online_group(struct task_group *tg, struct task_group *parent)/* rcu callback to free various structures associated with a task group */ static void sched_free_group_rcu (struct rcu_head *rhp) { -/* now it should be safe to free those cfs_rqs */ +/* Now it should be safe to free those cfs_rqs: */ sched_free_group (container_of(rhp ,struct task_group ,rcu )); }void sched_destroy_group (struct task_group *tg) { -/* wait for possible concurrent references to cfs_rqs complete */ +/* Wait for possible concurrent references to cfs_rqs complete: */ call_rcu (&tg->rcu, sched_free_group_rcu); }
@@ -8039,7 +8041,7 @@ void sched_offline_group(struct task_group *tg) {unsigned long flags; -/* end participation in shares distribution */ +/* End participation in shares distribution: */ unregister_fair_sched_group (tg);spin_lock_irqsave (&task_group_lock, flags);
@@ -8468,8 +8470,10 @@ int sched_rr_handler(struct ctl_table *table, int write,mutex_lock (&mutex); ret =proc_dointvec (table, write, buffer, lenp, ppos); -/* make sure that internally we keep jiffies */ -/* also, writing zero resets timeslice to default */ +/* +* Make sure that internally we keep jiffies. +* Also, writing zero resets the timeslice to default: +*/ if (!ret && write) { sched_rr_timeslice = sysctl_sched_rr_timeslice <= 0 ? RR_TIMESLICE :
@@ -8654,9 +8658,11 @@ static int tg_set_cfs_bandwidth(struct task_group *tg, u64 period, u64 quota) cfs_b->quota = quota;__refill_cfs_bandwidth_runtime (cfs_b); -/* restart the period timer (if active) to handle new period expiry */ + +/* Restart the period timer (if active) to handle new period expiry: */ if (runtime_enabled)start_cfs_bandwidth (cfs_b); +raw_spin_unlock_irq (&cfs_b->lock);for_each_online_cpu (i) {
@@ -8794,8 +8800,8 @@ static int tg_cfs_schedulable_down(struct task_group *tg, void *data) parent_quota = parent_b->hierarchical_quota;/* -* ensure max(child_quota) <= parent_quota, inherit when no -* limit is set +* Ensure max(child_quota) <= parent_quota, inherit when no +* limit is set: */ if (quota ==RUNTIME_INF ) quota = parent_quota;
@@ -8904,7 +8910,7 @@ static struct cftype cpu_files[] = { .write_u64 = cpu_rt_period_write_uint, },#endif - { }/* terminate */ + { }/* Terminate */ }; struct cgroup_subsys cpu_cgrp_subsys = {
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 2/89 delayacct: Include <uapi/linux/taskstats.h>
In reply to Ingo Molnarinclude/linux/delayacct.h relies on 'struct taskstats' but does not include the header that defines it.
This worked so far because files that included <linux/taskstats.h> also happened to include other headers that included uapi/linux/taskstats.h.
Fix it.
--- include/linux/delayacct.h | 1 + 1 file changed, 1 insertion(+)
include/linux/delayacct.h +1 -0
@@ -17,6 +17,7 @@#ifndef _LINUX_DELAYACCT_H#define _LINUX_DELAYACCT_H +#include <uapi/linux/taskstats.h> #include <linux/sched.h> #include <linux/slab.h>
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 3/89 sched/rq_clock: Consolidate the ordering of the rq_clock methods
In reply to Ingo Molnarupdate_rq_clock_task() and update_rq_clock() we unnecessarily spread across core.c, requiring an extra prototype line.
Move them next to each other and in the proper order.
--- kernel/sched/core.c | 153 +++++++++++++++++++++++++++++++++++++----------------------------------- 1 file changed, 78 insertions(+), 75 deletions(-)
kernel/sched/core.c +78 -75
@@ -73,27 +73,6 @@DEFINE_MUTEX (sched_domains_mutex); DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues); -static void update_rq_clock_task (struct rq *rq,s64 delta); - -void update_rq_clock (struct rq *rq) -{ -s64 delta; - -lockdep_assert_held (&rq->lock); - -if (rq->clock_update_flags &RQCF_ACT_SKIP ) -return ; - -#ifdef CONFIG_SCHED_DEBUG - rq->clock_update_flags |=RQCF_UPDATED ; -#endif - delta =sched_clock_cpu (cpu_of (rq)) - rq->clock; -if (delta <0 ) -return ; - rq->clock += delta; -update_rq_clock_task (rq, delta); -} -/* * Debugging: various feature bits */
@@ -218,6 +197,84 @@ struct rq *task_rq_lock(struct task_struct *p, struct rq_flags *rf) } } +/* +* RQ-clock updating methods: +*/ + +static void update_rq_clock_task (struct rq *rq,s64 delta) +{ +/* +* In theory, the compile should just see 0 here, and optimize out the call +* to sched_rt_avg_update. But I don't trust it... +*/ +#if defined(CONFIG_IRQ_TIME_ACCOUNTING ) || defined(CONFIG_PARAVIRT_TIME_ACCOUNTING ) +s64 steal =0 , irq_delta =0 ; +#endif +#ifdef CONFIG_IRQ_TIME_ACCOUNTING + irq_delta =irq_time_read (cpu_of (rq)) - rq->prev_irq_time; + +/* +* Since irq_time is only updated on {soft,}irq_exit, we might run into +* this case when a previous update_rq_clock() happened inside a +* {soft,}irq region. +* +* When this happens, we stop ->clock_task and only update the +* prev_irq_time stamp to account for the part that fit, so that a next +* update will consume the rest. This ensures ->clock_task is +* monotonic. +* +* It does however cause some slight miss-attribution of {soft,}irq +* time, a more accurate solution would be to update the irq_time using +* the current rq->clock timestamp, except that would require using +* atomic ops. +*/ +if (irq_delta > delta) + irq_delta = delta; + + rq->prev_irq_time += irq_delta; + delta -= irq_delta; +#endif +#ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING +if (static_key_false ((¶virt_steal_rq_enabled))) { + steal =paravirt_steal_clock (cpu_of (rq)); + steal -= rq->prev_steal_time_rq; + +if (unlikely (steal > delta)) + steal = delta; + + rq->prev_steal_time_rq += steal; + delta -= steal; + } +#endif + + rq->clock_task += delta; + +#if defined(CONFIG_IRQ_TIME_ACCOUNTING ) || defined(CONFIG_PARAVIRT_TIME_ACCOUNTING ) +if ((irq_delta + steal) &&sched_feat (NONTASK_CAPACITY )) +sched_rt_avg_update (rq, irq_delta + steal); +#endif +} + +void update_rq_clock (struct rq *rq) +{ +s64 delta; + +lockdep_assert_held (&rq->lock); + +if (rq->clock_update_flags &RQCF_ACT_SKIP ) +return ; + +#ifdef CONFIG_SCHED_DEBUG + rq->clock_update_flags |=RQCF_UPDATED ; +#endif + delta =sched_clock_cpu (cpu_of (rq)) - rq->clock; +if (delta <0 ) +return ; + rq->clock += delta; +update_rq_clock_task (rq, delta); +} + +#ifdef CONFIG_SCHED_HRTICK /* * Use HR-timers to deliver accurate preemption points.
@@ -767,60 +824,6 @@ void deactivate_task(struct rq *rq, struct task_struct *p, int flags)dequeue_task (rq, p, flags); } -static void update_rq_clock_task (struct rq *rq,s64 delta) -{ -/* -* In theory, the compile should just see 0 here, and optimize out the call -* to sched_rt_avg_update. But I don't trust it... -*/ -#if defined(CONFIG_IRQ_TIME_ACCOUNTING ) || defined(CONFIG_PARAVIRT_TIME_ACCOUNTING ) -s64 steal =0 , irq_delta =0 ; -#endif -#ifdef CONFIG_IRQ_TIME_ACCOUNTING - irq_delta =irq_time_read (cpu_of (rq)) - rq->prev_irq_time; - -/* -* Since irq_time is only updated on {soft,}irq_exit, we might run into -* this case when a previous update_rq_clock() happened inside a -* {soft,}irq region. -* -* When this happens, we stop ->clock_task and only update the -* prev_irq_time stamp to account for the part that fit, so that a next -* update will consume the rest. This ensures ->clock_task is -* monotonic. -* -* It does however cause some slight miss-attribution of {soft,}irq -* time, a more accurate solution would be to update the irq_time using -* the current rq->clock timestamp, except that would require using -* atomic ops. -*/ -if (irq_delta > delta) - irq_delta = delta; - - rq->prev_irq_time += irq_delta; - delta -= irq_delta; -#endif -#ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING -if (static_key_false ((¶virt_steal_rq_enabled))) { - steal =paravirt_steal_clock (cpu_of (rq)); - steal -= rq->prev_steal_time_rq; - -if (unlikely (steal > delta)) - steal = delta; - - rq->prev_steal_time_rq += steal; - delta -= steal; - } -#endif - - rq->clock_task += delta; - -#if defined(CONFIG_IRQ_TIME_ACCOUNTING ) || defined(CONFIG_PARAVIRT_TIME_ACCOUNTING ) -if ((irq_delta + steal) &&sched_feat (NONTASK_CAPACITY )) -sched_rt_avg_update (rq, irq_delta + steal); -#endif -} -void sched_set_stop_task (int cpu,struct task_struct *stop) {struct sched_param param = { .sched_priority =MAX_RT_PRIO -1 };
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 4/89 sched/core: Remove unnecessary #include headers
In reply to Ingo MolnarOver the years sched/core.c accumulated over 50 #include lines, 40 of which are superfluous. (!)
Removing them decreases the preprocessed .c file (.i) size noticeably:
triton:~/tip> wc -l kernel/sched/core.i
Before: 76387 kernel/sched/core.i
After: 75896 kernel/sched/core.i
--- kernel/sched/core.c | 59 ++++++++++------------------------------------------------- 1 file changed, 10 insertions(+), 49 deletions(-)
kernel/sched/core.c +10 -49
@@ -5,63 +5,24 @@* * Copyright (C) 1991-2002 Linus Torvalds */ -#include <linux/kasan.h> -#include <linux/mm.h> -#include <linux/module.h> -#include <linux/nmi.h> -#include <linux/init.h> -#include <linux/uaccess.h> -#include <linux/highmem.h> -#include <linux/mmu_context.h> -#include <linux/interrupt.h> -#include <linux/capability.h> -#include <linux/completion.h> -#include <linux/kernel_stat.h> -#include <linux/debug_locks.h> -#include <linux/perf_event.h> -#include <linux/security.h> -#include <linux/notifier.h> -#include <linux/profile.h> -#include <linux/freezer.h> -#include <linux/vmalloc.h> -#include <linux/blkdev.h> -#include <linux/delay.h> -#include <linux/pid_namespace.h> -#include <linux/smp.h> -#include <linux/threads.h> -#include <linux/timer.h> -#include <linux/rcupdate.h> -#include <linux/cpu.h> +#include <linux/sched.h> #include <linux/cpuset.h> -#include <linux/percpu.h> -#include <linux/proc_fs.h> -#include <linux/seq_file.h> -#include <linux/sysctl.h> -#include <linux/syscalls.h> -#include <linux/times.h> -#include <linux/tsacct_kern.h> -#include <linux/kprobes.h> #include <linux/delayacct.h> -#include <linux/unistd.h> -#include <linux/pagemap.h> -#include <linux/hrtimer.h> -#include <linux/tick.h> -#include <linux/ctype.h> -#include <linux/ftrace.h> -#include <linux/slab.h> #include <linux/init_task.h> #include <linux/context_tracking.h> -#include <linux/compiler.h> -#include <linux/frame.h> + +#include <linux/blkdev.h> +#include <linux/kprobes.h> +#include <linux/mmu_context.h> +#include <linux/module.h> +#include <linux/nmi.h> #include <linux/prefetch.h> -#include <linux/mutex.h> +#include <linux/profile.h> +#include <linux/security.h> +#include <linux/syscalls.h> #include <asm/switch_to.h> #include <asm/tlb.h> -#include <asm/irq_regs.h> -#ifdef CONFIG_PARAVIRT -#include <asm/paravirt.h> -#endif #include "sched.h" #include "../workqueue_internal.h"
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 5/89 sched/topology: Split out scheduler topology code from core.c into topology.c
In reply to Ingo Molnar--- kernel/sched/Makefile | 2 +- kernel/sched/core.c | 1659 +------------------------------------------------------------------ kernel/sched/sched.h | 23 +- kernel/sched/topology.c | 1658 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1684 insertions(+), 1658 deletions(-)
kernel/sched/Makefile +1 -1
@@ -18,7 +18,7 @@ endif obj-y += core.o loadavg.o clock.o cputime.o obj-y += idle_task.o fair.o rt.o deadline.o stop_task.o obj-y += wait.o swait.o completion.o idle.o -obj-$(CONFIG_SMP) += cpupri.o cpudeadline.o +obj-$(CONFIG_SMP) += cpupri.o cpudeadline.o topology.o obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o obj-$(CONFIG_SCHEDSTATS) += stats.o obj-$(CONFIG_SCHED_DEBUG) += debug.o
kernel/sched/core.c +3 -1656
1,689 lines not on this page · raw message
kernel/sched/sched.h +22 -1
@@ -223,7 +223,7 @@ bool __dl_overflow(struct dl_bw *dl_b, int cpus, u64 old_bw, u64 new_bw) dl_b->bw * cpus < dl_b->total_bw - old_bw + new_bw; } -extern struct mutex sched_domains_mutex; +extern void init_dl_bw (struct dl_bw *dl_b);#ifdef CONFIG_CGROUP_SCHED
@@ -584,6 +584,13 @@ struct root_domain { };extern struct root_domain def_root_domain; +extern struct mutex sched_domains_mutex; +extern cpumask_var_t fallback_doms; +extern cpumask_var_t sched_domains_tmpmask; + +extern void init_defrootdomain (void ); +extern int init_sched_domains (const struct cpumask *cpu_map); +extern void rq_attach_root (struct rq *rq,struct root_domain *rd);#endif /* CONFIG_SMP */
@@ -886,6 +893,16 @@ extern int sched_max_numa_distance;extern bool find_numa_distance (int distance);#endif +#ifdef CONFIG_NUMA +extern void sched_init_numa (void ); +extern void sched_domains_numa_masks_set (unsigned int cpu); +extern void sched_domains_numa_masks_clear (unsigned int cpu); +#else +static inline void sched_init_numa (void ) { } +static inline void sched_domains_numa_masks_set (unsigned int cpu) { } +static inline void sched_domains_numa_masks_clear (unsigned int cpu) { } +#endif +#ifdef CONFIG_NUMA_BALANCING /* The regions in numa_faults array from task_struct */ enum numa_faults_stats {
@@ -1752,6 +1769,10 @@ static inline void double_rq_unlock(struct rq *rq1, struct rq *rq2) __release(rq2->lock); } +extern void set_rq_online (struct rq *rq); +extern void set_rq_offline (struct rq *rq); +extern bool sched_smp_initialized; +#else /* CONFIG_SMP */ /*
kernel/sched/topology.c new file +1658 -0
1,256 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.7.4
Part of the diff is not shown here. View the raw message.
Ingo Molnar
maintainerPATCH 6/89 sched/topology: Split out scheduler topology interfaces from <linux/sched.h> into <linux/sched/topology.h>
In reply to Ingo MolnarThe vast majority of sched.h users does not require the topology types and interfaces, so split them out into a separate header, and include them in the .c files that require them.
This reduces the size of linux/sched.h by ~6%.
--- arch/arm/kernel/topology.c | 1 + arch/arm64/kernel/topology.c | 1 + arch/powerpc/kernel/smp.c | 1 + arch/s390/kernel/topology.c | 1 + arch/x86/kernel/smpboot.c | 1 + block/blk-mq.c | 1 + block/blk-softirq.c | 1 + include/linux/cpuset.h | 1 + include/linux/sched.h | 212 ----------------------------------------------------------- include/linux/sched/topology.h | 217 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ kernel/sched/fair.c | 2 + kernel/sched/sched.h | 1 + 12 files changed, 228 insertions(+), 212 deletions(-)
arch/arm/kernel/topology.c +1 -0
@@ -21,6 +21,7 @@#include <linux/nodemask.h> #include <linux/of.h> #include <linux/sched.h> +#include <linux/sched/topology.h> #include <linux/slab.h> #include <linux/string.h>
arch/arm64/kernel/topology.c +1 -0
@@ -20,6 +20,7 @@#include <linux/nodemask.h> #include <linux/of.h> #include <linux/sched.h> +#include <linux/sched/topology.h> #include <linux/slab.h> #include <linux/string.h> #include <linux/cpufreq.h>
arch/powerpc/kernel/smp.c +1 -0
@@ -20,6 +20,7 @@#include <linux/kernel.h> #include <linux/export.h> #include <linux/sched.h> +#include <linux/sched/topology.h> #include <linux/smp.h> #include <linux/interrupt.h> #include <linux/delay.h>
arch/s390/kernel/topology.c +1 -0
@@ -13,6 +13,7 @@#include <linux/export.h> #include <linux/kernel.h> #include <linux/sched.h> +#include <linux/sched/topology.h> #include <linux/delay.h> #include <linux/init.h> #include <linux/slab.h>
arch/x86/kernel/smpboot.c +1 -0
@@ -45,6 +45,7 @@#include <linux/smp.h> #include <linux/export.h> #include <linux/sched.h> +#include <linux/sched/topology.h> #include <linux/percpu.h> #include <linux/bootmem.h> #include <linux/err.h>
block/blk-mq.c +1 -0
@@ -20,6 +20,7 @@#include <linux/cpu.h> #include <linux/cache.h> #include <linux/sched/sysctl.h> +#include <linux/sched/topology.h> #include <linux/delay.h> #include <linux/crash_dump.h> #include <linux/prefetch.h>
block/blk-softirq.c +1 -0
@@ -9,6 +9,7 @@#include <linux/interrupt.h> #include <linux/cpu.h> #include <linux/sched.h> +#include <linux/sched/topology.h> #include "blk.h"
include/linux/cpuset.h +1 -0
@@ -9,6 +9,7 @@*/ #include <linux/sched.h> +#include <linux/sched/topology.h> #include <linux/cpumask.h> #include <linux/nodemask.h> #include <linux/mm.h>
include/linux/sched.h +0 -212
226 lines not on this page · raw message
include/linux/sched/topology.h new file +217 -0
217 lines not on this page · raw message
kernel/sched/fair.c +2 -0
@@ -21,6 +21,8 @@*/ #include <linux/sched.h> +#include <linux/sched/topology.h> +#include <linux/latencytop.h> #include <linux/cpumask.h> #include <linux/cpuidle.h>
kernel/sched/sched.h +1 -0
@@ -1,6 +1,7 @@#include <linux/sched.h> #include <linux/sched/sysctl.h> +#include <linux/sched/topology.h> #include <linux/sched/rt.h> #include <linux/u64_stats_sync.h> #include <linux/sched/deadline.h>
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 7/89 sched/idle: Create <linux/sched/idle.h> for idle CPU related definitions
In reply to Ingo Molnar--- include/linux/sched.h | 7 ------- include/linux/sched/idle.h | 11 +++++++++++ include/linux/sched/topology.h | 2 ++ 3 files changed, 13 insertions(+), 7 deletions(-)
include/linux/sched.h +0 -7
@@ -951,13 +951,6 @@ static inline int sched_info_on(void)void force_schedstat_enabled (void );#endif -enum cpu_idle_type { -CPU_IDLE , -CPU_NOT_IDLE , -CPU_NEWLY_IDLE , -CPU_MAX_IDLE_TYPES -}; -/* * Integer metrics need fixed point arithmetic, e.g., sched/fair * has a few: load, load_avg, util_avg, freq, and capacity.
include/linux/sched/idle.h new file +11 -0
@@ -0,0 +1,11 @@ +#ifndef _LINUX_SCHED_IDLE_H +#define _LINUX_SCHED_IDLE_H + +enum cpu_idle_type { +CPU_IDLE , +CPU_NOT_IDLE , +CPU_NEWLY_IDLE , +CPU_MAX_IDLE_TYPES +}; + +#endif /* _LINUX_SCHED_IDLE_H */
include/linux/sched/topology.h +2 -0
@@ -1,6 +1,8 @@#ifndef _LINUX_SCHED_TOPOLOGY_H#define _LINUX_SCHED_TOPOLOGY_H +#include <linux/sched/idle.h> +/* * sched-domains (multiprocessor balancing) declarations: */
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 8/89 sched/idle: Move wake_up_if_idle prototype to <linux/sched/idle.h>
In reply to Ingo MolnarNo need to clutter <linux/sched.h> with this rarely used prototype.
--- include/linux/sched.h | 2 -- include/linux/sched/idle.h | 2 ++ kernel/smp.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-)
include/linux/sched.h +0 -2
@@ -1011,8 +1011,6 @@ extern void wake_q_add(struct wake_q_head *head, struct task_struct *task);extern void wake_up_q (struct wake_q_head *head); -extern void wake_up_if_idle (int cpu); -struct io_context ;/* See blkdev.h */
include/linux/sched/idle.h +2 -0
@@ -8,4 +8,6 @@ enum cpu_idle_type {CPU_MAX_IDLE_TYPES }; +extern void wake_up_if_idle (int cpu); +#endif /* _LINUX_SCHED_IDLE_H */
kernel/smp.c +1 -0
@@ -17,6 +17,7 @@#include <linux/smp.h> #include <linux/cpu.h> #include <linux/sched.h> +#include <linux/sched/idle.h> #include <linux/hypervisor.h> #include "smpboot.h"
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 9/89 sched/wake_q: Move the wake-queue types and interfaces from sched.h into <linux/sched/wake_q.h>
In reply to Ingo MolnarNote that this requires the basic task->wake_q type to be an opaque void *.
--- include/linux/sched.h | 52 +--------------------------------------------------- include/linux/sched/wake_q.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ ipc/mqueue.c | 1 + ipc/msg.c | 1 + ipc/sem.c | 1 + kernel/fork.c | 2 +- kernel/futex.c | 1 + kernel/locking/mutex.c | 1 + kernel/locking/rtmutex.c | 1 + kernel/locking/rtmutex_common.h | 1 + kernel/locking/rwsem-xadd.c | 3 ++- kernel/sched/core.c | 6 +++--- kernel/sched/sched.h | 1 + 13 files changed, 69 insertions(+), 56 deletions(-)
include/linux/sched.h +1 -51
@@ -961,56 +961,6 @@ void force_schedstat_enabled(void);# define SCHED_FIXEDPOINT_SHIFT 10# define SCHED_FIXEDPOINT_SCALE (1L << SCHED_FIXEDPOINT_SHIFT) -/* -* Wake-queues are lists of tasks with a pending wakeup, whose -* callers have already marked the task as woken internally, -* and can thus carry on. A common use case is being able to -* do the wakeups once the corresponding user lock as been -* released. -* -* We hold reference to each task in the list across the wakeup, -* thus guaranteeing that the memory is still valid by the time -* the actual wakeups are performed in wake_up_q(). -* -* One per task suffices, because there's never a need for a task to be -* in two wake queues simultaneously; it is forbidden to abandon a task -* in a wake queue (a call to wake_up_q() _must_ follow), so if a task is -* already in a wake queue, the wakeup will happen soon and the second -* waker can just skip it. -* -* The DEFINE_WAKE_Q macro declares and initializes the list head. -* wake_up_q() does NOT reinitialize the list; it's expected to be -* called near the end of a function. Otherwise, the list can be -* re-initialized for later re-use by wake_q_init(). -* -* Note that this can cause spurious wakeups. schedule() callers -* must ensure the call is done inside a loop, confirming that the -* wakeup condition has in fact occurred. -*/ -struct wake_q_node { -struct wake_q_node *next; -}; - -struct wake_q_head { -struct wake_q_node *first; -struct wake_q_node **lastp; -}; - -#define WAKE_Q_TAIL ((struct wake_q_node *) 0x01) - -#define DEFINE_WAKE_Q (name) \ - struct wake_q_head name = { WAKE_Q_TAIL, &name.first } - -static inline void wake_q_init (struct wake_q_head *head) -{ - head->first =WAKE_Q_TAIL ; - head->lastp = &head->first; -} - -extern void wake_q_add (struct wake_q_head *head, -struct task_struct *task); -extern void wake_up_q (struct wake_q_head *head); -struct io_context ;/* See blkdev.h */
@@ -1507,7 +1457,7 @@ struct task_struct {/* Protection of the PI data structures: */ raw_spinlock_t pi_lock; -struct wake_q_node wake_q; +void *wake_q;#ifdef CONFIG_RT_MUTEXES /* PI waiters blocked on a rt_mutex held by this task */
include/linux/sched/wake_q.h new file +54 -0
54 lines not on this page · raw message
ipc/mqueue.c +1 -0
@@ -35,6 +35,7 @@#include <linux/ipc_namespace.h> #include <linux/user_namespace.h> #include <linux/slab.h> +#include <linux/sched/wake_q.h> #include <net/sock.h> #include "util.h"
ipc/msg.c +1 -0
@@ -31,6 +31,7 @@#include <linux/list.h> #include <linux/security.h> #include <linux/sched.h> +#include <linux/sched/wake_q.h> #include <linux/syscalls.h> #include <linux/audit.h> #include <linux/seq_file.h>
ipc/sem.c +1 -0
@@ -82,6 +82,7 @@#include <linux/rwsem.h> #include <linux/nsproxy.h> #include <linux/ipc_namespace.h> +#include <linux/sched/wake_q.h> #include <linux/uaccess.h> #include "util.h"
kernel/fork.c +1 -1
@@ -538,7 +538,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node)#endif tsk->splice_pipe =NULL ; tsk->task_frag.page =NULL ; - tsk->wake_q.next =NULL ; + tsk->wake_q =NULL ;account_kernel_stack (tsk,1 );
kernel/futex.c +1 -0
@@ -61,6 +61,7 @@#include <linux/nsproxy.h> #include <linux/ptrace.h> #include <linux/sched/rt.h> +#include <linux/sched/wake_q.h> #include <linux/hugetlb.h> #include <linux/freezer.h> #include <linux/bootmem.h>
kernel/locking/mutex.c +1 -0
@@ -21,6 +21,7 @@#include <linux/ww_mutex.h> #include <linux/sched.h> #include <linux/sched/rt.h> +#include <linux/sched/wake_q.h> #include <linux/export.h> #include <linux/spinlock.h> #include <linux/interrupt.h>
kernel/locking/rtmutex.c +1 -0
@@ -15,6 +15,7 @@#include <linux/sched.h> #include <linux/sched/rt.h> #include <linux/sched/deadline.h> +#include <linux/sched/wake_q.h> #include <linux/timer.h> #include "rtmutex_common.h"
kernel/locking/rtmutex_common.h +1 -0
@@ -13,6 +13,7 @@#define __KERNEL_RTMUTEX_COMMON_H#include <linux/rtmutex.h> +#include <linux/sched/wake_q.h> /* * This is the control structure for tasks blocked on a rt_mutex,
kernel/locking/rwsem-xadd.c +2 -1
@@ -10,10 +10,11 @@* and Davidlohr Bueso <[email protected]>. Based on mutexes. */ #include <linux/rwsem.h> -#include <linux/sched.h> #include <linux/init.h> #include <linux/export.h> +#include <linux/sched.h> #include <linux/sched/rt.h> +#include <linux/sched/wake_q.h> #include <linux/osq_lock.h> #include "rwsem.h"
kernel/sched/core.c +3 -3
@@ -426,7 +426,7 @@ static bool set_nr_if_polling(struct task_struct *p)void wake_q_add (struct wake_q_head *head,struct task_struct *task) { -struct wake_q_node *node = &task->wake_q; +struct wake_q_node *node = (void *)&task->wake_q;/* * Atomically grab the task, if ->wake_q is !nil already it means
@@ -455,11 +455,11 @@ void wake_up_q(struct wake_q_head *head)while (node !=WAKE_Q_TAIL ) {struct task_struct *task; - task = container_of(node, struct task_struct, wake_q); + task = container_of((void *)node, struct task_struct, wake_q);BUG_ON (!task);/* Task can safely be re-inserted now: */ node = node->next; - task->wake_q.next =NULL ; + task->wake_q =NULL ;/* * wake_up_process() implies a wmb() to pair with the queueing
kernel/sched/sched.h +1 -0
@@ -3,6 +3,7 @@#include <linux/sched/sysctl.h> #include <linux/sched/topology.h> #include <linux/sched/rt.h> +#include <linux/sched/wake_q.h> #include <linux/u64_stats_sync.h> #include <linux/sched/deadline.h> #include <linux/kernel_stat.h>
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 10/89 sched/clock: Introduce <linux/sched/clock.h>
In reply to Ingo MolnarMove the sched_clock interfaces into a separate header file, to reduce the size of sched.h.
Include <linux/sched/clock.h> in all files that made use of one of the sched_clock() related APIs.
--- arch/arm/mach-bcm/platsmp.c | 1 + arch/arm/mach-omap2/pm-debug.c | 1 + arch/arm/probes/kprobes/test-core.c | 1 + arch/cris/kernel/time.c | 2 +- arch/ia64/kernel/setup.c | 1 + arch/microblaze/kernel/timer.c | 1 + arch/mn10300/kernel/time.c | 1 + arch/parisc/kernel/setup.c | 1 + arch/parisc/kernel/time.c | 1 + arch/powerpc/kernel/time.c | 1 + arch/s390/kernel/time.c | 1 + arch/sparc/kernel/ds.c | 1 + arch/sparc/kernel/viohs.c | 1 + arch/tile/kernel/time.c | 1 + arch/x86/events/amd/ibs.c | 1 + arch/x86/events/core.c | 1 + arch/x86/kernel/cpu/amd.c | 1 + arch/x86/kernel/cpu/centaur.c | 1 + arch/x86/kernel/cpu/common.c | 1 + arch/x86/kernel/cpu/cyrix.c | 1 + arch/x86/kernel/cpu/intel.c | 1 + arch/x86/kernel/cpu/transmeta.c | 1 + arch/x86/kernel/kvmclock.c | 1 + arch/x86/kernel/nmi.c | 1 + arch/x86/kernel/tsc.c | 1 + block/cfq-iosched.c | 1 + drivers/acpi/apei/ghes.c | 1 + drivers/clocksource/arm_arch_timer.c | 1 + drivers/clocksource/pxa_timer.c | 1 + drivers/clocksource/timer-digicolor.c | 1 + drivers/cpuidle/cpuidle.c | 1 + drivers/firmware/tegra/bpmp.c | 1 + drivers/gpu/drm/i915/i915_gem_request.c | 2 ++ drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/md/bcache/bset.c | 1 + drivers/md/bcache/btree.c | 1 + drivers/md/bcache/sysfs.c | 1 + drivers/md/bcache/util.c | 1 + drivers/md/bcache/util.h | 1 + drivers/md/bcache/writeback.c | 1 + drivers/misc/cxl/native.c | 1 + drivers/net/irda/pxaficp_ir.c | 1 + drivers/perf/arm_pmu.c | 1 + drivers/vhost/net.c | 1 + include/linux/blkdev.h | 1 + include/linux/sched.h | 100 --------------------------------------------------- include/linux/sched/clock.h | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/skbuff.h | 1 + include/net/busy_poll.h | 1 + kernel/events/core.c | 1 + kernel/locking/lockdep.c | 1 + kernel/locking/qspinlock_stat.h | 1 + kernel/printk/printk.c | 1 + kernel/sched/clock.c | 1 + kernel/sched/core.c | 1 + kernel/sched/sched.h | 1 + kernel/time/sched_clock.c | 1 + kernel/time/tick-sched.c | 1 + kernel/torture.c | 1 + kernel/trace/ring_buffer.c | 1 + kernel/trace/trace_clock.c | 1 + kernel/trace/trace_hwlat.c | 1 + kernel/trace/trace_output.c | 1 + kernel/watchdog.c | 1 + lib/plist.c | 1 + net/ipv4/tcp_cdg.c | 2 ++ 66 files changed, 168 insertions(+), 101 deletions(-)
arch/arm/mach-bcm/platsmp.c +1 -0
@@ -21,6 +21,7 @@#include <linux/of.h> #include <linux/of_address.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/smp.h> #include <asm/cacheflush.h>
arch/arm/mach-omap2/pm-debug.c +1 -0
@@ -21,6 +21,7 @@#include <linux/kernel.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/clk.h> #include <linux/err.h> #include <linux/io.h>
arch/arm/probes/kprobes/test-core.c +1 -0
@@ -203,6 +203,7 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/slab.h> +#include <linux/sched/clock.h> #include <linux/kprobes.h> #include <linux/errno.h> #include <linux/stddef.h>
arch/cris/kernel/time.c +1 -1
@@ -29,7 +29,7 @@#include <linux/timex.h> #include <linux/init.h> #include <linux/profile.h> -#include <linux/sched.h> /* just for sched_clock() - funny that */ +#include <linux/sched/clock.h> #define D (x)
arch/ia64/kernel/setup.c +1 -0
@@ -32,6 +32,7 @@#include <linux/kernel.h> #include <linux/reboot.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/seq_file.h> #include <linux/string.h> #include <linux/threads.h>
arch/microblaze/kernel/timer.c +1 -0
@@ -12,6 +12,7 @@#include <linux/interrupt.h> #include <linux/delay.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/sched_clock.h> #include <linux/clk.h> #include <linux/clockchips.h>
arch/mn10300/kernel/time.c +1 -0
@@ -10,6 +10,7 @@* 2 of the Licence, or (at your option) any later version. */ #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/kernel.h> #include <linux/interrupt.h> #include <linux/time.h>
arch/parisc/kernel/setup.c +1 -0
@@ -37,6 +37,7 @@#include <linux/proc_fs.h> #include <linux/export.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <asm/processor.h> #include <asm/sections.h>
arch/parisc/kernel/time.c +1 -0
@@ -14,6 +14,7 @@#include <linux/module.h> #include <linux/rtc.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/sched_clock.h> #include <linux/kernel.h> #include <linux/param.h>
arch/powerpc/kernel/time.c +1 -0
@@ -34,6 +34,7 @@#include <linux/errno.h> #include <linux/export.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/kernel.h> #include <linux/param.h> #include <linux/string.h>
arch/s390/kernel/time.c +1 -0
@@ -18,6 +18,7 @@#include <linux/errno.h> #include <linux/module.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/kernel.h> #include <linux/param.h> #include <linux/string.h>
arch/sparc/kernel/ds.c +1 -0
@@ -9,6 +9,7 @@#include <linux/string.h> #include <linux/slab.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/delay.h> #include <linux/mutex.h> #include <linux/kthread.h>
arch/sparc/kernel/viohs.c +1 -0
@@ -8,6 +8,7 @@#include <linux/string.h> #include <linux/delay.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/slab.h> #include <asm/ldc.h>
arch/tile/kernel/time.c +1 -0
@@ -20,6 +20,7 @@#include <linux/clockchips.h> #include <linux/hardirq.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/smp.h> #include <linux/delay.h> #include <linux/module.h>
arch/x86/events/amd/ibs.c +1 -0
@@ -12,6 +12,7 @@#include <linux/pci.h> #include <linux/ptrace.h> #include <linux/syscore_ops.h> +#include <linux/sched/clock.h> #include <asm/apic.h>
arch/x86/events/core.c +1 -0
@@ -21,6 +21,7 @@#include <linux/init.h> #include <linux/kdebug.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/uaccess.h> #include <linux/slab.h> #include <linux/cpu.h>
arch/x86/kernel/cpu/amd.c +1 -0
@@ -5,6 +5,7 @@#include <linux/io.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/random.h> #include <asm/processor.h> #include <asm/apic.h>
arch/x86/kernel/cpu/centaur.c +1 -0
@@ -1,5 +1,6 @@#include <linux/sched.h> +#include <linux/sched/clock.h> #include <asm/cpufeature.h> #include <asm/e820.h>
arch/x86/kernel/cpu/common.c +1 -0
@@ -8,6 +8,7 @@#include <linux/ctype.h> #include <linux/delay.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/init.h> #include <linux/kprobes.h> #include <linux/kgdb.h>
arch/x86/kernel/cpu/cyrix.c +1 -0
@@ -10,6 +10,7 @@#include <asm/tsc.h> #include <asm/cpufeature.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include "cpu.h"
arch/x86/kernel/cpu/intel.c +1 -0
@@ -4,6 +4,7 @@#include <linux/bitops.h> #include <linux/smp.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/thread_info.h> #include <linux/init.h> #include <linux/uaccess.h>
arch/x86/kernel/cpu/transmeta.c +1 -0
@@ -1,5 +1,6 @@#include <linux/kernel.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/mm.h> #include <asm/cpufeature.h> #include <asm/msr.h>
arch/x86/kernel/kvmclock.c +1 -0
@@ -25,6 +25,7 @@#include <linux/hardirq.h> #include <linux/memblock.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <asm/x86_init.h> #include <asm/reboot.h>
arch/x86/kernel/nmi.c +1 -0
@@ -20,6 +20,7 @@#include <linux/ratelimit.h> #include <linux/slab.h> #include <linux/export.h> +#include <linux/sched/clock.h> #if defined(CONFIG_EDAC )#include <linux/edac.h>
arch/x86/kernel/tsc.c +1 -0
@@ -2,6 +2,7 @@#include <linux/kernel.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/init.h> #include <linux/export.h> #include <linux/timer.h>
block/cfq-iosched.c +1 -0
@@ -8,6 +8,7 @@*/ #include <linux/module.h> #include <linux/slab.h> +#include <linux/sched/clock.h> #include <linux/blkdev.h> #include <linux/elevator.h> #include <linux/ktime.h>
drivers/acpi/apei/ghes.c +1 -0
@@ -44,6 +44,7 @@#include <linux/pci.h> #include <linux/aer.h> #include <linux/nmi.h> +#include <linux/sched/clock.h> #include <acpi/ghes.h> #include <acpi/apei.h>
drivers/clocksource/arm_arch_timer.c +1 -0
@@ -24,6 +24,7 @@#include <linux/of_address.h> #include <linux/io.h> #include <linux/slab.h> +#include <linux/sched/clock.h> #include <linux/sched_clock.h> #include <linux/acpi.h>
drivers/clocksource/pxa_timer.c +1 -0
@@ -19,6 +19,7 @@#include <linux/clockchips.h> #include <linux/of_address.h> #include <linux/of_irq.h> +#include <linux/sched/clock.h> #include <linux/sched_clock.h> #include <clocksource/pxa.h>
drivers/clocksource/timer-digicolor.c +1 -0
@@ -31,6 +31,7 @@#include <linux/interrupt.h> #include <linux/irq.h> #include <linux/irqreturn.h> +#include <linux/sched/clock.h> #include <linux/sched_clock.h> #include <linux/of.h> #include <linux/of_address.h>
drivers/cpuidle/cpuidle.c +1 -0
@@ -12,6 +12,7 @@#include <linux/kernel.h> #include <linux/mutex.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/notifier.h> #include <linux/pm_qos.h> #include <linux/cpu.h>
drivers/firmware/tegra/bpmp.c +1 -0
@@ -19,6 +19,7 @@#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/semaphore.h> +#include <linux/sched/clock.h> #include <soc/tegra/bpmp.h> #include <soc/tegra/bpmp-abi.h>
drivers/gpu/drm/i915/i915_gem_request.c +2 -0
@@ -24,6 +24,8 @@#include <linux/prefetch.h> #include <linux/dma-fence-array.h> +#include <linux/sched.h> +#include <linux/sched/clock.h> #include "i915_drv.h"
drivers/gpu/drm/i915/intel_drv.h +1 -0
@@ -28,6 +28,7 @@#include <linux/async.h> #include <linux/i2c.h> #include <linux/hdmi.h> +#include <linux/sched/clock.h> #include <drm/i915_drm.h> #include "i915_drv.h" #include <drm/drm_crtc.h>
drivers/md/bcache/bset.c +1 -0
@@ -11,6 +11,7 @@#include "bset.h" #include <linux/console.h> +#include <linux/sched/clock.h> #include <linux/random.h> #include <linux/prefetch.h>
drivers/md/bcache/btree.c +1 -0
@@ -32,6 +32,7 @@#include <linux/prefetch.h> #include <linux/random.h> #include <linux/rcupdate.h> +#include <linux/sched/clock.h> #include <trace/events/bcache.h> /*
drivers/md/bcache/sysfs.c +1 -0
@@ -13,6 +13,7 @@#include <linux/blkdev.h> #include <linux/sort.h> +#include <linux/sched/clock.h> static const char *const cache_replacement_policies[] = {"lru" ,
drivers/md/bcache/util.c +1 -0
@@ -12,6 +12,7 @@#include <linux/module.h> #include <linux/seq_file.h> #include <linux/types.h> +#include <linux/sched/clock.h> #include "util.h"
drivers/md/bcache/util.h +1 -0
@@ -6,6 +6,7 @@#include <linux/errno.h> #include <linux/blkdev.h> #include <linux/kernel.h> +#include <linux/sched/clock.h> #include <linux/llist.h> #include <linux/ratelimit.h> #include <linux/vmalloc.h>
drivers/md/bcache/writeback.c +1 -0
@@ -13,6 +13,7 @@#include <linux/delay.h> #include <linux/kthread.h> +#include <linux/sched/clock.h> #include <trace/events/bcache.h> /* Rate limiting */
drivers/misc/cxl/native.c +1 -0
@@ -9,6 +9,7 @@#include <linux/spinlock.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/slab.h> #include <linux/mutex.h> #include <linux/mm.h>
drivers/net/irda/pxaficp_ir.c +1 -0
@@ -24,6 +24,7 @@#include <linux/dma/pxa-dma.h> #include <linux/gpio.h> #include <linux/slab.h> +#include <linux/sched/clock.h> #include <net/irda/irda.h> #include <net/irda/irmod.h>
drivers/perf/arm_pmu.c +1 -0
@@ -20,6 +20,7 @@#include <linux/perf/arm_pmu.h> #include <linux/platform_device.h> #include <linux/slab.h> +#include <linux/sched/clock.h> #include <linux/spinlock.h> #include <linux/irq.h> #include <linux/irqdesc.h>
drivers/vhost/net.c +1 -0
@@ -17,6 +17,7 @@#include <linux/workqueue.h> #include <linux/file.h> #include <linux/slab.h> +#include <linux/sched/clock.h> #include <linux/vmalloc.h> #include <linux/net.h>
include/linux/blkdev.h +1 -0
@@ -2,6 +2,7 @@#define _LINUX_BLKDEV_H#include <linux/sched.h> +#include <linux/sched/clock.h> #ifdef CONFIG_BLOCK
include/linux/sched.h +0 -100
112 lines not on this page · raw message
include/linux/sched/clock.h new file +102 -0
102 lines not on this page · raw message
include/linux/skbuff.h +1 -0
@@ -34,6 +34,7 @@#include <linux/dma-mapping.h> #include <linux/netdev_features.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <net/flow_dissector.h> #include <linux/splice.h> #include <linux/in6.h>
include/net/busy_poll.h +1 -0
@@ -25,6 +25,7 @@#define _LINUX_NET_BUSY_POLL_H#include <linux/netdevice.h> +#include <linux/sched/clock.h> #include <net/ip.h> #ifdef CONFIG_NET_RX_BUSY_POLL
kernel/events/core.c +1 -0
@@ -46,6 +46,7 @@#include <linux/filter.h> #include <linux/namei.h> #include <linux/parser.h> +#include <linux/sched/clock.h> #include "internal.h"
kernel/locking/lockdep.c +1 -0
@@ -28,6 +28,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/locking/qspinlock_stat.h +1 -0
@@ -63,6 +63,7 @@ enum qlock_stats {*/ #include <linux/debugfs.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/fs.h> static const char *const qstat_names[qstat_num +1 ] = {
kernel/printk/printk.c +1 -0
@@ -45,6 +45,7 @@#include <linux/utsname.h> #include <linux/ctype.h> #include <linux/uio.h> +#include <linux/sched/clock.h> #include <linux/uaccess.h> #include <asm/sections.h>
kernel/sched/clock.c +1 -0
@@ -58,6 +58,7 @@#include <linux/percpu.h> #include <linux/ktime.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/static_key.h> #include <linux/workqueue.h> #include <linux/compiler.h>
kernel/sched/core.c +1 -0
@@ -6,6 +6,7 @@* Copyright (C) 1991-2002 Linus Torvalds */ #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/cpuset.h> #include <linux/delayacct.h> #include <linux/init_task.h>
kernel/sched/sched.h +1 -0
@@ -3,6 +3,7 @@#include <linux/sched/sysctl.h> #include <linux/sched/topology.h> #include <linux/sched/rt.h> +#include <linux/sched/clock.h> #include <linux/sched/wake_q.h> #include <linux/u64_stats_sync.h> #include <linux/sched/deadline.h>
kernel/time/sched_clock.c +1 -0
@@ -13,6 +13,7 @@#include <linux/kernel.h> #include <linux/moduleparam.h> #include <linux/sched.h> +#include <linux/sched/clock.h> #include <linux/syscore_ops.h> #include <linux/hrtimer.h> #include <linux/sched_clock.h>
kernel/time/tick-sched.c +1 -0
@@ -19,6 +19,7 @@#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> #include <linux/posix-timers.h>
kernel/torture.c +1 -0
@@ -30,6 +30,7 @@#include <linux/smp.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/trace/ring_buffer.c +1 -0
@@ -6,6 +6,7 @@#include <linux/trace_events.h> #include <linux/ring_buffer.h> #include <linux/trace_clock.h> +#include <linux/sched/clock.h> #include <linux/trace_seq.h> #include <linux/spinlock.h> #include <linux/irq_work.h>
kernel/trace/trace_clock.c +1 -0
@@ -18,6 +18,7 @@#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/trace/trace_hwlat.c +1 -0
@@ -44,6 +44,7 @@#include <linux/uaccess.h> #include <linux/cpumask.h> #include <linux/delay.h> +#include <linux/sched/clock.h> #include "trace.h" static struct trace_array *hwlat_trace;
kernel/trace/trace_output.c +1 -0
@@ -8,6 +8,7 @@#include <linux/module.h> #include <linux/mutex.h> #include <linux/ftrace.h> +#include <linux/sched/clock.h> #include "trace_output.h"
kernel/watchdog.c +1 -0
@@ -21,6 +21,7 @@#include <linux/sched/rt.h> #include <linux/tick.h> #include <linux/workqueue.h> +#include <linux/sched/clock.h> #include <asm/irq_regs.h> #include <linux/kvm_para.h>
lib/plist.c +1 -0
@@ -175,6 +175,7 @@ void plist_requeue(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>
net/ipv4/tcp_cdg.c +2 -0
@@ -27,6 +27,8 @@#include <linux/kernel.h> #include <linux/random.h> #include <linux/module.h> +#include <linux/sched/clock.h> +#include <net/tcp.h> #define HYSTART_ACK_TRAIN 1
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 11/89 sched/headers, delayacct: Move the 'struct task_delay_info' definition from <linux/sched.h> to <linux/delayacct.h>
In reply to Ingo MolnarThe 'struct task_delay_info' definition does not have to be in sched.h, because task_struct only has a pointer to it.
So move it to <linux/delayacct.h> to reduce the size of <linux/sched.h>.
As an additional improvement make the type defined but empty in the !CONFIG_TASK_DELAY_ACCT case - to eliminate the ugly #ifdef around the task_struct field as well.
--- include/linux/delayacct.h | 38 ++++++++++++++++++++++++++++++++++++-- include/linux/sched.h | 37 ++----------------------------------- 2 files changed, 38 insertions(+), 37 deletions(-)
include/linux/delayacct.h +36 -2
@@ -18,8 +18,6 @@#define _LINUX_DELAYACCT_H#include <uapi/linux/taskstats.h> -#include <linux/sched.h> -#include <linux/slab.h> /* * Per-task flags relevant to delay accounting
@@ -29,8 +27,44 @@#define DELAYACCT_PF_SWAPIN 0x00000001/* I am doing a swapin */ #define DELAYACCT_PF_BLKIO 0x00000002/* I am waiting on IO */ +struct task_delay_info {#ifdef CONFIG_TASK_DELAY_ACCT +spinlock_t lock; +unsigned int flags;/* Private per-task flags */ + +/* For each stat XXX, add following, aligned appropriately +* +* struct timespec XXX_start, XXX_end; +* u64 XXX_delay; +* u32 XXX_count; +* +* Atomicity of updates to XXX_delay, XXX_count protected by +* single lock above (split into XXX_lock if contention is an issue). +*/ + +/* +* XXX_count is incremented on every XXX operation, the delay +* associated with the operation is added to XXX_delay. +* XXX_delay contains the accumulated delay time in nanoseconds. +*/ +u64 blkio_start;/* Shared by blkio, swapin */ +u64 blkio_delay;/* wait for sync block io completion */ +u64 swapin_delay;/* wait for swapin block io completion */ +u32 blkio_count;/* total count of the number of sync block */ +/* io operations performed */ +u32 swapin_count;/* total count of the number of swapin block */ +/* io operations performed */ + +u64 freepages_start; +u64 freepages_delay;/* wait for memory reclaim */ +u32 freepages_count;/* total count of memory reclaim */ +#endif +}; +#include <linux/sched.h> +#include <linux/slab.h> + +#ifdef CONFIG_TASK_DELAY_ACCT extern int delayacct_on;/* Delay accounting turned on/off */ extern struct kmem_cache *delayacct_cache;extern void delayacct_init (void );
include/linux/sched.h +2 -35
@@ -901,39 +901,7 @@ struct sched_info { };#endif /* CONFIG_SCHED_INFO */ -#ifdef CONFIG_TASK_DELAY_ACCT -struct task_delay_info { -spinlock_t lock; -unsigned int flags;/* Private per-task flags */ - -/* For each stat XXX, add following, aligned appropriately -* -* struct timespec XXX_start, XXX_end; -* u64 XXX_delay; -* u32 XXX_count; -* -* Atomicity of updates to XXX_delay, XXX_count protected by -* single lock above (split into XXX_lock if contention is an issue). -*/ - -/* -* XXX_count is incremented on every XXX operation, the delay -* associated with the operation is added to XXX_delay. -* XXX_delay contains the accumulated delay time in nanoseconds. -*/ -u64 blkio_start;/* Shared by blkio, swapin */ -u64 blkio_delay;/* wait for sync block io completion */ -u64 swapin_delay;/* wait for swapin block io completion */ -u32 blkio_count;/* total count of the number of sync block */ -/* io operations performed */ -u32 swapin_count;/* total count of the number of swapin block */ -/* io operations performed */ - -u64 freepages_start; -u64 freepages_delay;/* wait for memory reclaim */ -u32 freepages_count;/* total count of memory reclaim */ -}; -#endif /* CONFIG_TASK_DELAY_ACCT */ +struct task_delay_info ;static inline int sched_info_on (void ) {
@@ -1615,9 +1583,8 @@ struct task_struct {struct page_frag task_frag; -#ifdef CONFIG_TASK_DELAY_ACCT struct task_delay_info *delays; -#endif +#ifdef CONFIG_FAULT_INJECTION int make_it_fail;#endif
Signature · 1 line
2.7.4
Re: [PATCH 11/89] sched/headers, delayacct: Move the 'struct task_delay_info' definition from <linux/sched.h> to <linux/delayacct.h>
Quoted 8 lines · Ingo Molnar
The 'struct
task_delay_info' definition does not have to be insched.h, becausetask_structonly has a pointer to it.So move it to <
linux/delayacct.h> to reduce the size of <linux/sched.h>.As an additional improvement make the type defined but empty in the !CONFIG_TASK_DELAY_ACCT case - to eliminate the ugly #ifdef around the
task_structfield as well.
No. This is completely wrong.
Even if the structure is empty, the _pointer_ to the structure is not. So now you removed the #ifdef, and the 'struct task_struct' becomes unconditionally (and pointlessly) larger.
So your removal if the #ifdef and making that structure empty is completely pointless: it wastes exactly the same amount of space even when it is empty, because that pointer stays around and is not an empty pointer.
In general, I heartily approve of the sched.h split-up, but quite frankly, when there are almost a hundred patches, and a lot of them are pure code movement (so they are *big*, and essentially impossible to actually confirm), I *really* really think that this patch series should be re-done so that it does *not* make these kinds of "clever" changes.
I'd be much happier if the cleanups were all completely non-semantic. Nothing like this. At least in the big patch series.
Then you can have a separate series that does things that isn't just about code movement.
Ok?
Because these emails aren't easy to read as-is (well, part of them are obvious, but others are "move a hundreds of lines from one file to another").
And having to worry about "oh, and btw, hidden in the movement is this small semantic change that may or may not be completely and utterly bogus" makes it much much worse.
Linus
Ingo Molnar
maintainerPATCH v2 11/89 sched/headers, delayacct: Move the 'struct task_delay_info' definition from <linux/sched.h> to <linux/delayacct.h>
Quoted 10 lines · Linus Torvalds
Quoted 8 lines · Ingo Molnar
The 'struct
task_delay_info' definition does not have to be insched.h, becausetask_structonly has a pointer to it.So move it to <
linux/delayacct.h> to reduce the size of <linux/sched.h>.As an additional improvement make the type defined but empty in the !CONFIG_TASK_DELAY_ACCT case - to eliminate the ugly #ifdef around the
task_structfield as well.
Quoted 5 lines
No. This is completely wrong.
Even if the structure is empty, the _pointer_ to the structure is not. So now you removed the #ifdef, and the 'struct
task_struct' becomes unconditionally (and pointlessly) larger.
Yeah, indeed, that was a brainfart: I mixed it up with the cases where it's not pointer-included but directly embedded in task_struct. In which case such a change is valid, see for example:
[PATCH 88/89] sched/headers: Remove #ifdefs from <linux/sched.h>
So you are completely right, and this was a simple oversight on my part, and I've fixed it with the patch attached below, with the fix folded back and the bogus changelog fixed as well. The new WIP.sched/core is pushed out as of this minute, with:
387691c93599 sched/headers, delayacct: Move the 'struct task_delay_info' definition from <linux/sched.h> to <linux/delayacct.h>
So this embarrasing episode never happened!
Quoted 12 lines
So your removal if the #ifdef and making that structure empty is completely pointless: it wastes exactly the same amount of space even when it is empty, because that pointer stays around and is not an empty pointer.
In general, I heartily approve of the
sched.hsplit-up, but quite frankly, when there are almost a hundred patches, and a lot of them are pure code movement (so they are *big*, and essentially impossible to actually confirm), I *really* really think that this patch series should be re-done so that it does *not* make these kinds of "clever" changes.
Quoted 7 lines
I'd be much happier if the cleanups were all completely non-semantic. Nothing like this. At least in the big patch series.
Then you can have a separate series that does things that isn't just about code movement.
Ok?
Yeah, absolutely, fully agreed!
Quoted 7 lines
Because these emails aren't easy to read as-is (well, part of them are obvious, but others are "move a hundreds of lines from one file to another").
And having to worry about "oh, and btw, hidden in the movement is this small semantic change that may or may not be completely and utterly bogus" makes it much much worse.
This semantic change was unintentional, an embarrasing bug in essence.
I too want to keep the series a data structure invariant for the reasons you outlined, without any actual changes to the layout of task_struct et al.
I'll review the series once more to eliminate such changes.
There's one other very small change to generated code that was essential, the uninlining of two RCU APIs in the RCU_TINY uniprocessor case, to be able to decouple sched.h from completion.h:
[PATCH 82/89] rcu: Separate the rcu synchronization types and APIs into <linux/rcupdate_wait.h>
... but that has to be acked by Paul anyway.
I'll try to be very careful with all this, OK?
( I've done a fair amount of boot testing as well along the way, so I'm fairly
certain there's no harmful runtime effect - this bug caused an unintentional, unused pointer that bloated task_struct by 8 on configs that had that option off. Famous last words ... )
Thanks,
Ingo
=============================================================================
Quoted 1 line
From
387691c93599bc932f5c1c39b0d791d1cbca3cf7Mon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
Date: Wed, 1 Feb 2017 18:00:26 +0100
Subject: [PATCH] sched/headers, delayacct: Move the 'struct task_delay_info' definition from <linux/sched.h> to <linux/delayacct.h>
The 'struct task_delay_info' definition does not have to be in sched.h, because task_struct only has a pointer to it.
So move it to <linux/delayacct.h> to reduce the size of <linux/sched.h>.
--- include/linux/delayacct.h | 38 ++++++++++++++++++++++++++++++++++++-- include/linux/sched.h | 39 ++++----------------------------------- 2 files changed, 40 insertions(+), 37 deletions(-)
include/linux/delayacct.h +36 -2
@@ -18,8 +18,6 @@#define _LINUX_DELAYACCT_H#include <uapi/linux/taskstats.h> -#include <linux/sched.h> -#include <linux/slab.h> /* * Per-task flags relevant to delay accounting
@@ -30,7 +28,43 @@#define DELAYACCT_PF_BLKIO 0x00000002/* I am waiting on IO */ #ifdef CONFIG_TASK_DELAY_ACCT +struct task_delay_info { +spinlock_t lock; +unsigned int flags;/* Private per-task flags */ + +/* For each stat XXX, add following, aligned appropriately +* +* struct timespec XXX_start, XXX_end; +* u64 XXX_delay; +* u32 XXX_count; +* +* Atomicity of updates to XXX_delay, XXX_count protected by +* single lock above (split into XXX_lock if contention is an issue). +*/ + +/* +* XXX_count is incremented on every XXX operation, the delay +* associated with the operation is added to XXX_delay. +* XXX_delay contains the accumulated delay time in nanoseconds. +*/ +u64 blkio_start;/* Shared by blkio, swapin */ +u64 blkio_delay;/* wait for sync block io completion */ +u64 swapin_delay;/* wait for swapin block io completion */ +u32 blkio_count;/* total count of the number of sync block */ +/* io operations performed */ +u32 swapin_count;/* total count of the number of swapin block */ +/* io operations performed */ + +u64 freepages_start; +u64 freepages_delay;/* wait for memory reclaim */ +u32 freepages_count;/* total count of memory reclaim */ +}; +#endif +#include <linux/sched.h> +#include <linux/slab.h> + +#ifdef CONFIG_TASK_DELAY_ACCT extern int delayacct_on;/* Delay accounting turned on/off */ extern struct kmem_cache *delayacct_cache;extern void delayacct_init (void );
include/linux/sched.h +4 -35
@@ -901,39 +901,7 @@ struct sched_info { };#endif /* CONFIG_SCHED_INFO */ -#ifdef CONFIG_TASK_DELAY_ACCT -struct task_delay_info { -spinlock_t lock; -unsigned int flags;/* Private per-task flags */ - -/* For each stat XXX, add following, aligned appropriately -* -* struct timespec XXX_start, XXX_end; -* u64 XXX_delay; -* u32 XXX_count; -* -* Atomicity of updates to XXX_delay, XXX_count protected by -* single lock above (split into XXX_lock if contention is an issue). -*/ - -/* -* XXX_count is incremented on every XXX operation, the delay -* associated with the operation is added to XXX_delay. -* XXX_delay contains the accumulated delay time in nanoseconds. -*/ -u64 blkio_start;/* Shared by blkio, swapin */ -u64 blkio_delay;/* wait for sync block io completion */ -u64 swapin_delay;/* wait for swapin block io completion */ -u32 blkio_count;/* total count of the number of sync block */ -/* io operations performed */ -u32 swapin_count;/* total count of the number of swapin block */ -/* io operations performed */ - -u64 freepages_start; -u64 freepages_delay;/* wait for memory reclaim */ -u32 freepages_count;/* total count of memory reclaim */ -}; -#endif /* CONFIG_TASK_DELAY_ACCT */ +struct task_delay_info ;static inline int sched_info_on (void ) {
@@ -1615,9 +1583,10 @@ struct task_struct {struct page_frag task_frag; -#ifdef CONFIG_TASK_DELAY_ACCT -struct task_delay_info *delays; +#ifdef CONFIG_TASK_DELAY_ACCT +struct task_delay_info *delays;#endif +#ifdef CONFIG_FAULT_INJECTION int make_it_fail;#endif
Ingo Molnar
maintainerPATCH 12/89 sched/abi: Introduce <uapi/linux/sched/types.h>
In reply to Ingo MolnarMove ABI types (struct sched_attr, struct sched_param, etc.) into a new UAPI header, and use it from the code that needs it.
This further reduces the size of <linux/sched.h>.
--- arch/arm/common/bL_switcher.c | 2 +- crypto/crypto_engine.c | 3 +- drivers/acpi/acpi_pad.c | 2 +- drivers/block/drbd/drbd_receiver.c | 3 +- drivers/firmware/psci_checker.c | 1 + drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 1 + drivers/gpu/drm/i915/intel_breadcrumbs.c | 1 + drivers/media/pci/ivtv/ivtv-driver.c | 1 + drivers/mmc/core/sdio_irq.c | 1 + drivers/spi/spi.c | 1 + drivers/staging/android/ion/ion_heap.c | 1 + drivers/thermal/intel_powerclamp.c | 1 + drivers/tty/serial/sc16is7xx.c | 1 + include/linux/sched.h | 70 ++------------------------------------------ include/uapi/linux/sched/types.h | 74 +++++++++++++++++++++++++++++++++++++++++++++++ kernel/irq/manage.c | 1 + kernel/kthread.c | 1 + kernel/locking/locktorture.c | 1 + kernel/rcu/rcuperf.c | 1 + kernel/rcu/rcutorture.c | 1 + kernel/rcu/tree.c | 1 + kernel/rcu/tree_plugin.h | 1 + kernel/sched/core.c | 3 ++ kernel/sched/cpufreq_schedutil.c | 1 + kernel/trace/ring_buffer_benchmark.c | 1 + kernel/trace/trace_selftest.c | 1 + kernel/watchdog.c | 1 + 27 files changed, 104 insertions(+), 73 deletions(-)
arch/arm/common/bL_switcher.c +1 -1
@@ -8,12 +8,12 @@* it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#include <linux/atomic.h> #include <linux/init.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/sched.h> +#include <uapi/linux/sched/types.h> #include <linux/interrupt.h> #include <linux/cpu_pm.h> #include <linux/cpu.h>
crypto/crypto_engine.c +2 -1
@@ -11,11 +11,12 @@* any later version. * */ -#include <linux/err.h> #include <linux/delay.h> #include <crypto/engine.h> #include <crypto/internal/hash.h> +#include <uapi/linux/sched/types.h> +#include "internal.h" #define CRYPTO_ENGINE_MAX_QLEN 10
drivers/acpi/acpi_pad.c +1 -1
@@ -13,13 +13,13 @@* more details. * */ -#include <linux/kernel.h> #include <linux/cpumask.h> #include <linux/module.h> #include <linux/init.h> #include <linux/types.h> #include <linux/kthread.h> +#include <uapi/linux/sched/types.h> #include <linux/freezer.h> #include <linux/cpu.h> #include <linux/tick.h>
drivers/block/drbd/drbd_receiver.c +1 -2
@@ -21,8 +21,6 @@along with drbd; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include <linux/module.h> #include <linux/uaccess.h>
@@ -36,6 +34,7 @@#include <linux/memcontrol.h> #include <linux/mm_inline.h> #include <linux/slab.h> +#include <uapi/linux/sched/types.h> #include <linux/pkt_sched.h> #define __KERNEL_SYSCALLS__#include <linux/unistd.h>
drivers/firmware/psci_checker.c +1 -0
@@ -20,6 +20,7 @@#include <linux/cpu_pm.h> #include <linux/kernel.h> #include <linux/kthread.h> +#include <uapi/linux/sched/types.h> #include <linux/module.h> #include <linux/preempt.h> #include <linux/psci.h>
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c +1 -0
@@ -24,6 +24,7 @@#include <linux/kthread.h> #include <linux/wait.h> #include <linux/sched.h> +#include <uapi/linux/sched/types.h> #include <drm/drmP.h> #include "gpu_scheduler.h"
drivers/gpu/drm/i915/intel_breadcrumbs.c +1 -0
@@ -23,6 +23,7 @@*/ #include <linux/kthread.h> +#include <uapi/linux/sched/types.h> #include "i915_drv.h"
drivers/media/pci/ivtv/ivtv-driver.c +1 -0
@@ -59,6 +59,7 @@#include <media/tveeprom.h> #include <media/i2c/saa7115.h> #include "tuner-xc2028.h" +#include <uapi/linux/sched/types.h> /* If you have already X v4l cards, then set this to X. This way the device numbers stay matched. Example: you have a WinTV card
drivers/mmc/core/sdio_irq.c +1 -0
@@ -15,6 +15,7 @@#include <linux/kernel.h> #include <linux/sched.h> +#include <uapi/linux/sched/types.h> #include <linux/kthread.h> #include <linux/export.h> #include <linux/wait.h>
drivers/spi/spi.c +1 -0
@@ -33,6 +33,7 @@#include <linux/pm_domain.h> #include <linux/export.h> #include <linux/sched/rt.h> +#include <uapi/linux/sched/types.h> #include <linux/delay.h> #include <linux/kthread.h> #include <linux/ioport.h>
drivers/staging/android/ion/ion_heap.c +1 -0
@@ -20,6 +20,7 @@#include <linux/mm.h> #include <linux/rtmutex.h> #include <linux/sched.h> +#include <uapi/linux/sched/types.h> #include <linux/scatterlist.h> #include <linux/vmalloc.h> #include "ion.h"
drivers/thermal/intel_powerclamp.c +1 -0
@@ -50,6 +50,7 @@#include <linux/debugfs.h> #include <linux/seq_file.h> #include <linux/sched/rt.h> +#include <uapi/linux/sched/types.h> #include <asm/nmi.h> #include <asm/msr.h>
drivers/tty/serial/sc16is7xx.c +1 -0
@@ -29,6 +29,7 @@#include <linux/tty_flip.h> #include <linux/spi/spi.h> #include <linux/uaccess.h> +#include <uapi/linux/sched/types.h> #define SC16IS7XX_NAME "sc16is7xx"#define SC16IS7XX_MAX_DEVS 8
include/linux/sched.h +2 -68
82 lines not on this page · raw message
include/uapi/linux/sched/types.h new file +74 -0
74 lines not on this page · raw message
kernel/irq/manage.c +1 -0
@@ -17,6 +17,7 @@#include <linux/slab.h> #include <linux/sched.h> #include <linux/sched/rt.h> +#include <uapi/linux/sched/types.h> #include <linux/task_work.h> #include "internals.h"
kernel/kthread.c +1 -0
@@ -5,6 +5,7 @@* even if we're invoked from userspace (think modprobe, hotplug cpu, * etc.). */ +#include <uapi/linux/sched/types.h> #include <linux/sched.h> #include <linux/kthread.h> #include <linux/completion.h>
kernel/locking/locktorture.c +1 -0
@@ -32,6 +32,7 @@#include <linux/smp.h> #include <linux/interrupt.h> #include <linux/sched.h> +#include <uapi/linux/sched/types.h> #include <linux/atomic.h> #include <linux/moduleparam.h> #include <linux/delay.h>
kernel/rcu/rcuperf.c +1 -0
@@ -30,6 +30,7 @@#include <linux/rcupdate.h> #include <linux/interrupt.h> #include <linux/sched.h> +#include <uapi/linux/sched/types.h> #include <linux/atomic.h> #include <linux/bitops.h> #include <linux/completion.h>
kernel/rcu/rcutorture.c +1 -0
@@ -33,6 +33,7 @@#include <linux/rcupdate.h> #include <linux/interrupt.h> #include <linux/sched.h> +#include <uapi/linux/sched/types.h> #include <linux/atomic.h> #include <linux/bitops.h> #include <linux/completion.h>
kernel/rcu/tree.c +1 -0
@@ -49,6 +49,7 @@#include <linux/kernel_stat.h> #include <linux/wait.h> #include <linux/kthread.h> +#include <uapi/linux/sched/types.h> #include <linux/prefetch.h> #include <linux/delay.h> #include <linux/stop_machine.h>
kernel/rcu/tree_plugin.h +1 -0
@@ -28,6 +28,7 @@#include <linux/gfp.h> #include <linux/oom.h> #include <linux/smpboot.h> +#include <uapi/linux/sched/types.h> #include "../time/tick-internal.h" #ifdef CONFIG_RCU_BOOST
kernel/sched/core.c +3 -0
@@ -5,8 +5,11 @@* * Copyright (C) 1991-2002 Linus Torvalds */ +#include <uapi/linux/sched/types.h> +#include <linux/sched.h> #include <linux/sched/clock.h> +#include <uapi/linux/sched/types.h> #include <linux/cpuset.h> #include <linux/delayacct.h> #include <linux/init_task.h>
kernel/sched/cpufreq_schedutil.c +1 -0
@@ -13,6 +13,7 @@#include <linux/cpufreq.h> #include <linux/kthread.h> +#include <uapi/linux/sched/types.h> #include <linux/slab.h> #include <trace/events/power.h>
kernel/trace/ring_buffer_benchmark.c +1 -0
@@ -6,6 +6,7 @@#include <linux/ring_buffer.h> #include <linux/completion.h> #include <linux/kthread.h> +#include <uapi/linux/sched/types.h> #include <linux/module.h> #include <linux/ktime.h> #include <asm/local.h>
kernel/trace/trace_selftest.c +1 -0
@@ -1,5 +1,6 @@/* Include in trace.c */ +#include <uapi/linux/sched/types.h> #include <linux/stringify.h> #include <linux/kthread.h> #include <linux/delay.h>
kernel/watchdog.c +1 -0
@@ -19,6 +19,7 @@#include <linux/sysctl.h> #include <linux/smpboot.h> #include <linux/sched/rt.h> +#include <uapi/linux/sched/types.h> #include <linux/tick.h> #include <linux/workqueue.h> #include <linux/sched/clock.h>
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 13/89 sched/loadavg: Move loadavg related definitions from <linux/sched.h> to <linux/sched/loadavg.h>
In reply to Ingo MolnarCreate a new header for these bits, to reduce the size and complexity of <linux/sched.h>.
--- arch/m68k/kernel/time.c | 1 + arch/microblaze/kernel/heartbeat.c | 1 + arch/powerpc/platforms/cell/cpufreq_spudemand.c | 1 + arch/powerpc/platforms/cell/spufs/sched.c | 1 + arch/s390/appldata/appldata_os.c | 1 + arch/sh/drivers/heartbeat.c | 1 + arch/sparc/kernel/led.c | 1 + drivers/cpuidle/governors/menu.c | 1 + drivers/leds/trigger/ledtrig-heartbeat.c | 1 + drivers/platform/x86/intel_ips.c | 1 + fs/proc/loadavg.c | 1 + include/linux/sched.h | 27 --------------------------- include/linux/sched/loadavg.h | 31 +++++++++++++++++++++++++++++++ kernel/debug/kdb/kdb_main.c | 1 + kernel/sched/core.c | 2 +- kernel/sched/loadavg.c | 1 + kernel/sys.c | 1 + kernel/time/timekeeping.c | 1 + net/sched/em_meta.c | 1 + 19 files changed, 48 insertions(+), 28 deletions(-)
arch/m68k/kernel/time.c +1 -0
@@ -14,6 +14,7 @@#include <linux/export.h> #include <linux/module.h> #include <linux/sched.h> +#include <linux/sched/loadavg.h> #include <linux/kernel.h> #include <linux/param.h> #include <linux/string.h>
arch/microblaze/kernel/heartbeat.c +1 -0
@@ -9,6 +9,7 @@*/ #include <linux/sched.h> +#include <linux/sched/loadavg.h> #include <linux/io.h> #include <asm/setup.h>
arch/powerpc/platforms/cell/cpufreq_spudemand.c +1 -0
@@ -22,6 +22,7 @@#include <linux/cpufreq.h> #include <linux/sched.h> +#include <linux/sched/loadavg.h> #include <linux/module.h> #include <linux/timer.h> #include <linux/workqueue.h>
arch/powerpc/platforms/cell/spufs/sched.c +1 -0
@@ -24,6 +24,7 @@#include <linux/errno.h> #include <linux/sched.h> +#include <linux/sched/loadavg.h> #include <linux/sched/rt.h> #include <linux/kernel.h> #include <linux/mm.h>
arch/s390/appldata/appldata_os.c +1 -0
@@ -17,6 +17,7 @@#include <linux/kernel_stat.h> #include <linux/netdevice.h> #include <linux/sched.h> +#include <linux/sched/loadavg.h> #include <asm/appldata.h> #include <asm/smp.h>
arch/sh/drivers/heartbeat.c +1 -0
@@ -21,6 +21,7 @@#include <linux/init.h> #include <linux/platform_device.h> #include <linux/sched.h> +#include <linux/sched/loadavg.h> #include <linux/timer.h> #include <linux/io.h> #include <linux/slab.h>
arch/sparc/kernel/led.c +1 -0
@@ -8,6 +8,7 @@#include <linux/jiffies.h> #include <linux/timer.h> #include <linux/uaccess.h> +#include <linux/sched/loadavg.h> #include <asm/auxio.h>
drivers/cpuidle/governors/menu.c +1 -0
@@ -18,6 +18,7 @@#include <linux/hrtimer.h> #include <linux/tick.h> #include <linux/sched.h> +#include <linux/sched/loadavg.h> #include <linux/math64.h> /*
drivers/leds/trigger/ledtrig-heartbeat.c +1 -0
@@ -17,6 +17,7 @@#include <linux/slab.h> #include <linux/timer.h> #include <linux/sched.h> +#include <linux/sched/loadavg.h> #include <linux/leds.h> #include <linux/reboot.h> #include <linux/suspend.h>
drivers/platform/x86/intel_ips.c +1 -0
@@ -68,6 +68,7 @@#include <linux/module.h> #include <linux/pci.h> #include <linux/sched.h> +#include <linux/sched/loadavg.h> #include <linux/seq_file.h> #include <linux/string.h> #include <linux/tick.h>
fs/proc/loadavg.c +1 -0
@@ -3,6 +3,7 @@#include <linux/pid_namespace.h> #include <linux/proc_fs.h> #include <linux/sched.h> +#include <linux/sched/loadavg.h> #include <linux/seq_file.h> #include <linux/seqlock.h> #include <linux/time.h>
include/linux/sched.h +0 -27
@@ -72,31 +72,6 @@ struct nameidata;#define VMACACHE_SIZE (1U << VMACACHE_BITS)#define VMACACHE_MASK (VMACACHE_SIZE - 1) -/* -* These are the constant used to fake the fixed-point load-average -* counting. Some notes: -* - 11 bit fractions expand to 22 bits by the multiplies: this gives -* a load-average precision of 10 bits integer + 11 bits fractional -* - if you want to count load-averages more often, you need more -* precision, or rounding will get you. With 2-second counting freq, -* the EXP_n values would be 1981, 2034 and 2043 if still using only -* 11 bit fractions. -*/ -extern unsigned long avenrun[];/* Load averages */ -extern void get_avenrun (unsigned long *loads,unsigned long offset,int shift); - -#define FSHIFT 11/* nr of bits of precision */ -#define FIXED_1 (1<<FSHIFT)/* 1.0 as fixed-point */ -#define LOAD_FREQ (5*HZ+1)/* 5 sec intervals */ -#define EXP_1 1884/* 1/exp(5sec/1min) as fixed-point */ -#define EXP_5 2014/* 1/exp(5sec/5min) */ -#define EXP_15 2037/* 1/exp(5sec/15min) */ - -#define CALC_LOAD (load,exp,n) \ - load *= exp; \ - load += n*(FIXED_1-exp); \ - load >>= FSHIFT; -extern unsigned long total_forks;extern int nr_threads; DECLARE_PER_CPU(unsigned long, process_counts);
@@ -107,8 +82,6 @@ extern unsigned long nr_iowait(void);extern unsigned long nr_iowait_cpu (int cpu);extern void get_iowait_load (unsigned long *nr_waiters,unsigned long *load); -extern void calc_global_load (unsigned long ticks); -#if defined(CONFIG_SMP ) && defined(CONFIG_NO_HZ_COMMON )extern void cpu_load_update_nohz_start (void );extern void cpu_load_update_nohz_stop (void );
include/linux/sched/loadavg.h new file +31 -0
@@ -0,0 +1,31 @@ +#ifndef _LINUX_SCHED_LOADAVG_H +#define _LINUX_SCHED_LOADAVG_H + +/* +* These are the constant used to fake the fixed-point load-average +* counting. Some notes: +* - 11 bit fractions expand to 22 bits by the multiplies: this gives +* a load-average precision of 10 bits integer + 11 bits fractional +* - if you want to count load-averages more often, you need more +* precision, or rounding will get you. With 2-second counting freq, +* the EXP_n values would be 1981, 2034 and 2043 if still using only +* 11 bit fractions. +*/ +extern unsigned long avenrun[];/* Load averages */ +extern void get_avenrun (unsigned long *loads,unsigned long offset,int shift); + +#define FSHIFT 11/* nr of bits of precision */ +#define FIXED_1 (1<<FSHIFT)/* 1.0 as fixed-point */ +#define LOAD_FREQ (5*HZ+1)/* 5 sec intervals */ +#define EXP_1 1884/* 1/exp(5sec/1min) as fixed-point */ +#define EXP_5 2014/* 1/exp(5sec/5min) */ +#define EXP_15 2037/* 1/exp(5sec/15min) */ + +#define CALC_LOAD (load,exp,n) \ + load *= exp; \ + load += n*(FIXED_1-exp); \ + load >>= FSHIFT; + +extern void calc_global_load (unsigned long ticks); + +#endif /* _LINUX_SCHED_LOADAVG_H */
kernel/debug/kdb/kdb_main.c +1 -0
@@ -18,6 +18,7 @@#include <linux/kmsg_dump.h> #include <linux/reboot.h> #include <linux/sched.h> +#include <linux/sched/loadavg.h> #include <linux/sysrq.h> #include <linux/smp.h> #include <linux/utsname.h>
kernel/sched/core.c +1 -1
@@ -9,7 +9,7 @@#include <linux/sched.h> #include <linux/sched/clock.h> -#include <uapi/linux/sched/types.h> +#include <linux/sched/loadavg.h> #include <linux/cpuset.h> #include <linux/delayacct.h> #include <linux/init_task.h>
kernel/sched/loadavg.c +1 -0
@@ -7,6 +7,7 @@*/ #include <linux/export.h> +#include <linux/sched/loadavg.h> #include "sched.h"
kernel/sys.c +1 -0
@@ -49,6 +49,7 @@#include <linux/binfmts.h> #include <linux/sched.h> +#include <linux/sched/loadavg.h> #include <linux/rcupdate.h> #include <linux/uidgid.h> #include <linux/cred.h>
kernel/time/timekeeping.c +1 -0
@@ -15,6 +15,7 @@#include <linux/init.h> #include <linux/mm.h> #include <linux/sched.h> +#include <linux/sched/loadavg.h> #include <linux/syscore_ops.h> #include <linux/clocksource.h> #include <linux/jiffies.h>
net/sched/em_meta.c +1 -0
@@ -63,6 +63,7 @@#include <linux/types.h> #include <linux/kernel.h> #include <linux/sched.h> +#include <linux/sched/loadavg.h> #include <linux/string.h> #include <linux/skbuff.h> #include <linux/random.h>
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 14/89 sched/autogroup: Collect extern APIs into <linux/sched/autogroup.h>
In reply to Ingo MolnarFurther reduce the size of sched.h.
--- fs/proc/base.c | 1 + include/linux/sched.h | 18 ------------------ include/linux/sched/autogroup.h | 25 +++++++++++++++++++++++++ kernel/exit.c | 1 + kernel/fork.c | 1 + kernel/sched/auto_group.h | 1 + kernel/sys.c | 1 + 7 files changed, 30 insertions(+), 18 deletions(-)
fs/proc/base.c +1 -0
@@ -85,6 +85,7 @@#include <linux/user_namespace.h> #include <linux/fs_struct.h> #include <linux/slab.h> +#include <linux/sched/autogroup.h> #include <linux/flex_array.h> #include <linux/posix-timers.h> #ifdef CONFIG_HARDWALL
include/linux/sched.h +0 -18
@@ -2101,24 +2101,6 @@ static inline void wake_up_nohz_cpu(int cpu) { }extern u64 scheduler_tick_max_deferment (void );#endif -#ifdef CONFIG_SCHED_AUTOGROUP -extern void sched_autogroup_create_attach (struct task_struct *p); -extern void sched_autogroup_detach (struct task_struct *p); -extern void sched_autogroup_fork (struct signal_struct *sig); -extern void sched_autogroup_exit (struct signal_struct *sig); -extern void sched_autogroup_exit_task (struct task_struct *p); -#ifdef CONFIG_PROC_FS -extern void proc_sched_autogroup_show_task (struct task_struct *p,struct seq_file *m); -extern int proc_sched_autogroup_set_nice (struct task_struct *p,int nice); -#endif -#else -static inline void sched_autogroup_create_attach (struct task_struct *p) { } -static inline void sched_autogroup_detach (struct task_struct *p) { } -static inline void sched_autogroup_fork (struct signal_struct *sig) { } -static inline void sched_autogroup_exit (struct signal_struct *sig) { } -static inline void sched_autogroup_exit_task (struct task_struct *p) { } -#endif -extern int yield_to (struct task_struct *p,bool preempt);extern void set_user_nice (struct task_struct *p,long nice);extern int task_prio (const struct task_struct *p);
include/linux/sched/autogroup.h new file +25 -0
@@ -0,0 +1,25 @@ +#ifndef _LINUX_SCHED_AUTOGROUP_H +#define _LINUX_SCHED_AUTOGROUP_H + +struct signal_struct ; +struct seq_file ; + +#ifdef CONFIG_SCHED_AUTOGROUP +extern void sched_autogroup_create_attach (struct task_struct *p); +extern void sched_autogroup_detach (struct task_struct *p); +extern void sched_autogroup_fork (struct signal_struct *sig); +extern void sched_autogroup_exit (struct signal_struct *sig); +extern void sched_autogroup_exit_task (struct task_struct *p); +#ifdef CONFIG_PROC_FS +extern void proc_sched_autogroup_show_task (struct task_struct *p,struct seq_file *m); +extern int proc_sched_autogroup_set_nice (struct task_struct *p,int nice); +#endif +#else +static inline void sched_autogroup_create_attach (struct task_struct *p) { } +static inline void sched_autogroup_detach (struct task_struct *p) { } +static inline void sched_autogroup_fork (struct signal_struct *sig) { } +static inline void sched_autogroup_exit (struct signal_struct *sig) { } +static inline void sched_autogroup_exit_task (struct task_struct *p) { } +#endif + +#endif /* _LINUX_SCHED_AUTOGROUP_H */
kernel/exit.c +1 -0
@@ -6,6 +6,7 @@#include <linux/mm.h> #include <linux/slab.h> +#include <linux/sched/autogroup.h> #include <linux/interrupt.h> #include <linux/module.h> #include <linux/capability.h>
kernel/fork.c +1 -0
@@ -12,6 +12,7 @@*/ #include <linux/slab.h> +#include <linux/sched/autogroup.h> #include <linux/init.h> #include <linux/unistd.h> #include <linux/module.h>
kernel/sched/auto_group.h +1 -0
@@ -2,6 +2,7 @@#include <linux/kref.h> #include <linux/rwsem.h> +#include <linux/sched/autogroup.h> struct autogroup {/*
kernel/sys.c +1 -0
@@ -49,6 +49,7 @@#include <linux/binfmts.h> #include <linux/sched.h> +#include <linux/sched/autogroup.h> #include <linux/sched/loadavg.h> #include <linux/rcupdate.h> #include <linux/uidgid.h>
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 15/89 sched/autogroup: Rename auto_group.[ch] to autogroup.[ch]
In reply to Ingo MolnarThe names are all 'autogroup', not 'auto_group' - so rename the kernel/sched/auto_group.[ch] to match the existing nomenclature.
---
kernel/sched/Makefile | 2 +-
kernel/sched/{auto_group.c => autogroup.c} | 0
kernel/sched/{auto_group.h => autogroup.h} | 0
kernel/sched/sched.h | 2 +-
4 files changed, 2 insertions(+), 2 deletions(-)kernel/sched/Makefile +1 -1
@@ -19,7 +19,7 @@ obj-y += core.o loadavg.o clock.o cputime.o obj-y += idle_task.o fair.o rt.o deadline.o stop_task.o obj-y += wait.o swait.o completion.o idle.o obj-$(CONFIG_SMP) += cpupri.o cpudeadline.o topology.o -obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o +obj-$(CONFIG_SCHED_AUTOGROUP) += autogroup.o obj-$(CONFIG_SCHEDSTATS) += stats.o obj-$(CONFIG_SCHED_DEBUG) += debug.o obj-$(CONFIG_CGROUP_CPUACCT) += cpuacct.o
kernel/sched/autogroup.c renamed from kernel/sched/auto_group.c +0 -0
kernel/sched/autogroup.h renamed from kernel/sched/auto_group.h +0 -0
kernel/sched/sched.h +1 -1
@@ -1072,7 +1072,7 @@ static inline void sched_ttwu_pending(void) { }#endif /* CONFIG_SMP */ #include "stats.h" -#include "auto_group.h" +#include "autogroup.h" #ifdef CONFIG_CGROUP_SCHED
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 16/89 sched/idle: Move polling methods to <linux/sched/idle.h>
In reply to Ingo MolnarFurther reduce the size of <linux/sched.h> by moving these APIs:
tsk_is_polling() __current_set_polling() current_set_polling_and_test() __current_clr_polling() current_clr_polling_and_test() current_clr_polling()
--- arch/x86/include/asm/mwait.h | 1 + arch/x86/kernel/process.c | 1 + drivers/cpuidle/driver.c | 1 + include/linux/sched.h | 76 ---------------------------------------------------------------- include/linux/sched/idle.h | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ kernel/sched/idle.c | 1 + 6 files changed, 80 insertions(+), 76 deletions(-)
arch/x86/include/asm/mwait.h +1 -0
@@ -2,6 +2,7 @@#define _ASM_X86_MWAIT_H#include <linux/sched.h> +#include <linux/sched/idle.h> #include <asm/cpufeature.h>
arch/x86/kernel/process.c +1 -0
@@ -7,6 +7,7 @@#include <linux/prctl.h> #include <linux/slab.h> #include <linux/sched.h> +#include <linux/sched/idle.h> #include <linux/init.h> #include <linux/export.h> #include <linux/pm.h>
drivers/cpuidle/driver.c +1 -0
@@ -11,6 +11,7 @@#include <linux/mutex.h> #include <linux/module.h> #include <linux/sched.h> +#include <linux/sched/idle.h> #include <linux/cpuidle.h> #include <linux/cpumask.h> #include <linux/tick.h>
include/linux/sched.h +0 -76
82 lines not on this page · raw message
include/linux/sched/idle.h +76 -0
80 lines not on this page · raw message
kernel/sched/idle.c +1 -0
@@ -2,6 +2,7 @@* Generic entry point for the idle threads */ #include <linux/sched.h> +#include <linux/sched/idle.h> #include <linux/cpu.h> #include <linux/cpuidle.h> #include <linux/cpuhotplug.h>
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 17/89 sched/idle: Remove tsk_is_polling()
In reply to Ingo MolnarIt's not used by anything.
--- include/linux/sched/idle.h | 5 ----- 1 file changed, 5 deletions(-)
include/linux/sched/idle.h +0 -5
@@ -15,10 +15,6 @@ extern void wake_up_if_idle(int cpu);* polling state. */ #ifdef TIF_POLLING_NRFLAG -static inline int tsk_is_polling (struct task_struct *p) -{ -return test_tsk_thread_flag (p,TIF_POLLING_NRFLAG ); -}static inline void __current_set_polling (void ) {
@@ -57,7 +53,6 @@ static inline bool __must_check current_clr_polling_and_test(void) }#else -static inline int tsk_is_polling (struct task_struct *p) {return 0 ; }static inline void __current_set_polling (void ) { }static inline void __current_clr_polling (void ) { }
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 18/89 sched/core: Move task->mm handling methods to <linux/sched/mm.h>
In reply to Ingo MolnarMove the following task->mm helper APIs into a new header file, <linux/sched/mm.h>, to further reduce the size and complexity of <linux/sched.h>:
# mm_alloc():
arch/arm/mach-rpc/ecard.c
fs/exec.c
include/linux/sched/mm.h
kernel/fork.c
# __mmdrop():
arch/arc/include/asm/mmu_context.h
include/linux/sched/mm.h
kernel/fork.c
# mmdrop():
arch/arm/mach-rpc/ecard.c
arch/m68k/sun3/mmu_emu.c
arch/x86/mm/tlb.c
drivers/gpu/drm/amd/amdkfd/kfd_process.c
drivers/gpu/drm/i915/i915_gem_userptr.c
drivers/infiniband/hw/hfi1/file_ops.c
drivers/vfio/vfio_iommu_spapr_tce.c
fs/exec.c
fs/proc/base.c
fs/proc/task_mmu.c
fs/proc/task_nommu.c
fs/userfaultfd.c
include/linux/mmu_notifier.h
include/linux/sched/mm.h
kernel/fork.c
kernel/futex.c
kernel/sched/core.c
mm/khugepaged.c
mm/ksm.c
mm/mmu_context.c
mm/mmu_notifier.c
mm/oom_kill.c
virt/kvm/kvm_main.c
# mmdrop_async_fn():
include/linux/sched/mm.h
# mmdrop_async():
include/linux/sched/mm.h
kernel/fork.c
# mmget_not_zero():
fs/userfaultfd.c
include/linux/sched/mm.h
mm/oom_kill.c
# mmput():
arch/arc/include/asm/mmu_context.h
arch/arc/kernel/troubleshoot.c
arch/frv/mm/mmu-context.c
arch/powerpc/platforms/cell/spufs/context.c
arch/sparc/include/asm/mmu_context_32.h
drivers/android/binder.c
drivers/gpu/drm/etnaviv/etnaviv_gem.c
drivers/gpu/drm/i915/i915_gem_userptr.c
drivers/infiniband/core/umem.c
drivers/infiniband/core/umem_odp.c
drivers/infiniband/core/uverbs_main.c
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/usnic/usnic_uiom.c
drivers/iommu/amd_iommu_v2.c
drivers/iommu/intel-svm.c
drivers/lguest/lguest_user.c
drivers/misc/cxl/fault.c
drivers/misc/mic/scif/scif_rma.c
drivers/oprofile/buffer_sync.c
drivers/vfio/vfio_iommu_type1.c
drivers/vhost/vhost.c
drivers/xen/gntdev.c
fs/exec.c
fs/proc/array.c
fs/proc/base.c
fs/proc/task_mmu.c
fs/proc/task_nommu.c
fs/userfaultfd.c
include/linux/sched/mm.h
kernel/cpuset.c
kernel/events/core.c
kernel/events/uprobes.c
kernel/exit.c
kernel/fork.c
kernel/ptrace.c
kernel/sys.c
kernel/trace/trace_output.c
kernel/tsacct.c
mm/memcontrol.c
mm/memory.c
mm/mempolicy.c
mm/migrate.c
mm/mmu_notifier.c
mm/nommu.c
mm/oom_kill.c
mm/process_vm_access.c
mm/rmap.c
mm/swapfile.c
mm/util.c
virt/kvm/async_pf.c
# mmput_async():
include/linux/sched/mm.h
kernel/fork.c
mm/oom_kill.c
# get_task_mm():
arch/arc/kernel/troubleshoot.c
arch/powerpc/platforms/cell/spufs/context.c
drivers/android/binder.c
drivers/gpu/drm/etnaviv/etnaviv_gem.c
drivers/infiniband/core/umem.c
drivers/infiniband/core/umem_odp.c
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/usnic/usnic_uiom.c
drivers/iommu/amd_iommu_v2.c
drivers/iommu/intel-svm.c
drivers/lguest/lguest_user.c
drivers/misc/cxl/fault.c
drivers/misc/mic/scif/scif_rma.c
drivers/oprofile/buffer_sync.c
drivers/vfio/vfio_iommu_type1.c
drivers/vhost/vhost.c
drivers/xen/gntdev.c
fs/proc/array.c
fs/proc/base.c
fs/proc/task_mmu.c
include/linux/sched/mm.h
kernel/cpuset.c
kernel/events/core.c
kernel/exit.c
kernel/fork.c
kernel/ptrace.c
kernel/sys.c
kernel/trace/trace_output.c
kernel/tsacct.c
mm/memcontrol.c
mm/memory.c
mm/mempolicy.c
mm/migrate.c
mm/mmu_notifier.c
mm/nommu.c
mm/util.c
# mm_access():
fs/proc/base.c
include/linux/sched/mm.h
kernel/fork.c
mm/process_vm_access.c
# mm_release():
arch/arc/include/asm/mmu_context.h
fs/exec.c
include/linux/sched/mm.h
include/uapi/linux/sched.h
kernel/exit.c
kernel/fork.c
--- arch/arc/include/asm/mmu_context.h | 1 + arch/arc/kernel/troubleshoot.c | 2 ++ arch/arm/mach-rpc/ecard.c | 1 + arch/frv/mm/mmu-context.c | 1 + arch/m68k/sun3/mmu_emu.c | 1 + arch/powerpc/platforms/cell/spufs/context.c | 2 ++ drivers/android/binder.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_process.c | 1 + drivers/gpu/drm/etnaviv/etnaviv_gem.c | 1 + drivers/gpu/drm/i915/i915_gem_userptr.c | 1 + drivers/infiniband/core/umem.c | 1 + drivers/infiniband/core/umem_odp.c | 1 + drivers/infiniband/hw/hfi1/file_ops.c | 1 + drivers/infiniband/hw/mlx4/main.c | 2 ++ drivers/infiniband/hw/mlx5/main.c | 1 + drivers/infiniband/hw/usnic/usnic_uiom.c | 1 + drivers/iommu/amd_iommu_v2.c | 1 + drivers/iommu/intel-svm.c | 1 + drivers/lguest/lguest_user.c | 1 + drivers/misc/cxl/fault.c | 1 + drivers/misc/mic/scif/scif_rma.c | 2 ++ drivers/oprofile/buffer_sync.c | 1 + drivers/vfio/vfio_iommu_spapr_tce.c | 2 ++ drivers/vfio/vfio_iommu_type1.c | 1 + drivers/vhost/vhost.c | 1 + drivers/xen/gntdev.c | 1 + fs/exec.c | 1 + fs/proc/array.c | 1 + fs/proc/base.c | 1 + fs/proc/task_mmu.c | 1 + fs/proc/task_nommu.c | 2 ++ fs/userfaultfd.c | 1 + include/linux/sched.h | 52 ------------------------------------------- include/linux/sched/mm.h | 59 +++++++++++++++++++++++++++++++++++++++++++++++++ kernel/cpuset.c | 1 + kernel/events/core.c | 1 + kernel/events/uprobes.c | 1 + kernel/exit.c | 1 + kernel/fork.c | 1 + kernel/futex.c | 1 + kernel/ptrace.c | 1 + kernel/sched/sched.h | 1 + kernel/sys.c | 1 + kernel/trace/trace_output.c | 1 + kernel/tsacct.c | 1 + mm/khugepaged.c | 1 + mm/ksm.c | 1 + mm/memcontrol.c | 1 + mm/memory.c | 1 + mm/mempolicy.c | 1 + mm/migrate.c | 1 + mm/mmu_context.c | 1 + mm/mmu_notifier.c | 1 + mm/nommu.c | 1 + mm/oom_kill.c | 1 + mm/process_vm_access.c | 1 + mm/rmap.c | 1 + mm/swapfile.c | 1 + mm/util.c | 1 + virt/kvm/async_pf.c | 1 + virt/kvm/kvm_main.c | 1 + 61 files changed, 124 insertions(+), 52 deletions(-)
arch/arc/include/asm/mmu_context.h +1 -0
@@ -20,6 +20,7 @@#include <asm/arcregs.h> #include <asm/tlb.h> +#include <linux/sched/mm.h> #include <asm-generic/mm_hooks.h>
arch/arc/kernel/troubleshoot.c +2 -0
@@ -13,6 +13,8 @@#include <linux/fs_struct.h> #include <linux/proc_fs.h> #include <linux/file.h> +#include <linux/sched/mm.h> +#include <asm/arcregs.h> #include <asm/irqflags.h>
arch/arm/mach-rpc/ecard.c +1 -0
@@ -31,6 +31,7 @@#include <linux/kernel.h> #include <linux/types.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/interrupt.h> #include <linux/completion.h> #include <linux/reboot.h>
arch/frv/mm/mmu-context.c +1 -0
@@ -10,6 +10,7 @@*/ #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/mm.h> #include <asm/tlbflush.h>
arch/m68k/sun3/mmu_emu.c +1 -0
@@ -15,6 +15,7 @@#include <linux/bootmem.h> #include <linux/bitops.h> #include <linux/module.h> +#include <linux/sched/mm.h> #include <asm/setup.h> #include <asm/traps.h>
arch/powerpc/platforms/cell/spufs/context.c +2 -0
@@ -25,6 +25,8 @@#include <linux/slab.h> #include <linux/atomic.h> #include <linux/sched.h> +#include <linux/sched/mm.h> +#include <asm/spu.h> #include <asm/spu_csa.h> #include "spufs.h"
drivers/android/binder.c +1 -0
@@ -32,6 +32,7 @@#include <linux/debugfs.h> #include <linux/rbtree.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/seq_file.h> #include <linux/uaccess.h> #include <linux/vmalloc.h>
drivers/gpu/drm/amd/amdkfd/kfd_process.c +1 -0
@@ -23,6 +23,7 @@#include <linux/mutex.h> #include <linux/log2.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/slab.h> #include <linux/amd-iommu.h> #include <linux/notifier.h>
drivers/gpu/drm/etnaviv/etnaviv_gem.c +1 -0
@@ -16,6 +16,7 @@#include <linux/spinlock.h> #include <linux/shmem_fs.h> +#include <linux/sched/mm.h> #include "etnaviv_drv.h" #include "etnaviv_gem.h"
drivers/gpu/drm/i915/i915_gem_userptr.c +1 -0
@@ -31,6 +31,7 @@#include <linux/mmu_notifier.h> #include <linux/mempolicy.h> #include <linux/swap.h> +#include <linux/sched/mm.h> struct i915_mm_struct {struct mm_struct *mm;
drivers/infiniband/core/umem.c +1 -0
@@ -35,6 +35,7 @@#include <linux/mm.h> #include <linux/dma-mapping.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/export.h> #include <linux/hugetlb.h> #include <linux/slab.h>
drivers/infiniband/core/umem_odp.c +1 -0
@@ -32,6 +32,7 @@#include <linux/types.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/pid.h> #include <linux/slab.h> #include <linux/export.h>
drivers/infiniband/hw/hfi1/file_ops.c +1 -0
@@ -48,6 +48,7 @@#include <linux/cdev.h> #include <linux/vmalloc.h> #include <linux/io.h> +#include <linux/sched/mm.h> #include <rdma/ib.h>
drivers/infiniband/hw/mlx4/main.c +2 -0
@@ -39,6 +39,8 @@#include <linux/inetdevice.h> #include <linux/rtnetlink.h> #include <linux/if_vlan.h> +#include <linux/sched/mm.h> +#include <net/ipv6.h> #include <net/addrconf.h> #include <net/devlink.h>
drivers/infiniband/hw/mlx5/main.c +1 -0
@@ -41,6 +41,7 @@#include <asm/pat.h> #endif #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/delay.h> #include <rdma/ib_user_verbs.h> #include <rdma/ib_addr.h>
drivers/infiniband/hw/usnic/usnic_uiom.c +1 -0
@@ -35,6 +35,7 @@#include <linux/mm.h> #include <linux/dma-mapping.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/hugetlb.h> #include <linux/iommu.h> #include <linux/workqueue.h>
drivers/iommu/amd_iommu_v2.c +1 -0
@@ -22,6 +22,7 @@#include <linux/profile.h> #include <linux/module.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/iommu.h> #include <linux/wait.h> #include <linux/pci.h>
drivers/iommu/intel-svm.c +1 -0
@@ -16,6 +16,7 @@#include <linux/intel-iommu.h> #include <linux/mmu_notifier.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/slab.h> #include <linux/intel-svm.h> #include <linux/rculist.h>
drivers/lguest/lguest_user.c +1 -0
@@ -8,6 +8,7 @@#include <linux/miscdevice.h> #include <linux/fs.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/file.h> #include <linux/slab.h> #include <linux/export.h>
drivers/misc/cxl/fault.c +1 -0
@@ -9,6 +9,7 @@#include <linux/workqueue.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/pid.h> #include <linux/mm.h> #include <linux/moduleparam.h>
drivers/misc/mic/scif/scif_rma.c +2 -0
@@ -17,6 +17,8 @@*/ #include <linux/dma_remapping.h> #include <linux/pagemap.h> +#include <linux/sched/mm.h> +#include "scif_main.h" #include "scif_map.h"
drivers/oprofile/buffer_sync.c +1 -0
@@ -31,6 +31,7 @@#include <linux/fs.h> #include <linux/oprofile.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/gfp.h> #include "oprofile_stats.h"
drivers/vfio/vfio_iommu_spapr_tce.c +2 -0
@@ -20,6 +20,8 @@#include <linux/err.h> #include <linux/vfio.h> #include <linux/vmalloc.h> +#include <linux/sched/mm.h> +#include <asm/iommu.h> #include <asm/tce.h> #include <asm/mmu_context.h>
drivers/vfio/vfio_iommu_type1.c +1 -0
@@ -32,6 +32,7 @@#include <linux/mm.h> #include <linux/rbtree.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/slab.h> #include <linux/uaccess.h> #include <linux/vfio.h>
drivers/vhost/vhost.c +1 -0
@@ -27,6 +27,7 @@#include <linux/cgroup.h> #include <linux/module.h> #include <linux/sort.h> +#include <linux/sched/mm.h> #include <linux/interval_tree_generic.h> #include "vhost.h"
drivers/xen/gntdev.c +1 -0
@@ -32,6 +32,7 @@#include <linux/types.h> #include <linux/uaccess.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/spinlock.h> #include <linux/slab.h> #include <linux/highmem.h>
fs/exec.c +1 -0
@@ -32,6 +32,7 @@#include <linux/swap.h> #include <linux/string.h> #include <linux/init.h> +#include <linux/sched/mm.h> #include <linux/pagemap.h> #include <linux/perf_event.h> #include <linux/highmem.h>
fs/proc/array.c +1 -0
@@ -60,6 +60,7 @@#include <linux/tty.h> #include <linux/string.h> #include <linux/mman.h> +#include <linux/sched/mm.h> #include <linux/proc_fs.h> #include <linux/ioport.h> #include <linux/uaccess.h>
fs/proc/base.c +1 -0
@@ -86,6 +86,7 @@#include <linux/fs_struct.h> #include <linux/slab.h> #include <linux/sched/autogroup.h> +#include <linux/sched/mm.h> #include <linux/flex_array.h> #include <linux/posix-timers.h> #ifdef CONFIG_HARDWALL
fs/proc/task_mmu.c +1 -0
@@ -11,6 +11,7 @@#include <linux/mempolicy.h> #include <linux/rmap.h> #include <linux/swap.h> +#include <linux/sched/mm.h> #include <linux/swapops.h> #include <linux/mmu_notifier.h> #include <linux/page_idle.h>
fs/proc/task_nommu.c +2 -0
@@ -7,6 +7,8 @@#include <linux/ptrace.h> #include <linux/slab.h> #include <linux/seq_file.h> +#include <linux/sched/mm.h> +#include "internal.h" /*
fs/userfaultfd.c +1 -0
@@ -14,6 +14,7 @@#include <linux/hashtable.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/mm.h> #include <linux/poll.h> #include <linux/slab.h>
include/linux/sched.h +0 -52
58 lines not on this page · raw message
include/linux/sched/mm.h new file +59 -0
59 lines not on this page · raw message
kernel/cpuset.c +1 -0
@@ -44,6 +44,7 @@#include <linux/proc_fs.h> #include <linux/rcupdate.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/seq_file.h> #include <linux/security.h> #include <linux/slab.h>
kernel/events/core.c +1 -0
@@ -47,6 +47,7 @@#include <linux/namei.h> #include <linux/parser.h> #include <linux/sched/clock.h> +#include <linux/sched/mm.h> #include "internal.h"
kernel/events/uprobes.c +1 -0
@@ -27,6 +27,7 @@#include <linux/pagemap.h> /* read_mapping_page */ #include <linux/slab.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/export.h> #include <linux/rmap.h> /* anon_vma_prepare */ #include <linux/mmu_notifier.h> /* set_pte_at_notify */
kernel/exit.c +1 -0
@@ -7,6 +7,7 @@#include <linux/mm.h> #include <linux/slab.h> #include <linux/sched/autogroup.h> +#include <linux/sched/mm.h> #include <linux/interrupt.h> #include <linux/module.h> #include <linux/capability.h>
kernel/fork.c +1 -0
@@ -13,6 +13,7 @@#include <linux/slab.h> #include <linux/sched/autogroup.h> +#include <linux/sched/mm.h> #include <linux/init.h> #include <linux/unistd.h> #include <linux/module.h>
kernel/futex.c +1 -0
@@ -62,6 +62,7 @@#include <linux/ptrace.h> #include <linux/sched/rt.h> #include <linux/sched/wake_q.h> +#include <linux/sched/mm.h> #include <linux/hugetlb.h> #include <linux/freezer.h> #include <linux/bootmem.h>
kernel/ptrace.c +1 -0
@@ -10,6 +10,7 @@#include <linux/capability.h> #include <linux/export.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/errno.h> #include <linux/mm.h> #include <linux/highmem.h>
kernel/sched/sched.h +1 -0
@@ -5,6 +5,7 @@#include <linux/sched/rt.h> #include <linux/sched/clock.h> #include <linux/sched/wake_q.h> +#include <linux/sched/mm.h> #include <linux/u64_stats_sync.h> #include <linux/sched/deadline.h> #include <linux/kernel_stat.h>
kernel/sys.c +1 -0
@@ -51,6 +51,7 @@#include <linux/sched.h> #include <linux/sched/autogroup.h> #include <linux/sched/loadavg.h> +#include <linux/sched/mm.h> #include <linux/rcupdate.h> #include <linux/uidgid.h> #include <linux/cred.h>
kernel/trace/trace_output.c +1 -0
@@ -9,6 +9,7 @@#include <linux/mutex.h> #include <linux/ftrace.h> #include <linux/sched/clock.h> +#include <linux/sched/mm.h> #include "trace_output.h"
kernel/tsacct.c +1 -0
@@ -18,6 +18,7 @@#include <linux/kernel.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/tsacct_kern.h> #include <linux/acct.h> #include <linux/jiffies.h>
mm/khugepaged.c +1 -0
@@ -2,6 +2,7 @@#include <linux/mm.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/mmu_notifier.h> #include <linux/rmap.h> #include <linux/swap.h>
mm/ksm.c +1 -0
@@ -19,6 +19,7 @@#include <linux/fs.h> #include <linux/mman.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/rwsem.h> #include <linux/pagemap.h> #include <linux/rmap.h>
mm/memcontrol.c +1 -0
@@ -35,6 +35,7 @@#include <linux/memcontrol.h> #include <linux/cgroup.h> #include <linux/mm.h> +#include <linux/sched/mm.h> #include <linux/hugetlb.h> #include <linux/pagemap.h> #include <linux/smp.h>
mm/memory.c +1 -0
@@ -40,6 +40,7 @@#include <linux/kernel_stat.h> #include <linux/mm.h> +#include <linux/sched/mm.h> #include <linux/hugetlb.h> #include <linux/mman.h> #include <linux/swap.h>
mm/mempolicy.c +1 -0
@@ -73,6 +73,7 @@#include <linux/hugetlb.h> #include <linux/kernel.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/nodemask.h> #include <linux/cpuset.h> #include <linux/slab.h>
mm/migrate.c +1 -0
@@ -40,6 +40,7 @@#include <linux/mmu_notifier.h> #include <linux/page_idle.h> #include <linux/page_owner.h> +#include <linux/sched/mm.h> #include <asm/tlbflush.h>
mm/mmu_context.c +1 -0
@@ -5,6 +5,7 @@#include <linux/mm.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/mmu_context.h> #include <linux/export.h>
mm/mmu_notifier.c +1 -0
@@ -17,6 +17,7 @@#include <linux/srcu.h> #include <linux/rcupdate.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/slab.h> /* global SRCU for all MMs */
mm/nommu.c +1 -0
@@ -17,6 +17,7 @@#include <linux/export.h> #include <linux/mm.h> +#include <linux/sched/mm.h> #include <linux/vmacache.h> #include <linux/mman.h> #include <linux/swap.h>
mm/oom_kill.c +1 -0
@@ -22,6 +22,7 @@#include <linux/err.h> #include <linux/gfp.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/swap.h> #include <linux/timex.h> #include <linux/jiffies.h>
mm/process_vm_access.c +1 -0
@@ -12,6 +12,7 @@#include <linux/mm.h> #include <linux/uio.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/highmem.h> #include <linux/ptrace.h> #include <linux/slab.h>
mm/rmap.c +1 -0
@@ -46,6 +46,7 @@*/ #include <linux/mm.h> +#include <linux/sched/mm.h> #include <linux/pagemap.h> #include <linux/swap.h> #include <linux/swapops.h>
mm/swapfile.c +1 -0
@@ -6,6 +6,7 @@*/ #include <linux/mm.h> +#include <linux/sched/mm.h> #include <linux/hugetlb.h> #include <linux/mman.h> #include <linux/slab.h>
mm/util.c +1 -0
@@ -5,6 +5,7 @@#include <linux/export.h> #include <linux/err.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/security.h> #include <linux/swap.h> #include <linux/swapops.h>
virt/kvm/async_pf.c +1 -0
@@ -24,6 +24,7 @@#include <linux/slab.h> #include <linux/module.h> #include <linux/mmu_context.h> +#include <linux/sched/mm.h> #include "async_pf.h" #include <trace/events/kvm.h>
virt/kvm/kvm_main.c +1 -0
@@ -33,6 +33,7 @@#include <linux/syscore_ops.h> #include <linux/cpu.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/cpumask.h> #include <linux/smp.h> #include <linux/anon_inodes.h>
Signature · 1 line
2.7.4
Re: [PATCH 18/89] sched/core: Move task->mm handling methods to <linux/sched/mm.h>
Quoted 3 lines · Ingo Molnar
Move the following
task->mmhelper APIs into a new header file, <linux/sched/mm.h>, to further reduce the size and complexity of <linux/sched.h>:
Is there any good reason why they can't just go into linux/mm.h?
Ingo Molnar
maintainerRe: [PATCH 18/89] sched/core: Move task->mm handling methods to <linux/sched/mm.h>
Quoted 6 lines · Christoph Hellwig
Quoted 3 lines · Ingo Molnar
Move the following
task->mmhelper APIs into a new header file, <linux/sched/mm.h>, to further reduce the size and complexity of <linux/sched.h>:Is there any good reason why they can't just go into
linux/mm.h?
So mm.h is pretty large already, and I wanted to preserve the natural API and header separation that was the result of these APIs being in sched.h. Many smaller headers are so much easier to maintain, and they are much more readable as well in my experience.
mm.h and mm_types.h should probably be split up some more: on a defconfig kernel mm.i is about 18,800 lines long, with a size of 0.65 MB. There's a lot of wasted energy building all that again and again, while drivers typically need only a small fraction of those definitions. Not to mention that large headers typically result in lower code quality and poorer code organization as well.
But we could move the new header to <linux/mm_task.h> or so?
Thanks,
Ingo
Ingo Molnar
maintainerRe: [PATCH 18/89] sched/core: Move task->mm handling methods to <linux/sched/mm.h>
Quoted 8 lines · Ingo Molnar
Quoted 5 lines · Christoph Hellwig
Quoted 3 lines · Ingo Molnar
Move the following
task->mmhelper APIs into a new header file, <linux/sched/mm.h>, to further reduce the size and complexity of <linux/sched.h>:
Quoted 6 lines
Quoted 1 line
Is there any good reason why they can't just go into
linux/mm.h?So
mm.his pretty large already, and I wanted to preserve the natural API and header separation that was the result of these APIs being insched.h. Many smaller headers are so much easier to maintain, and they are much more readable as well in my experience.
The other big reason is that putting these APIs (mmget()/mmput()/etc.) into mm.h would cause mm.h to include sched.h, which would make the whole major kernel header coupling situation I'm trying to improve with this series so much worse all around.
The current stats are: <linux/mm.h> is included in almost as many files as <linux/sched.h>, and about half of them don't include <linux/sched.h>. So adding these APIs would significantly bloat the kernel in the header build space. So we really don't want to include sched.h in mm.h.
Thanks,
Ingo
Ingo Molnar
maintainerPATCH 19/89 sched/core: Move task->mm coredumping related defines and methods from <linux/sched.h> to <linux/sched/coredump.h>
In reply to Ingo MolnarThis further reduces the size and complexity of <linux/sched.h>.
These are the definitions and APIs that were moved:
# MMF_*:
fs/binfmt_elf.c
fs/binfmt_elf_fdpic.c
fs/exec.c
fs/proc/base.c
include/linux/khugepaged.h
include/linux/ksm.h
include/linux/sched/coredump.h
kernel/events/uprobes.c
kernel/fork.c
mm/huge_memory.c
mm/khugepaged.c
mm/ksm.c
mm/memory.c
mm/oom_kill.c
# SUID_DUMP_*:
arch/ia64/include/asm/processor.h
fs/coredump.c
fs/exec.c
fs/proc/internal.h
include/linux/sched/coredump.h
kernel/ptrace.c
kernel/sys.c
kernel/sysctl.c
# get_dumpable():
arch/ia64/include/asm/processor.h
fs/coredump.c
fs/exec.c
fs/proc/internal.h
include/linux/sched/coredump.h
kernel/ptrace.c
kernel/sys.c
# set_dumpable():
fs/exec.c
include/linux/sched/coredump.h
kernel/cred.c
kernel/sys.c
--- fs/binfmt_elf.c | 1 + fs/binfmt_elf_fdpic.c | 1 + fs/coredump.c | 1 + fs/exec.c | 1 + fs/proc/base.c | 1 + fs/proc/internal.h | 1 + include/linux/khugepaged.h | 3 ++- include/linux/ksm.h | 1 + include/linux/sched.h | 68 --------------------------------------------------------- include/linux/sched/coredump.h | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ kernel/cred.c | 1 + kernel/events/uprobes.c | 1 + kernel/fork.c | 1 + kernel/ptrace.c | 1 + kernel/sys.c | 1 + kernel/sysctl.c | 1 + mm/huge_memory.c | 1 + mm/khugepaged.c | 1 + mm/ksm.c | 1 + mm/memory.c | 1 + mm/oom_kill.c | 1 + 21 files changed, 94 insertions(+), 69 deletions(-)
fs/binfmt_elf.c +1 -0
@@ -35,6 +35,7 @@#include <linux/utsname.h> #include <linux/coredump.h> #include <linux/sched.h> +#include <linux/sched/coredump.h> #include <linux/dax.h> #include <linux/uaccess.h> #include <asm/param.h>
fs/binfmt_elf_fdpic.c +1 -0
@@ -35,6 +35,7 @@#include <linux/elf-fdpic.h> #include <linux/elfcore.h> #include <linux/coredump.h> +#include <linux/sched/coredump.h> #include <linux/dax.h> #include <linux/uaccess.h>
fs/coredump.c +1 -0
@@ -16,6 +16,7 @@#include <linux/personality.h> #include <linux/binfmts.h> #include <linux/coredump.h> +#include <linux/sched/coredump.h> #include <linux/utsname.h> #include <linux/pid_namespace.h> #include <linux/module.h>
fs/exec.c +1 -0
@@ -33,6 +33,7 @@#include <linux/string.h> #include <linux/init.h> #include <linux/sched/mm.h> +#include <linux/sched/coredump.h> #include <linux/pagemap.h> #include <linux/perf_event.h> #include <linux/highmem.h>
fs/proc/base.c +1 -0
@@ -87,6 +87,7 @@#include <linux/slab.h> #include <linux/sched/autogroup.h> #include <linux/sched/mm.h> +#include <linux/sched/coredump.h> #include <linux/flex_array.h> #include <linux/posix-timers.h> #ifdef CONFIG_HARDWALL
fs/proc/internal.h +1 -0
@@ -14,6 +14,7 @@#include <linux/spinlock.h> #include <linux/atomic.h> #include <linux/binfmts.h> +#include <linux/sched/coredump.h> struct ctl_table_header ;struct mempolicy ;
include/linux/khugepaged.h +2 -1
@@ -1,7 +1,8 @@#ifndef _LINUX_KHUGEPAGED_H#define _LINUX_KHUGEPAGED_H -#include <linux/sched.h> /* MMF_VM_HUGEPAGE */ +#include <linux/sched/coredump.h> /* MMF_VM_HUGEPAGE */ +#ifdef CONFIG_TRANSPARENT_HUGEPAGE extern struct attribute_group khugepaged_attr_group;
include/linux/ksm.h +1 -0
@@ -12,6 +12,7 @@#include <linux/pagemap.h> #include <linux/rmap.h> #include <linux/sched.h> +#include <linux/sched/coredump.h> struct stable_node ;struct mem_cgroup ;
include/linux/sched.h +0 -68
74 lines not on this page · raw message
include/linux/sched/coredump.h new file +74 -0
74 lines not on this page · raw message
kernel/cred.c +1 -0
@@ -12,6 +12,7 @@#include <linux/cred.h> #include <linux/slab.h> #include <linux/sched.h> +#include <linux/sched/coredump.h> #include <linux/key.h> #include <linux/keyctl.h> #include <linux/init_task.h>
kernel/events/uprobes.c +1 -0
@@ -28,6 +28,7 @@#include <linux/slab.h> #include <linux/sched.h> #include <linux/sched/mm.h> +#include <linux/sched/coredump.h> #include <linux/export.h> #include <linux/rmap.h> /* anon_vma_prepare */ #include <linux/mmu_notifier.h> /* set_pte_at_notify */
kernel/fork.c +1 -0
@@ -14,6 +14,7 @@#include <linux/slab.h> #include <linux/sched/autogroup.h> #include <linux/sched/mm.h> +#include <linux/sched/coredump.h> #include <linux/init.h> #include <linux/unistd.h> #include <linux/module.h>
kernel/ptrace.c +1 -0
@@ -11,6 +11,7 @@#include <linux/export.h> #include <linux/sched.h> #include <linux/sched/mm.h> +#include <linux/sched/coredump.h> #include <linux/errno.h> #include <linux/mm.h> #include <linux/highmem.h>
kernel/sys.c +1 -0
@@ -52,6 +52,7 @@#include <linux/sched/autogroup.h> #include <linux/sched/loadavg.h> #include <linux/sched/mm.h> +#include <linux/sched/coredump.h> #include <linux/rcupdate.h> #include <linux/uidgid.h> #include <linux/cred.h>
kernel/sysctl.c +1 -0
@@ -63,6 +63,7 @@#include <linux/capability.h> #include <linux/binfmts.h> #include <linux/sched/sysctl.h> +#include <linux/sched/coredump.h> #include <linux/kexec.h> #include <linux/bpf.h> #include <linux/mount.h>
mm/huge_memory.c +1 -0
@@ -9,6 +9,7 @@#include <linux/mm.h> #include <linux/sched.h> +#include <linux/sched/coredump.h> #include <linux/highmem.h> #include <linux/hugetlb.h> #include <linux/mmu_notifier.h>
mm/khugepaged.c +1 -0
@@ -3,6 +3,7 @@#include <linux/mm.h> #include <linux/sched.h> #include <linux/sched/mm.h> +#include <linux/sched/coredump.h> #include <linux/mmu_notifier.h> #include <linux/rmap.h> #include <linux/swap.h>
mm/ksm.c +1 -0
@@ -20,6 +20,7 @@#include <linux/mman.h> #include <linux/sched.h> #include <linux/sched/mm.h> +#include <linux/sched/coredump.h> #include <linux/rwsem.h> #include <linux/pagemap.h> #include <linux/rmap.h>
mm/memory.c +1 -0
@@ -41,6 +41,7 @@#include <linux/kernel_stat.h> #include <linux/mm.h> #include <linux/sched/mm.h> +#include <linux/sched/coredump.h> #include <linux/hugetlb.h> #include <linux/mman.h> #include <linux/swap.h>
mm/oom_kill.c +1 -0
@@ -23,6 +23,7 @@#include <linux/gfp.h> #include <linux/sched.h> #include <linux/sched/mm.h> +#include <linux/sched/coredump.h> #include <linux/swap.h> #include <linux/timex.h> #include <linux/jiffies.h>
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 20/89 sched/headers, signals: Separate out task_struct::signal and task_struct::sighand types and accessors into <linux/sched/signal.h>
In reply to Ingo Molnartask_struct::signal and task_struct::sighand are pointers, which would normally make it straightforward to not define those types in sched.h.
That is not so, because the types are accompanied by a myriad of APIs (macros and inline functions) that dereference them.
Split the types and the APIs out of sched.h and put them into a new header, <linux/sched/signal.h>.
With this change sched.h does not know about 'struct signal' and 'struct sighand' anymore, trying to put accessors into sched.h as a test fails the following way:
./include/linux/sched.h: In function ‘test_signal_types’:
./include/linux/sched.h:2461:18: error: dereferencing pointer to incomplete type ‘struct signal_struct’
^
This reduces the size and complexity of sched.h significantly.
Update all headers and .c code that relied on getting the signal handling functionality from <linux/sched.h> to include <linux/sched/signal.h>.
The list of affected files was partly generated by grepping for the APIs, and partly by doing coverage build testing, both all[yes|mod|def|no]config builds on 64-bit and 32-bit x86, and an array of cross-architecture builds.
Nevertheless some (trivial) build breakage is still expected related to rare Kconfig combinations and in-flight patches to various kernel code, but most of it should be handled by this patch.
--- arch/alpha/kernel/osf_sys.c | 2 +- arch/alpha/kernel/signal.c | 2 +- arch/alpha/kernel/traps.c | 2 +- arch/alpha/mm/fault.c | 2 +- arch/arc/kernel/traps.c | 2 +- arch/arc/mm/fault.c | 2 +- arch/arm/kernel/ptrace.c | 2 +- arch/arm/kernel/traps.c | 2 +- arch/arm/mm/alignment.c | 2 +- arch/arm/mm/fault.c | 2 +- arch/arm/mm/init.c | 1 + arch/arm/mm/mmap.c | 2 +- arch/arm/vfp/vfpmodule.c | 2 +- arch/arm64/kernel/fpsimd.c | 2 +- arch/arm64/kernel/ptrace.c | 2 +- arch/arm64/kernel/traps.c | 2 +- arch/arm64/mm/fault.c | 2 +- arch/arm64/mm/mmap.c | 2 +- arch/avr32/kernel/traps.c | 2 +- arch/blackfin/kernel/trace.c | 2 +- arch/blackfin/kernel/traps.c | 1 + arch/cris/mm/fault.c | 1 + arch/frv/kernel/traps.c | 2 +- arch/h8300/kernel/ptrace_s.c | 2 +- arch/hexagon/kernel/traps.c | 2 +- arch/hexagon/mm/vm_fault.c | 1 + arch/ia64/kernel/asm-offsets.c | 2 +- arch/ia64/kernel/brl_emu.c | 2 +- arch/ia64/kernel/mca.c | 2 +- arch/ia64/kernel/traps.c | 2 +- arch/ia64/kernel/unaligned.c | 2 +- arch/ia64/mm/fault.c | 2 +- arch/ia64/mm/init.c | 1 + arch/mips/kernel/branch.c | 2 +- arch/mips/kernel/signal_o32.c | 1 + arch/mips/mm/mmap.c | 2 +- arch/mips/sgi-ip22/ip22-berr.c | 2 +- arch/mips/sgi-ip22/ip22-reset.c | 2 +- arch/mn10300/kernel/fpu.c | 2 + arch/openrisc/mm/fault.c | 2 +- arch/parisc/kernel/sys_parisc.c | 1 + arch/parisc/kernel/unaligned.c | 2 +- arch/parisc/math-emu/driver.c | 3 +- arch/powerpc/kvm/book3s_64_vio.c | 1 + arch/powerpc/mm/mmap.c | 2 +- arch/powerpc/mm/mmu_context_iommu.c | 2 +- arch/powerpc/platforms/cell/spufs/fault.c | 2 +- arch/powerpc/xmon/xmon.c | 2 +- arch/s390/kernel/nmi.c | 3 + arch/s390/mm/mmap.c | 1 + arch/score/kernel/traps.c | 2 +- arch/sh/kernel/cpu/sh2a/fpu.c | 2 +- arch/sh/kernel/hw_breakpoint.c | 1 + arch/sh/kernel/traps.c | 2 + arch/sh/math-emu/math.c | 2 +- arch/sh/mm/asids-debugfs.c | 2 + arch/sh/mm/fault.c | 1 + arch/sparc/kernel/sys_sparc_32.c | 2 +- arch/sparc/kernel/sys_sparc_64.c | 2 +- arch/sparc/kernel/unaligned_32.c | 2 +- arch/tile/mm/mmap.c | 2 +- arch/um/drivers/line.c | 3 +- arch/um/kernel/reboot.c | 2 +- arch/um/kernel/skas/mmu.c | 3 +- arch/um/kernel/tlb.c | 3 +- arch/um/kernel/trap.c | 2 +- arch/unicore32/kernel/fpu-ucf64.c | 2 +- arch/unicore32/kernel/traps.c | 1 + arch/unicore32/mm/fault.c | 2 +- arch/x86/entry/vsyscall/vsyscall_64.c | 1 + arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 2 +- arch/x86/kvm/mmu.c | 1 + arch/x86/mm/mmap.c | 2 +- arch/xtensa/kernel/traps.c | 2 +- drivers/android/binder.c | 2 +- drivers/block/drbd/drbd_int.h | 2 +- drivers/char/snsc_event.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 2 +- drivers/gpu/drm/drm_lock.c | 2 + drivers/gpu/drm/ttm/ttm_lock.c | 2 +- drivers/infiniband/core/umem.c | 2 +- drivers/infiniband/hw/hfi1/user_pages.c | 2 +- drivers/infiniband/hw/qib/qib_user_pages.c | 1 + drivers/infiniband/hw/usnic/usnic_uiom.c | 2 +- drivers/isdn/i4l/isdn_tty.c | 1 + drivers/isdn/mISDN/l1oip_core.c | 2 + drivers/md/md.c | 1 + drivers/md/raid1.c | 3 + drivers/md/raid5.c | 2 + drivers/misc/genwqe/card_dev.c | 2 +- drivers/misc/mic/cosm/cosm_scif_server.c | 2 + drivers/misc/mic/cosm_client/cosm_scif_client.c | 2 + drivers/misc/mic/scif/scif_rma.c | 1 + drivers/net/slip/slip.c | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +- drivers/parisc/power.c | 2 +- drivers/ps3/ps3-sys-manager.c | 1 + drivers/s390/char/fs3270.c | 1 + drivers/s390/char/keyboard.c | 2 +- drivers/scsi/bnx2fc/bnx2fc.h | 2 +- drivers/scsi/bnx2i/bnx2i.h | 2 +- drivers/scsi/libiscsi.c | 1 + drivers/staging/android/lowmemorykiller.c | 2 +- drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c | 2 +- drivers/staging/rtl8188eu/include/osdep_service.h | 2 +- drivers/staging/rtl8712/osdep_service.h | 2 +- drivers/staging/rtl8712/rtl8712_cmd.c | 1 + drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 1 + drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.h | 2 +- drivers/target/iscsi/iscsi_target.c | 1 + drivers/target/iscsi/iscsi_target_erl0.c | 2 + drivers/target/iscsi/iscsi_target_login.c | 1 + drivers/target/iscsi/iscsi_target_nego.c | 1 + drivers/tty/pty.c | 2 +- drivers/tty/sysrq.c | 2 +- drivers/tty/tty_io.c | 2 +- drivers/tty/vt/keyboard.c | 2 +- drivers/tty/vt/vt.c | 2 +- drivers/tty/vt/vt_ioctl.c | 2 +- drivers/usb/atm/usbatm.c | 2 +- drivers/usb/core/devio.c | 1 + drivers/usb/gadget/function/f_mass_storage.c | 1 + drivers/vfio/vfio_iommu_spapr_tce.c | 1 + drivers/vfio/vfio_iommu_type1.c | 2 +- drivers/w1/w1_family.c | 2 +- drivers/w1/w1_int.c | 1 + fs/attr.c | 1 + fs/autofs4/waitq.c | 1 + fs/cifs/connect.c | 1 + fs/coda/upcall.c | 2 +- fs/coredump.c | 2 +- fs/exec.c | 1 + fs/file.c | 2 +- fs/fs_struct.c | 2 +- fs/jffs2/background.c | 2 +- fs/lockd/svc.c | 2 +- fs/ncpfs/inode.c | 1 + fs/ncpfs/sock.c | 1 + fs/nfs/callback.c | 1 + fs/nfsd/nfssvc.c | 2 +- fs/proc/fd.c | 2 +- fs/select.c | 4 +- include/linux/oom.h | 2 +- include/linux/ptrace.h | 1 + include/linux/sched.h | 496 +--------------------------- include/linux/sched/signal.h | 505 +++++++++++++++++++++++++++++ include/linux/signalfd.h | 2 +- include/linux/taskstats_kern.h | 2 +- ipc/mqueue.c | 1 + kernel/bpf/syscall.c | 1 + kernel/cpu.c | 2 +- kernel/debug/gdbstub.c | 1 + kernel/debug/kdb/kdb_bt.c | 2 +- kernel/hung_task.c | 2 + kernel/rcu/update.c | 2 +- kernel/sched/sched.h | 1 + kernel/time/itimer.c | 1 + kernel/time/posix-cpu-timers.c | 2 +- kernel/time/tick-sched.c | 2 +- kernel/tracepoint.c | 2 +- kernel/tsacct.c | 2 +- kernel/user_namespace.c | 1 + lib/is_single_threaded.c | 3 +- mm/filemap.c | 1 + mm/kmemleak.c | 2 +- mm/memory-failure.c | 2 +- mm/vmacache.c | 2 +- net/9p/client.c | 2 +- net/atm/common.c | 2 +- net/ax25/af_ax25.c | 2 +- net/caif/caif_socket.c | 2 +- net/core/stream.c | 1 + net/decnet/af_decnet.c | 2 +- net/irda/af_irda.c | 1 + net/netrom/af_netrom.c | 2 +- net/rose/af_rose.c | 2 +- net/sctp/socket.c | 1 + net/sunrpc/svc.c | 2 +- net/unix/af_unix.c | 2 +- net/x25/af_x25.c | 2 +- security/selinux/hooks.c | 2 +- 181 files changed, 706 insertions(+), 614 deletions(-)
arch/alpha/kernel/osf_sys.c +1 -1
@@ -11,7 +11,7 @@*/ #include <linux/errno.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/kernel.h> #include <linux/mm.h> #include <linux/smp.h>
arch/alpha/kernel/signal.c +1 -1
@@ -6,7 +6,7 @@* 1997-11-02 Modified for POSIX.1b signals by Richard Henderson */ -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h>
arch/alpha/kernel/traps.c +1 -1
@@ -10,7 +10,7 @@#include <linux/jiffies.h> #include <linux/mm.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/tty.h> #include <linux/delay.h> #include <linux/module.h>
arch/alpha/mm/fault.c +1 -1
@@ -4,7 +4,7 @@* Copyright (C) 1995 Linus Torvalds */ -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/kernel.h> #include <linux/mm.h> #include <asm/io.h>
arch/arc/kernel/traps.c +1 -1
@@ -13,7 +13,7 @@* Rahul Trivedi: Codito Technologies 2004 */ -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/kdebug.h> #include <linux/uaccess.h> #include <linux/ptrace.h>
arch/arc/mm/fault.c +1 -1
@@ -9,7 +9,7 @@#include <linux/signal.h> #include <linux/interrupt.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/errno.h> #include <linux/ptrace.h> #include <linux/uaccess.h>
arch/arm/kernel/ptrace.c +1 -1
@@ -10,7 +10,7 @@* published by the Free Software Foundation. */ #include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/mm.h> #include <linux/elf.h> #include <linux/smp.h>
arch/arm/kernel/traps.c +1 -1
@@ -24,7 +24,7 @@#include <linux/bug.h> #include <linux/delay.h> #include <linux/init.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/irq.h> #include <linux/atomic.h>
arch/arm/mm/alignment.c +1 -1
@@ -19,7 +19,7 @@#include <linux/proc_fs.h> #include <linux/seq_file.h> #include <linux/init.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/uaccess.h> #include <asm/cp15.h>
arch/arm/mm/fault.c +1 -1
@@ -16,7 +16,7 @@#include <linux/kprobes.h> #include <linux/uaccess.h> #include <linux/page-flags.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/highmem.h> #include <linux/perf_event.h>
arch/arm/mm/init.c +1 -0
@@ -13,6 +13,7 @@#include <linux/init.h> #include <linux/bootmem.h> #include <linux/mman.h> +#include <linux/sched/signal.h> #include <linux/export.h> #include <linux/nodemask.h> #include <linux/initrd.h>
arch/arm/mm/mmap.c +1 -1
@@ -5,7 +5,7 @@#include <linux/mm.h> #include <linux/mman.h> #include <linux/shm.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/io.h> #include <linux/personality.h> #include <linux/random.h>
arch/arm/vfp/vfpmodule.c +1 -1
@@ -15,7 +15,7 @@#include <linux/kernel.h> #include <linux/notifier.h> #include <linux/signal.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/smp.h> #include <linux/init.h> #include <linux/uaccess.h>
arch/arm64/kernel/fpsimd.c +1 -1
@@ -21,7 +21,7 @@#include <linux/cpu_pm.h> #include <linux/kernel.h> #include <linux/init.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/signal.h> #include <linux/hardirq.h>
arch/arm64/kernel/ptrace.c +1 -1
@@ -22,7 +22,7 @@#include <linux/audit.h> #include <linux/compat.h> #include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/mm.h> #include <linux/smp.h> #include <linux/ptrace.h>
arch/arm64/kernel/traps.c +1 -1
@@ -29,7 +29,7 @@#include <linux/kexec.h> #include <linux/delay.h> #include <linux/init.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/syscalls.h> #include <asm/atomic.h>
arch/arm64/mm/fault.c +1 -1
@@ -26,7 +26,7 @@#include <linux/kprobes.h> #include <linux/uaccess.h> #include <linux/page-flags.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/highmem.h> #include <linux/perf_event.h> #include <linux/preempt.h>
arch/arm64/mm/mmap.c +1 -1
@@ -22,7 +22,7 @@#include <linux/mman.h> #include <linux/export.h> #include <linux/shm.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/io.h> #include <linux/personality.h> #include <linux/random.h>
arch/avr32/kernel/traps.c +1 -1
@@ -14,7 +14,7 @@#include <linux/extable.h> #include <linux/module.h> /* print_modules */ #include <linux/notifier.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/uaccess.h> #include <asm/addrspace.h>
arch/blackfin/kernel/trace.c +1 -1
@@ -11,7 +11,7 @@#include <linux/thread_info.h> #include <linux/mm.h> #include <linux/oom.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/uaccess.h> #include <linux/module.h> #include <linux/kallsyms.h>
arch/blackfin/kernel/traps.c +1 -0
@@ -9,6 +9,7 @@#include <linux/bug.h> #include <linux/uaccess.h> #include <linux/module.h> +#include <linux/sched/signal.h> #include <asm/traps.h> #include <asm/cplb.h> #include <asm/blackfin.h>
arch/cris/mm/fault.c +1 -0
@@ -8,6 +8,7 @@#include <linux/interrupt.h> #include <linux/extable.h> #include <linux/wait.h> +#include <linux/sched/signal.h> #include <linux/uaccess.h> #include <arch/system.h>
arch/frv/kernel/traps.c +1 -1
@@ -9,7 +9,7 @@* 2 of the License, or (at your option) any later version. */ -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/signal.h> #include <linux/kernel.h> #include <linux/mm.h>
arch/h8300/kernel/ptrace_s.c +1 -1
@@ -10,7 +10,7 @@*/ #include <linux/linkage.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/errno.h> #include <asm/ptrace.h>
arch/hexagon/kernel/traps.c +1 -1
@@ -19,7 +19,7 @@*/ #include <linux/init.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/module.h> #include <linux/kallsyms.h> #include <linux/kdebug.h>
arch/hexagon/mm/vm_fault.c +1 -0
@@ -28,6 +28,7 @@#include <asm/traps.h> #include <linux/uaccess.h> #include <linux/mm.h> +#include <linux/sched/signal.h> #include <linux/signal.h> #include <linux/module.h> #include <linux/hardirq.h>
arch/ia64/kernel/asm-offsets.c +1 -1
@@ -6,7 +6,7 @@#define ASM_OFFSETS_C 1 -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/pid.h> #include <linux/clocksource.h> #include <linux/kbuild.h>
arch/ia64/kernel/brl_emu.c +1 -1
@@ -8,7 +8,7 @@*/ #include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/uaccess.h> #include <asm/processor.h>
arch/ia64/kernel/mca.c +1 -1
@@ -72,7 +72,7 @@#include <linux/jiffies.h> #include <linux/types.h> #include <linux/init.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/interrupt.h> #include <linux/irq.h> #include <linux/bootmem.h>
arch/ia64/kernel/traps.c +1 -1
@@ -9,7 +9,7 @@#include <linux/kernel.h> #include <linux/init.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/tty.h> #include <linux/vt_kern.h> /* For unblank_screen() */ #include <linux/module.h> /* for EXPORT_SYMBOL */
arch/ia64/kernel/unaligned.c +1 -1
@@ -15,7 +15,7 @@*/ #include <linux/jiffies.h> #include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/tty.h> #include <linux/ratelimit.h>
arch/ia64/mm/fault.c +1 -1
@@ -4,7 +4,7 @@* Copyright (C) 1998-2002 Hewlett-Packard Co * David Mosberger-Tang <[email protected]> */ -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/kernel.h> #include <linux/mm.h> #include <linux/interrupt.h>
arch/ia64/mm/init.c +1 -0
@@ -12,6 +12,7 @@#include <linux/elf.h> #include <linux/memblock.h> #include <linux/mm.h> +#include <linux/sched/signal.h> #include <linux/mmzone.h> #include <linux/module.h> #include <linux/personality.h>
arch/mips/kernel/branch.c +1 -1
@@ -7,7 +7,7 @@* Copyright (C) 2001 MIPS Technologies, Inc. */ #include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/signal.h> #include <linux/export.h> #include <asm/branch.h>
arch/mips/kernel/signal_o32.c +1 -0
@@ -11,6 +11,7 @@#include <linux/compiler.h> #include <linux/errno.h> #include <linux/signal.h> +#include <linux/sched/signal.h> #include <linux/uaccess.h> #include <asm/abi.h>
arch/mips/mm/mmap.c +1 -1
@@ -13,7 +13,7 @@#include <linux/export.h> #include <linux/personality.h> #include <linux/random.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> unsigned long shm_align_mask =PAGE_SIZE -1 ;/* Sane caches */ EXPORT_SYMBOL (shm_align_mask);
arch/mips/sgi-ip22/ip22-berr.c +1 -1
@@ -6,7 +6,7 @@#include <linux/init.h> #include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <asm/addrspace.h> #include <asm/traps.h>
arch/mips/sgi-ip22/ip22-reset.c +1 -1
@@ -11,7 +11,7 @@#include <linux/module.h> #include <linux/interrupt.h> #include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/notifier.h> #include <linux/pm.h> #include <linux/timer.h>
arch/mn10300/kernel/fpu.c +2 -0
@@ -9,6 +9,8 @@* 2 of the Licence, or (at your option) any later version. */ #include <linux/uaccess.h> +#include <linux/sched/signal.h> +#include <asm/fpu.h> #include <asm/elf.h> #include <asm/exceptions.h>
arch/openrisc/mm/fault.c +1 -1
@@ -18,7 +18,7 @@#include <linux/mm.h> #include <linux/interrupt.h> #include <linux/module.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/uaccess.h> #include <asm/siginfo.h>
arch/parisc/kernel/sys_parisc.c +1 -0
@@ -30,6 +30,7 @@#include <linux/linkage.h> #include <linux/mm.h> #include <linux/mman.h> +#include <linux/sched/signal.h> #include <linux/shm.h> #include <linux/syscalls.h> #include <linux/utsname.h>
arch/parisc/kernel/unaligned.c +1 -1
@@ -23,7 +23,7 @@#include <linux/jiffies.h> #include <linux/kernel.h> #include <linux/module.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/signal.h> #include <linux/ratelimit.h> #include <linux/uaccess.h>
arch/parisc/math-emu/driver.c +2 -1
@@ -27,7 +27,8 @@* Copyright (C) 2001 Hewlett-Packard <[email protected]> */ -#include <linux/sched.h> +#include <linux/sched/signal.h> +#include "float.h" #include "math-emu.h"
arch/powerpc/kvm/book3s_64_vio.c +1 -0
@@ -24,6 +24,7 @@#include <linux/highmem.h> #include <linux/gfp.h> #include <linux/slab.h> +#include <linux/sched/signal.h> #include <linux/hugetlb.h> #include <linux/list.h> #include <linux/anon_inodes.h>
arch/powerpc/mm/mmap.c +1 -1
@@ -25,7 +25,7 @@#include <linux/personality.h> #include <linux/mm.h> #include <linux/random.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/elf-randomize.h> #include <linux/security.h> #include <linux/mman.h>
arch/powerpc/mm/mmu_context_iommu.c +1 -1
@@ -10,7 +10,7 @@* */ -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/slab.h> #include <linux/rculist.h> #include <linux/vmalloc.h>
arch/powerpc/platforms/cell/spufs/fault.c +1 -1
@@ -19,7 +19,7 @@* along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/mm.h> #include <asm/spu.h>
arch/powerpc/xmon/xmon.c +1 -1
@@ -13,7 +13,7 @@#include <linux/kernel.h> #include <linux/errno.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/smp.h> #include <linux/mm.h> #include <linux/reboot.h>
arch/s390/kernel/nmi.c +3 -0
@@ -14,6 +14,9 @@#include <linux/hardirq.h> #include <linux/time.h> #include <linux/module.h> +#include <linux/module.h> +#include <linux/sched/signal.h> +#include <asm/lowcore.h> #include <asm/smp.h> #include <asm/stp.h>
arch/s390/mm/mmap.c +1 -0
@@ -26,6 +26,7 @@#include <linux/personality.h> #include <linux/mm.h> #include <linux/mman.h> +#include <linux/sched/signal.h> #include <linux/module.h> #include <linux/random.h> #include <linux/compat.h>
arch/score/kernel/traps.c +1 -1
@@ -24,7 +24,7 @@*/ #include <linux/module.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <asm/cacheflush.h> #include <asm/irq.h>
arch/sh/kernel/cpu/sh2a/fpu.c +1 -1
@@ -9,7 +9,7 @@* * FIXME! These routines can be optimized in big endian case. */ -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/signal.h> #include <asm/processor.h> #include <asm/io.h>
arch/sh/kernel/hw_breakpoint.c +1 -0
@@ -11,6 +11,7 @@*/ #include <linux/init.h> #include <linux/perf_event.h> +#include <linux/sched/signal.h> #include <linux/hw_breakpoint.h> #include <linux/percpu.h> #include <linux/kallsyms.h>
arch/sh/kernel/traps.c +2 -0
@@ -9,6 +9,8 @@#include <linux/kernel.h> #include <linux/kexec.h> #include <linux/module.h> +#include <linux/sched/signal.h> +#include <asm/unwinder.h> #include <asm/traps.h>
arch/sh/math-emu/math.c +1 -1
@@ -10,7 +10,7 @@#include <linux/kernel.h> #include <linux/errno.h> #include <linux/types.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/signal.h> #include <linux/perf_event.h>
arch/sh/mm/asids-debugfs.c +2 -0
@@ -20,6 +20,8 @@#include <linux/debugfs.h> #include <linux/seq_file.h> #include <linux/spinlock.h> +#include <linux/sched/signal.h> +#include <asm/processor.h> #include <asm/mmu_context.h>
arch/sh/mm/fault.c +1 -0
@@ -13,6 +13,7 @@*/ #include <linux/kernel.h> #include <linux/mm.h> +#include <linux/sched/signal.h> #include <linux/hardirq.h> #include <linux/kprobes.h> #include <linux/perf_event.h>
arch/sparc/kernel/sys_sparc_32.c +1 -1
@@ -7,7 +7,7 @@#include <linux/errno.h> #include <linux/types.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/mm.h> #include <linux/fs.h> #include <linux/file.h>
arch/sparc/kernel/sys_sparc_64.c +1 -1
@@ -7,7 +7,7 @@#include <linux/errno.h> #include <linux/types.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/mm.h>
arch/sparc/kernel/unaligned_32.c +1 -1
@@ -8,7 +8,7 @@#include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/mm.h> #include <asm/ptrace.h> #include <asm/processor.h>
arch/tile/mm/mmap.c +1 -1
@@ -17,7 +17,7 @@#include <linux/mm.h> #include <linux/random.h> #include <linux/limits.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/mman.h> #include <linux/compat.h>
arch/um/drivers/line.c +2 -1
@@ -5,8 +5,9 @@#include <linux/irqreturn.h> #include <linux/kd.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/slab.h> +#include "chan.h" #include <irq_kern.h> #include <irq_user.h>
arch/um/kernel/reboot.c +1 -1
@@ -3,7 +3,7 @@* Licensed under the GPL */ -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/spinlock.h> #include <linux/slab.h> #include <linux/oom.h>
arch/um/kernel/skas/mmu.c +2 -1
@@ -5,8 +5,9 @@*/ #include <linux/mm.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/slab.h> +#include <asm/pgalloc.h> #include <asm/pgtable.h> #include <asm/sections.h>
arch/um/kernel/tlb.c +2 -1
@@ -5,7 +5,8 @@#include <linux/mm.h> #include <linux/module.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> +#include <asm/pgtable.h> #include <asm/tlbflush.h> #include <as-layout.h>
arch/um/kernel/trap.c +1 -1
@@ -4,7 +4,7 @@*/ #include <linux/mm.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/hardirq.h> #include <linux/module.h> #include <linux/uaccess.h>
arch/unicore32/kernel/fpu-ucf64.c +1 -1
@@ -13,7 +13,7 @@#include <linux/types.h> #include <linux/kernel.h> #include <linux/signal.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/init.h> #include <asm/fpu-ucf64.h>
arch/unicore32/kernel/traps.c +1 -0
@@ -14,6 +14,7 @@*/ #include <linux/module.h> #include <linux/signal.h> +#include <linux/sched/signal.h> #include <linux/spinlock.h> #include <linux/personality.h> #include <linux/kallsyms.h>
arch/unicore32/mm/fault.c +1 -1
@@ -17,7 +17,7 @@#include <linux/kprobes.h> #include <linux/uaccess.h> #include <linux/page-flags.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/io.h> #include <asm/pgtable.h>
arch/x86/entry/vsyscall/vsyscall_64.c +1 -0
@@ -27,6 +27,7 @@#include <linux/kernel.h> #include <linux/timer.h> +#include <linux/sched/signal.h> #include <linux/syscalls.h> #include <linux/ratelimit.h>
arch/x86/kernel/cpu/intel_rdt_rdtgroup.c +1 -1
@@ -25,7 +25,7 @@#include <linux/sysfs.h> #include <linux/kernfs.h> #include <linux/seq_file.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/slab.h> #include <linux/cpu.h> #include <linux/task_work.h>
arch/x86/kvm/mmu.c +1 -0
@@ -36,6 +36,7 @@#include <linux/compiler.h> #include <linux/srcu.h> #include <linux/slab.h> +#include <linux/sched/signal.h> #include <linux/uaccess.h> #include <asm/page.h>
arch/x86/mm/mmap.c +1 -1
@@ -28,7 +28,7 @@#include <linux/mm.h> #include <linux/random.h> #include <linux/limits.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <asm/elf.h> struct va_alignment __read_mostly va_align = {
arch/xtensa/kernel/traps.c +1 -1
@@ -24,7 +24,7 @@*/ #include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/init.h> #include <linux/module.h> #include <linux/stringify.h>
drivers/android/binder.c +1 -1
@@ -31,7 +31,7 @@#include <linux/poll.h> #include <linux/debugfs.h> #include <linux/rbtree.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/sched/mm.h> #include <linux/seq_file.h> #include <linux/uaccess.h>
drivers/block/drbd/drbd_int.h +1 -1
@@ -30,7 +30,7 @@#include <linux/compiler.h> #include <linux/types.h> #include <linux/list.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/bitops.h> #include <linux/slab.h> #include <linux/ratelimit.h>
drivers/char/snsc_event.c +1 -1
@@ -16,7 +16,7 @@*/ #include <linux/interrupt.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/slab.h> #include <asm/byteorder.h> #include <asm/sn/sn_sal.h>
drivers/gpu/drm/amd/amdkfd/kfd_events.c +1 -1
@@ -23,7 +23,7 @@#include <linux/mm_types.h> #include <linux/slab.h> #include <linux/types.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/uaccess.h> #include <linux/mm.h> #include <linux/mman.h>
drivers/gpu/drm/drm_lock.c +2 -0
@@ -34,6 +34,8 @@*/ #include <linux/export.h> +#include <linux/sched/signal.h> +#include <drm/drmP.h> #include "drm_legacy.h" #include "drm_internal.h"
drivers/gpu/drm/ttm/ttm_lock.c +1 -1
@@ -33,7 +33,7 @@#include <linux/atomic.h> #include <linux/errno.h> #include <linux/wait.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/module.h> #define TTM_WRITE_LOCK_PENDING (1 << 0)
drivers/infiniband/core/umem.c +1 -1
@@ -34,7 +34,7 @@#include <linux/mm.h> #include <linux/dma-mapping.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/sched/mm.h> #include <linux/export.h> #include <linux/hugetlb.h>
drivers/infiniband/hw/hfi1/user_pages.c +1 -1
@@ -46,7 +46,7 @@*/ #include <linux/mm.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/device.h> #include <linux/module.h>
drivers/infiniband/hw/qib/qib_user_pages.c +1 -0
@@ -32,6 +32,7 @@*/ #include <linux/mm.h> +#include <linux/sched/signal.h> #include <linux/device.h> #include "qib.h"
drivers/infiniband/hw/usnic/usnic_uiom.c +1 -1
@@ -34,7 +34,7 @@#include <linux/mm.h> #include <linux/dma-mapping.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/sched/mm.h> #include <linux/hugetlb.h> #include <linux/iommu.h>
drivers/isdn/i4l/isdn_tty.c +1 -0
@@ -15,6 +15,7 @@#include <linux/slab.h> #include <linux/delay.h> #include <linux/mutex.h> +#include <linux/sched/signal.h> #include "isdn_common.h" #include "isdn_tty.h" #ifdef CONFIG_ISDN_AUDIO
drivers/isdn/mISDN/l1oip_core.c +2 -0
@@ -234,6 +234,8 @@#include <linux/workqueue.h> #include <linux/kthread.h> #include <linux/slab.h> +#include <linux/sched/signal.h> +#include <net/sock.h> #include "core.h" #include "l1oip.h"
drivers/md/md.c +1 -0
@@ -44,6 +44,7 @@*/ +#include <linux/sched/signal.h> #include <linux/kthread.h> #include <linux/blkdev.h> #include <linux/badblocks.h>
drivers/md/raid1.c +3 -0
@@ -37,7 +37,10 @@#include <linux/module.h> #include <linux/seq_file.h> #include <linux/ratelimit.h> +#include <linux/sched/signal.h> +#include <trace/events/block.h> +#include "md.h" #include "raid1.h" #include "bitmap.h"
drivers/md/raid5.c +2 -0
@@ -55,6 +55,8 @@#include <linux/ratelimit.h> #include <linux/nodemask.h> #include <linux/flex_array.h> +#include <linux/sched/signal.h> +#include <trace/events/block.h> #include "md.h"
drivers/misc/genwqe/card_dev.c +1 -1
@@ -29,7 +29,7 @@#include <linux/pci.h> #include <linux/string.h> #include <linux/fs.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/wait.h> #include <linux/delay.h> #include <linux/atomic.h>
drivers/misc/mic/cosm/cosm_scif_server.c +2 -0
@@ -19,6 +19,8 @@* */ #include <linux/kthread.h> +#include <linux/sched/signal.h> +#include "cosm_main.h" /*
drivers/misc/mic/cosm_client/cosm_scif_client.c +2 -0
@@ -22,6 +22,8 @@#include <linux/delay.h> #include <linux/reboot.h> #include <linux/kthread.h> +#include <linux/sched/signal.h> +#include "../cosm/cosm_main.h" #define COSM_SCIF_MAX_RETRIES 10
drivers/misc/mic/scif/scif_rma.c +1 -0
@@ -18,6 +18,7 @@#include <linux/dma_remapping.h> #include <linux/pagemap.h> #include <linux/sched/mm.h> +#include <linux/sched/signal.h> #include "scif_main.h" #include "scif_map.h"
drivers/net/slip/slip.c +1 -1
@@ -66,7 +66,7 @@#include <linux/uaccess.h> #include <linux/bitops.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/string.h> #include <linux/mm.h> #include <linux/interrupt.h>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +1 -1
@@ -22,7 +22,7 @@#include <linux/pci_ids.h> #include <linux/netdevice.h> #include <linux/interrupt.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/mmc/sdio.h> #include <linux/mmc/sdio_ids.h> #include <linux/mmc/sdio_func.h>
drivers/parisc/power.c +1 -1
@@ -39,7 +39,7 @@#include <linux/kernel.h> #include <linux/notifier.h> #include <linux/reboot.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/kthread.h> #include <linux/pm.h>
drivers/ps3/ps3-sys-manager.c +1 -0
@@ -22,6 +22,7 @@#include <linux/module.h> #include <linux/workqueue.h> #include <linux/reboot.h> +#include <linux/sched/signal.h> #include <asm/firmware.h> #include <asm/lv1call.h>
drivers/s390/char/fs3270.c +1 -0
@@ -12,6 +12,7 @@#include <linux/init.h> #include <linux/interrupt.h> #include <linux/compat.h> +#include <linux/sched/signal.h> #include <linux/module.h> #include <linux/list.h> #include <linux/slab.h>
drivers/s390/char/keyboard.c +1 -1
@@ -7,7 +7,7 @@*/ #include <linux/module.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/slab.h> #include <linux/sysrq.h>
drivers/scsi/bnx2fc/bnx2fc.h +1 -1
@@ -39,7 +39,7 @@#include <linux/bitops.h> #include <linux/log2.h> #include <linux/interrupt.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/io.h> #include <scsi/scsi.h>
drivers/scsi/bnx2i/bnx2i.h +1 -1
@@ -25,7 +25,7 @@#include <linux/spinlock.h> #include <linux/interrupt.h> #include <linux/delay.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/in.h> #include <linux/kfifo.h> #include <linux/netdevice.h>
drivers/scsi/libiscsi.c +1 -0
@@ -26,6 +26,7 @@#include <linux/delay.h> #include <linux/log2.h> #include <linux/slab.h> +#include <linux/sched/signal.h> #include <linux/module.h> #include <asm/unaligned.h> #include <net/tcp.h>
drivers/staging/android/lowmemorykiller.c +1 -1
@@ -37,7 +37,7 @@#include <linux/kernel.h> #include <linux/mm.h> #include <linux/oom.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/swap.h> #include <linux/rcupdate.h> #include <linux/profile.h>
drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c +1 -1
@@ -34,7 +34,7 @@#include <linux/module.h> #include <linux/kernel.h> #include <linux/fs_struct.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include "../../../include/linux/libcfs/libcfs.h"
drivers/staging/rtl8188eu/include/osdep_service.h +1 -1
@@ -37,7 +37,7 @@#include <linux/io.h> #include <linux/mutex.h> #include <linux/sem.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/etherdevice.h> #include <linux/wireless.h> #include <net/iw_handler.h>
drivers/staging/rtl8712/osdep_service.h +1 -1
@@ -33,7 +33,7 @@#include <linux/interrupt.h> #include <linux/semaphore.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/sem.h> #include <linux/netdevice.h> #include <linux/etherdevice.h>
drivers/staging/rtl8712/rtl8712_cmd.c +1 -0
@@ -32,6 +32,7 @@#include <linux/kernel.h> #include <linux/errno.h> #include <linux/slab.h> +#include <linux/sched/signal.h> #include <linux/module.h> #include <linux/kref.h> #include <linux/netdevice.h>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +1 -0
@@ -34,6 +34,7 @@#include <linux/kernel.h> #include <linux/module.h> +#include <linux/sched/signal.h> #include <linux/types.h> #include <linux/errno.h> #include <linux/cdev.h>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.h +1 -1
@@ -47,7 +47,7 @@#include <linux/types.h> #include <linux/interrupt.h> #include <linux/random.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/ctype.h> #include <linux/uaccess.h> #include <linux/time.h> /* for time_t */
drivers/target/iscsi/iscsi_target.c +1 -0
@@ -24,6 +24,7 @@#include <linux/vmalloc.h> #include <linux/idr.h> #include <linux/delay.h> +#include <linux/sched/signal.h> #include <asm/unaligned.h> #include <net/ipv6.h> #include <scsi/scsi_proto.h>
drivers/target/iscsi/iscsi_target_erl0.c +2 -0
@@ -17,6 +17,8 @@* GNU General Public License for more details. ******************************************************************************/ +#include <linux/sched/signal.h> +#include <scsi/iscsi_proto.h> #include <target/target_core_base.h> #include <target/target_core_fabric.h>
drivers/target/iscsi/iscsi_target_login.c +1 -0
@@ -19,6 +19,7 @@#include <crypto/hash.h> #include <linux/string.h> #include <linux/kthread.h> +#include <linux/sched/signal.h> #include <linux/idr.h> #include <linux/tcp.h> /* TCP_NODELAY */ #include <net/ipv6.h> /* ipv6_addr_v4mapped() */
drivers/target/iscsi/iscsi_target_nego.c +1 -0
@@ -19,6 +19,7 @@#include <linux/ctype.h> #include <linux/kthread.h> #include <linux/slab.h> +#include <linux/sched/signal.h> #include <net/sock.h> #include <scsi/iscsi_proto.h> #include <target/target_core_base.h>
drivers/tty/pty.c +1 -1
@@ -12,7 +12,7 @@#include <linux/tty.h> #include <linux/tty_flip.h> #include <linux/fcntl.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/string.h> #include <linux/major.h> #include <linux/mm.h>
drivers/tty/sysrq.c +1 -1
@@ -14,7 +14,7 @@#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/sched/rt.h> #include <linux/interrupt.h> #include <linux/mm.h>
drivers/tty/tty_io.c +1 -1
@@ -69,7 +69,7 @@#include <linux/errno.h> #include <linux/signal.h> #include <linux/fcntl.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/interrupt.h> #include <linux/tty.h> #include <linux/tty_driver.h>
drivers/tty/vt/keyboard.c +1 -1
@@ -26,7 +26,7 @@#include <linux/consolemap.h> #include <linux/module.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/tty.h> #include <linux/tty_flip.h> #include <linux/mm.h>
drivers/tty/vt/vt.c +1 -1
@@ -72,7 +72,7 @@#include <linux/module.h> #include <linux/types.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/tty.h> #include <linux/tty_flip.h> #include <linux/kernel.h>
drivers/tty/vt/vt_ioctl.c +1 -1
@@ -10,7 +10,7 @@#include <linux/types.h> #include <linux/errno.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/tty.h> #include <linux/timer.h> #include <linux/kernel.h>
drivers/usb/atm/usbatm.c +1 -1
@@ -74,7 +74,7 @@#include <linux/moduleparam.h> #include <linux/netdevice.h> #include <linux/proc_fs.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/signal.h> #include <linux/slab.h> #include <linux/stat.h>
drivers/usb/core/devio.c +1 -0
@@ -36,6 +36,7 @@#include <linux/fs.h> #include <linux/mm.h> +#include <linux/sched/signal.h> #include <linux/slab.h> #include <linux/signal.h> #include <linux/poll.h>
drivers/usb/gadget/function/f_mass_storage.c +1 -0
@@ -207,6 +207,7 @@#include <linux/fs.h> #include <linux/kref.h> #include <linux/kthread.h> +#include <linux/sched/signal.h> #include <linux/limits.h> #include <linux/rwsem.h> #include <linux/slab.h>
drivers/vfio/vfio_iommu_spapr_tce.c +1 -0
@@ -21,6 +21,7 @@#include <linux/vfio.h> #include <linux/vmalloc.h> #include <linux/sched/mm.h> +#include <linux/sched/signal.h> #include <asm/iommu.h> #include <asm/tce.h>
drivers/vfio/vfio_iommu_type1.c +1 -1
@@ -31,7 +31,7 @@#include <linux/module.h> #include <linux/mm.h> #include <linux/rbtree.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/sched/mm.h> #include <linux/slab.h> #include <linux/uaccess.h>
drivers/w1/w1_family.c +1 -1
@@ -21,7 +21,7 @@#include <linux/spinlock.h> #include <linux/list.h> -#include <linux/sched.h> /* schedule_timeout() */ +#include <linux/sched/signal.h> #include <linux/delay.h> #include <linux/export.h>
drivers/w1/w1_int.c +1 -0
@@ -24,6 +24,7 @@#include <linux/delay.h> #include <linux/kthread.h> #include <linux/slab.h> +#include <linux/sched/signal.h> #include <linux/export.h> #include <linux/moduleparam.h>
fs/attr.c +1 -0
@@ -9,6 +9,7 @@#include <linux/time.h> #include <linux/mm.h> #include <linux/string.h> +#include <linux/sched/signal.h> #include <linux/capability.h> #include <linux/fsnotify.h> #include <linux/fcntl.h>
fs/autofs4/waitq.c +1 -0
@@ -10,6 +10,7 @@#include <linux/slab.h> #include <linux/time.h> #include <linux/signal.h> +#include <linux/sched/signal.h> #include <linux/file.h> #include "autofs_i.h"
fs/cifs/connect.c +1 -0
@@ -21,6 +21,7 @@#include <linux/fs.h> #include <linux/net.h> #include <linux/string.h> +#include <linux/sched/signal.h> #include <linux/list.h> #include <linux/wait.h> #include <linux/slab.h>
fs/coda/upcall.c +1 -1
@@ -15,7 +15,7 @@*/ #include <linux/signal.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/types.h> #include <linux/kernel.h> #include <linux/mm.h>
fs/coredump.c +1 -1
@@ -17,6 +17,7 @@#include <linux/binfmts.h> #include <linux/coredump.h> #include <linux/sched/coredump.h> +#include <linux/sched/signal.h> #include <linux/utsname.h> #include <linux/pid_namespace.h> #include <linux/module.h>
@@ -34,7 +35,6 @@#include <linux/pipe_fs_i.h> #include <linux/oom.h> #include <linux/compat.h> -#include <linux/sched.h> #include <linux/fs.h> #include <linux/path.h> #include <linux/timekeeping.h>
fs/exec.c +1 -0
@@ -34,6 +34,7 @@#include <linux/init.h> #include <linux/sched/mm.h> #include <linux/sched/coredump.h> +#include <linux/sched/signal.h> #include <linux/pagemap.h> #include <linux/perf_event.h> #include <linux/highmem.h>
fs/file.c +1 -1
@@ -12,7 +12,7 @@#include <linux/mm.h> #include <linux/mmzone.h> #include <linux/time.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/slab.h> #include <linux/vmalloc.h> #include <linux/file.h>
fs/fs_struct.c +1 -1
@@ -1,5 +1,5 @@#include <linux/export.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/fs.h> #include <linux/path.h> #include <linux/slab.h>
fs/jffs2/background.c +1 -1
@@ -16,7 +16,7 @@#include <linux/jffs2.h> #include <linux/mtd/mtd.h> #include <linux/completion.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/freezer.h> #include <linux/kthread.h> #include "nodelist.h"
fs/lockd/svc.c +1 -1
@@ -17,7 +17,7 @@#include <linux/sysctl.h> #include <linux/moduleparam.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/errno.h> #include <linux/in.h> #include <linux/uio.h>
fs/ncpfs/inode.c +1 -0
@@ -30,6 +30,7 @@#include <linux/vfs.h> #include <linux/mount.h> #include <linux/seq_file.h> +#include <linux/sched/signal.h> #include <linux/namei.h> #include <net/sock.h>
fs/ncpfs/sock.c +1 -0
@@ -16,6 +16,7 @@#include <linux/fcntl.h> #include <linux/stat.h> #include <linux/string.h> +#include <linux/sched/signal.h> #include <linux/uaccess.h> #include <linux/in.h> #include <linux/net.h>
fs/nfs/callback.c +1 -0
@@ -9,6 +9,7 @@#include <linux/completion.h> #include <linux/ip.h> #include <linux/module.h> +#include <linux/sched/signal.h> #include <linux/sunrpc/svc.h> #include <linux/sunrpc/svcsock.h> #include <linux/nfs_fs.h>
fs/nfsd/nfssvc.c +1 -1
@@ -6,7 +6,7 @@* Copyright (C) 1995, 1996, 1997 Olaf Kirch <[email protected]> */ -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/freezer.h> #include <linux/module.h> #include <linux/fs_struct.h>
fs/proc/fd.c +1 -1
@@ -1,4 +1,4 @@ -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/errno.h> #include <linux/dcache.h> #include <linux/path.h>
fs/select.c +2 -2
@@ -15,7 +15,8 @@*/ #include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> +#include <linux/sched/rt.h> #include <linux/syscalls.h> #include <linux/export.h> #include <linux/slab.h>
@@ -26,7 +27,6 @@#include <linux/fs.h> #include <linux/rcupdate.h> #include <linux/hrtimer.h> -#include <linux/sched/rt.h> #include <linux/freezer.h> #include <net/busy_poll.h> #include <linux/vmalloc.h>
include/linux/oom.h +1 -1
@@ -2,7 +2,7 @@#define __INCLUDE_LINUX_OOM_H -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/types.h> #include <linux/nodemask.h> #include <uapi/linux/oom.h>
include/linux/ptrace.h +1 -0
@@ -3,6 +3,7 @@#include <linux/compiler.h> /* For unlikely. */ #include <linux/sched.h> /* For struct task_struct. */ +#include <linux/sched/signal.h> /* For send_sig(), same_thread_group(), etc. */ #include <linux/err.h> /* for IS_ERR_VALUE */ #include <linux/bug.h> /* For BUG_ON. */ #include <linux/pid_namespace.h> /* For task_active_pid_ns. */
include/linux/sched.h +3 -493
548 lines not on this page · raw message
include/linux/sched/signal.h new file +505 -0
505 lines not on this page · raw message
include/linux/signalfd.h +1 -1
@@ -8,7 +8,7 @@#define _LINUX_SIGNALFD_H#include <uapi/linux/signalfd.h> - +#include <linux/sched/signal.h> #ifdef CONFIG_SIGNALFD
include/linux/taskstats_kern.h +1 -1
@@ -8,7 +8,7 @@#define _LINUX_TASKSTATS_KERN_H#include <linux/taskstats.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/slab.h> #ifdef CONFIG_TASKSTATS
ipc/mqueue.c +1 -0
@@ -36,6 +36,7 @@#include <linux/user_namespace.h> #include <linux/slab.h> #include <linux/sched/wake_q.h> +#include <linux/sched/signal.h> #include <net/sock.h> #include "util.h"
kernel/bpf/syscall.c +1 -0
@@ -12,6 +12,7 @@#include <linux/bpf.h> #include <linux/syscalls.h> #include <linux/slab.h> +#include <linux/sched/signal.h> #include <linux/vmalloc.h> #include <linux/mmzone.h> #include <linux/anon_inodes.h>
kernel/cpu.c +1 -1
@@ -7,7 +7,7 @@#include <linux/smp.h> #include <linux/init.h> #include <linux/notifier.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/unistd.h> #include <linux/cpu.h> #include <linux/oom.h>
kernel/debug/gdbstub.c +1 -0
@@ -29,6 +29,7 @@*/ #include <linux/kernel.h> +#include <linux/sched/signal.h> #include <linux/kgdb.h> #include <linux/kdb.h> #include <linux/serial_core.h>
kernel/debug/kdb/kdb_bt.c +1 -1
@@ -12,7 +12,7 @@#include <linux/ctype.h> #include <linux/string.h> #include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/kdb.h> #include <linux/nmi.h> #include "kdb_private.h"
kernel/hung_task.c +2 -0
@@ -16,6 +16,8 @@#include <linux/export.h> #include <linux/sysctl.h> #include <linux/utsname.h> +#include <linux/sched/signal.h> +#include <trace/events/sched.h> /*
kernel/rcu/update.c +1 -1
@@ -36,7 +36,7 @@#include <linux/spinlock.h> #include <linux/smp.h> #include <linux/interrupt.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/atomic.h> #include <linux/bitops.h> #include <linux/percpu.h>
kernel/sched/sched.h +1 -0
@@ -5,6 +5,7 @@#include <linux/sched/rt.h> #include <linux/sched/clock.h> #include <linux/sched/wake_q.h> +#include <linux/sched/signal.h> #include <linux/sched/mm.h> #include <linux/u64_stats_sync.h> #include <linux/sched/deadline.h>
kernel/time/itimer.c +1 -0
@@ -10,6 +10,7 @@#include <linux/interrupt.h> #include <linux/syscalls.h> #include <linux/time.h> +#include <linux/sched/signal.h> #include <linux/posix-timers.h> #include <linux/hrtimer.h> #include <trace/events/timer.h>
kernel/time/posix-cpu-timers.c +1 -1
@@ -2,7 +2,7 @@* Implement CPU time clocks for the POSIX clock interface. */ -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/posix-timers.h> #include <linux/errno.h> #include <linux/math64.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/signal.h> #include <linux/sched/clock.h> #include <linux/module.h> #include <linux/irq_work.h>
kernel/tracepoint.c +1 -1
@@ -24,7 +24,7 @@#include <linux/tracepoint.h> #include <linux/err.h> #include <linux/slab.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/static_key.h> extern struct tracepoint *const __start___tracepoints_ptrs[];
kernel/tsacct.c +1 -1
@@ -17,7 +17,7 @@*/ #include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/sched/mm.h> #include <linux/tsacct_kern.h> #include <linux/acct.h>
kernel/user_namespace.c +1 -0
@@ -8,6 +8,7 @@#include <linux/export.h> #include <linux/nsproxy.h> #include <linux/slab.h> +#include <linux/sched/signal.h> #include <linux/user_namespace.h> #include <linux/proc_ns.h> #include <linux/highuid.h>
lib/is_single_threaded.c +1 -2
@@ -9,8 +9,7 @@* as published by the Free Software Foundation; either version * 2 of the Licence, or (at your option) any later version. */ - -#include <linux/sched.h> +#include <linux/sched/signal.h> /* * Returns true if the task does not share ->mm with another thread/process.
mm/filemap.c +1 -0
@@ -13,6 +13,7 @@#include <linux/compiler.h> #include <linux/dax.h> #include <linux/fs.h> +#include <linux/sched/signal.h> #include <linux/uaccess.h> #include <linux/capability.h> #include <linux/kernel_stat.h>
mm/kmemleak.c +1 -1
@@ -73,7 +73,7 @@#include <linux/init.h> #include <linux/kernel.h> #include <linux/list.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/jiffies.h> #include <linux/delay.h> #include <linux/export.h>
mm/memory-failure.c +1 -1
@@ -40,7 +40,7 @@#include <linux/mm.h> #include <linux/page-flags.h> #include <linux/kernel-page-flags.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/ksm.h> #include <linux/rmap.h> #include <linux/export.h>
mm/vmacache.c +1 -1
@@ -1,7 +1,7 @@/* * Copyright (C) 2014 Davidlohr Bueso. */ -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/mm.h> #include <linux/vmacache.h>
net/9p/client.c +1 -1
@@ -32,7 +32,7 @@#include <linux/idr.h> #include <linux/mutex.h> #include <linux/slab.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/uaccess.h> #include <linux/uio.h> #include <net/9p/9p.h>
net/atm/common.c +1 -1
@@ -13,7 +13,7 @@#include <linux/errno.h> /* error codes */ #include <linux/capability.h> #include <linux/mm.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/time.h> /* struct timeval */ #include <linux/skbuff.h> #include <linux/bitops.h>
net/ax25/af_ax25.c +1 -1
@@ -20,7 +20,7 @@#include <linux/socket.h> #include <linux/in.h> #include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/timer.h> #include <linux/string.h> #include <linux/sockios.h>
net/caif/caif_socket.c +1 -1
@@ -9,7 +9,7 @@#include <linux/fs.h> #include <linux/init.h> #include <linux/module.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/spinlock.h> #include <linux/mutex.h> #include <linux/list.h>
net/core/stream.c +1 -0
@@ -13,6 +13,7 @@*/ #include <linux/module.h> +#include <linux/sched/signal.h> #include <linux/net.h> #include <linux/signal.h> #include <linux/tcp.h>
net/decnet/af_decnet.c +1 -1
@@ -106,7 +106,7 @@ Version 0.0.6 2.1.110 07-aug-98 Eduardo Marcelo Serrat#include <linux/socket.h> #include <linux/in.h> #include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/timer.h> #include <linux/string.h> #include <linux/sockios.h>
net/irda/af_irda.c +1 -0
@@ -46,6 +46,7 @@#include <linux/socket.h> #include <linux/sockios.h> #include <linux/slab.h> +#include <linux/sched/signal.h> #include <linux/init.h> #include <linux/net.h> #include <linux/irda.h>
net/netrom/af_netrom.c +1 -1
@@ -17,7 +17,7 @@#include <linux/in.h> #include <linux/slab.h> #include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/timer.h> #include <linux/string.h> #include <linux/sockios.h>
net/rose/af_rose.c +1 -1
@@ -20,7 +20,7 @@#include <linux/in.h> #include <linux/slab.h> #include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/spinlock.h> #include <linux/timer.h> #include <linux/string.h>
net/sctp/socket.c +1 -0
@@ -57,6 +57,7 @@#include <linux/kernel.h> #include <linux/wait.h> #include <linux/time.h> +#include <linux/sched/signal.h> #include <linux/ip.h> #include <linux/capability.h> #include <linux/fcntl.h>
net/sunrpc/svc.c +1 -1
@@ -11,7 +11,7 @@*/ #include <linux/linkage.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/errno.h> #include <linux/net.h> #include <linux/in.h>
net/unix/af_unix.c +1 -1
@@ -85,7 +85,7 @@#include <linux/module.h> #include <linux/kernel.h> #include <linux/signal.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/errno.h> #include <linux/string.h> #include <linux/stat.h>
net/x25/af_x25.c +1 -1
@@ -41,7 +41,7 @@#include <linux/capability.h> #include <linux/errno.h> #include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/timer.h> #include <linux/string.h> #include <linux/net.h>
security/selinux/hooks.c +1 -1
@@ -28,7 +28,7 @@#include <linux/kernel.h> #include <linux/tracehook.h> #include <linux/errno.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> #include <linux/lsm_hooks.h> #include <linux/xattr.h> #include <linux/capability.h>
Signature · 1 line
2.7.4
Re: [PATCH 20/89] sched/headers, signals: Separate out task_struct::signal and task_struct::sighand types and accessors into <linux/sched/signal.h>
Quoted 7 lines · Ingo Molnar
task_struct::signalandtask_struct::sighandare pointers, which would normally make it straightforward to not define those types insched.h.That is not so, because the types are accompanied by a myriad of APIs (macros and inline functions) that dereference them.
Split the types and the APIs out of
sched.hand put them into a new header, <linux/sched/signal.h>.
So I still really like the split, but I absolutely *hate* slogging though these patches. I think the patches are really badly split up.
The actual *meat* of the patch (the part you want to look at) ends up being almost entirely hidden by the hundreds of lines of diff that are just this part:
Quoted 14 lines
arch/alpha/kernel/osf_sys.c | 2 +- arch/alpha/kernel/signal.c | 2 +- arch/alpha/kernel/traps.c | 2 +- arch/alpha/mm/fault.c | 2 +- arch/arc/kernel/traps.c | 2 +- arch/arc/mm/fault.c | 2 +- arch/arm/kernel/ptrace.c | 2 +- arch/arm/kernel/traps.c | 2 +- arch/arm/mm/alignment.c | 2 +- arch/arm/mm/fault.c | 2 +- arch/arm/mm/init.c | 1 + arch/arm/mm/mmap.c | 2 +- arch/arm/vfp/vfpmodule.c | 2 +- arch/arm64/kernel/fpsimd.c | 2 +-
Quoted 8 lines
arch/arm64/kernel/ptrace.c | 2 +- arch/arm64/kernel/traps.c | 2 +- arch/arm64/mm/fault.c | 2 +- arch/arm64/mm/mmap.c | 2 +- arch/avr32/kernel/traps.c | 2 +- arch/blackfin/kernel/trace.c | 2 +- arch/blackfin/kernel/traps.c | 1 + arch/cris/mm/fault.c | 1 +
... goes on forever - lots of stupid uninteresting one-liner patches ..
and I really think this whole split-up needs to be done differently.
What I would suggest is that it's done in two phases:
(a) split up the code into a new header file, with absolutely _zero_
semantic changes, because you leave a simple
#include <linux/sched/new.h>
in the <linux/sched.h> file.
(b) a separate patch that just removes that one line from
<linux/sched.h> and then has all this other "one-line noise" stuff.
That way, in (a) it's really easy to see that you only moved things (and the patch won't have all that noise in it), and then in (b) it's trivial to see that all you do is fix up the #include things, because it will all _just_ be the one-line noise.
This mix of noise and real changes is just very frustrating to look through. Nobody sane will do it - you inevitably start skimming, because the one-liner noise that is only relevant for the "it still builds correctly on all configs and architectures" is simply not human-readable.
So this request is separate from the whole "please don't make semantic changes at the same time" issue.
I realize that you want to do the header file fixups at the same time (in order to find out whether you missed some issue that makes the split not useful), but from a maintenance angle and a "encourage people to actually read through the patches" angle this patch-series is just horrible.
Linus
Ingo Molnar
maintainerRe: [PATCH 20/89] sched/headers, signals: Separate out task_struct::signal and task_struct::sighand types and accessors into <linux/sched/signal.h>
Quoted 7 lines · Linus Torvalds
Quoted 6 lines · Ingo Molnar
task_struct::signalandtask_struct::sighandare pointers, which would normally make it straightforward to not define those types insched.h.That is not so, because the types are accompanied by a myriad of APIs (macros and inline functions) that dereference them.
Quoted 8 lines
Quoted 1 line
Split the types and the APIs out of
sched.hand put them into a new header, <linux/sched/signal.h>.So I still really like the split, but I absolutely *hate* slogging though these patches. I think the patches are really badly split up.
The actual *meat* of the patch (the part you want to look at) ends up being almost entirely hidden by the hundreds of lines of diff that are just this part:
Yeah, in some cases I solved this problem by doing a 'preparatory patch', such as:
[PATCH 81/89] sched/headers: Remove spurious <linux/sched.h> inclusion dependencies
which are easy to review and which are then followed by the 'meat patches', such as:
[PATCH 85/89] hrtimer: Remove the <linux/wait.h> include from <linux/hrtimer.h> [PATCH 86/89] sched/headers: Remove the <linux/topology.h> include from <linux/sched.h>
I considered doing this for every patch but decided against it due to the high patch count...
I was in a bit of a catch-22: the only way to demonstrate the utility of so many intrusive changes was to achieve some true reduction in generated code size ... :-/
Will do some more splitting up, in the fashion you suggest, I fully agree with it:
Quoted 7 lines
and I really think this whole split-up needs to be done differently.
What I would suggest is that it's done in two phases:
(a) split up the code into a new header file, with absolutely _zero_
semantic changes, because you leave a simple
Quoted 6 lines
#include <
linux/sched/new.h>in the <
linux/sched.h> file.(b) a separate patch that just removes that one line from
<linux/sched.h> and then has all this other "one-line noise" stuff.
Yeah.
BTW., most of the real work was in identifying and generating that "noise" - but to reviewers it's obviously the least interesting bits.
Also note that beyond the header splitup the "noise" is actually what improves kernel code the most all around, as changes like this:
kernel/utsname_sysctl.c +1 -0
@@ -14,6 +14,7 @@#include <linux/utsname.h> #include <linux/sysctl.h> #include <linux/wait.h> +#include <linux/rwsem.h> #ifdef CONFIG_PROC_SYSCTL
... make implicit header dependencies more explicit and decrease our existing spaghetti.
But the repetitive header dependency fixes/extensions should be clearly identified as such and shouldn't mix in other, more complex changes - I'll try to come up with a patch title pattern as well to make it easier to skip through these during review.
How about something like this:
[PATCH] sched/headers: Propagate new header dependencies after changes to <linux/sched/task.h> [PATCH] sched/headers: Propagate new header dependencies after changes to <linux/sched/stat.h> [PATCH] sched/headers: Propagate new header dependencies after changes to <linux/sched/signal.h> [PATCH] sched/headers: Propagate new header dependencies before changes to <linux/sched.h> [PATCH] sched/headers: Propagate new header dependencies before changes to <linux/timer.h>
....
That way during review you can skip over these without much effort, you only have to check that these patches confirm to the expected 'trivial one line noise' pattern and don't do anything else.
The postfix style title will also make these stand out visually in the series.
Quoted 10 lines
That way, in (a) it's really easy to see that you only moved things (and the patch won't have all that noise in it), and then in (b) it's trivial to see that all you do is fix up the #include things, because it will all _just_ be the one-line noise.
This mix of noise and real changes is just very frustrating to look through. Nobody sane will do it - you inevitably start skimming, because the one-liner noise that is only relevant for the "it still builds correctly on all configs and architectures" is simply not human-readable.
Quoted 7 lines
So this request is separate from the whole "please don't make semantic changes at the same time" issue.
I realize that you want to do the header file fixups at the same time (in order to find out whether you missed some issue that makes the split not useful), but from a maintenance angle and a "encourage people to actually read through the patches" angle this patch-series is just horrible.
No, your request is entirely fair, and I considered such techniques and did it in a few cases, and only decided against it to keep the patch count of the series down. Doing this will increase the patch count by at least 50%.
Will post them in 4 groups of 40 patches each or so - would that work for you?
Thanks,
Ingo
Re: [PATCH 20/89] sched/headers, signals: Separate out task_struct::signal and task_struct::sighand types and accessors into <linux/sched/signal.h>
Quoted 7 lines · Ingo Molnar
BTW., most of the real work was in identifying and generating that "noise" - but to reviewers it's obviously the least interesting bits.
Also note that beyond the header splitup the "noise" is actually what improves kernel code the most all around
Oh, absolutely agreed. The "noise" is obviously the most important part and the most challenging to actually generate (although maybe some automation tool could do a lot of this in a perfect world).
But the noise is also the one where verification is pretty much purely about "does it still compile", so from a human angle, once the noise has been generated, it's not actually all that interesting.
It's kind of like being NP complete: verification of the noise is "trivial" and not all that interesting - once the solution has been find.
Quoted 1 line
Will post them in 4 groups of 40 patches each or so - would that work for you?
I suspect that will be a lot easier.to look at (with at least one series basically being "there's no point in a human even looking at it, other than to verify that it's purely #include changes").
It would be good to make sure it also ends up bisecting nicely, because *if* some problem happens, it would be nice if the bisect then clearly points to either "oh, some mistake must have happened during code movement" vs "ooh, some really subtle issue with a missed include causing some odd fallback code".
Because we *do* end up having code in C files that does things like
#ifndef ARCH_HAS_XYZ
static inline void my_generic_xyz_implementation(...)
...
#endifso you can end up in the situation that if some specific header file wasn't included correctly, the code will still work, but now it will use the generic definition rather than the specific one it was supposed to use.
So these re-organizations do have the potential to cause odd "silent" breakage. Most breakage by far should presumably be of the type "it doesn't compile and it's very obvious that the header file movement missed something", but we *could* have that kind of subtle "it compiles, and _almost_ even works, but has a cornercase that is broken" that could be fingered by a bisect.
That's when a good split of patches would be really nice to have too, where a patch does either code movement or does header file organization movement, but not both.
So it's not _just_ about actually looking at the patches and trying to make sense of them.
Linus
Ingo Molnar
maintainerRe: [PATCH 20/89] sched/headers, signals: Separate out task_struct::signal and task_struct::sighand types and accessors into <linux/sched/signal.h>
Quoted 6 lines · Linus Torvalds
Quoted 5 lines · Ingo Molnar
BTW., most of the real work was in identifying and generating that "noise" - but to reviewers it's obviously the least interesting bits.
Quoted 6 lines
Quoted 2 lines
Also note that beyond the header splitup the "noise" is actually what improves kernel code the most all around
Oh, absolutely agreed. The "noise" is obviously the most important part and the most challenging to actually generate (although maybe some automation tool could do a lot of this in a perfect world).
BTW., I used half-automation: an (imperfect...) script to recursively follow header dependencies to identify the places which I then changed manually, and a lot of testing to identify the cases the script missed (or where I made a manual mistake).
I started out with a testing based approach alone, but that did not scale very well and I had the feeling that it did not converge fast enough either to lead to a palatable end result.
Didn't want to invest too much into tooling, as I'd expect this to be a one-off effort for one of the worst header dependency problems we have in the kernel today. Fortunately most of our other headers are in a much better shape!
Quoted 3 lines
But the noise is also the one where verification is pretty much purely about "does it still compile", so from a human angle, once the noise has been generated, it's not actually all that interesting.
Yeah, and the repetitive diffs over hundreds of files are actively hindering review.
Quoted 10 lines
It's kind of like being NP complete: verification of the noise is "trivial" and not all that interesting - once the solution has been find.
Quoted 1 line
Will post them in 4 groups of 40 patches each or so - would that work for you?
I suspect that will be a lot easier.to look at (with at least one series basically being "there's no point in a human even looking at it, other than to verify that it's purely #include changes").
Quoted 5 lines
It would be good to make sure it also ends up bisecting nicely, because *if* some problem happens, it would be nice if the bisect then clearly points to either "oh, some mistake must have happened during code movement" vs "ooh, some really subtle issue with a missed include causing some odd fallback code".
Yeah, so I tested it intensively as I was developing it, so barring merge/backmerge/conflict-resolution artifacts that happen during rebase (and they did happen ...) there shouldn't be any conceptual bisectability hickups in the lineup. It wasn't a 'break it and make it work at the end of the series' development flow, it was a 'make it work at every commit' approach.
I'll do some bisection validation on the final result to make sure bisectability did not bitrot during all the restructuring. Problem is, even on a beefy 60-core server with 256 GB RAM a full cross-build test runs for half an hour just for defconfigs - so a 150-patch series bisectability test would run for over 3 days
...
What I can do is some more careful manual review plus the re-testing of a couple of random points in the middle of the series - and of course the testing of the final result. This should make it reasonably certain that the good bisectability that was validated during earlier versions of the patch-set has a good chance of being present in the final series as well.
Quoted 11 lines
Because we *do* end up having code in C files that does things like
#ifndef ARCH_HAS_XYZ static inline void my_generic_xyz_implementation(...) ... #endifso you can end up in the situation that if some specific header file wasn't included correctly, the code will still work, but now it will use the generic definition rather than the specific one it was supposed to use.
Yeah, indeed.
Quoted 7 lines
So these re-organizations do have the potential to cause odd "silent" breakage. Most breakage by far should presumably be of the type "it doesn't compile and it's very obvious that the header file movement missed something", but we *could* have that kind of subtle "it compiles, and _almost_ even works, but has a cornercase that is broken" that could be fingered by a bisect.
Quoted 6 lines
That's when a good split of patches would be really nice to have too, where a patch does either code movement or does header file organization movement, but not both.
So it's not _just_ about actually looking at the patches and trying to make sense of them.
Ok, I'm sold on this! This bisectability argument makes me feel much better about the resulting 150+ patch-count.
Thanks,
Ingo
Ingo Molnar
maintainerPATCH 21/89 sched/headers: Remove unused 'task_can_switch_user()' prototype
In reply to Ingo MolnarThe function does not exist anymore.
--- include/linux/sched.h | 3 --- 1 file changed, 3 deletions(-)
include/linux/sched.h +0 -3
@@ -2384,9 +2384,6 @@ extern long sched_getaffinity(pid_t pid, struct cpumask *mask);extern struct task_group root_task_group;#endif /* CONFIG_CGROUP_SCHED */ -extern int task_can_switch_user (struct user_struct *up, -struct task_struct *tsk); -#ifdef CONFIG_TASK_XACCT static inline void add_rchar (struct task_struct *tsk,ssize_t amt) {
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 22/89 sched/headers: Move 'struct user_struct' definition and APIs to the new <linux/sched/user.h> header
In reply to Ingo Molnar'struct user_struct' was added to sched.h historically, but it's actually entirely independent of task_struct and of scheduler details, so move it to its own header.
Fix up .c files using those facilities.
--- block/ioprio.c | 1 + include/linux/cred.h | 2 +- include/linux/sched.h | 57 --------------------------------------------------------- include/linux/sched/user.h | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ipc/mqueue.c | 1 + kernel/fork.c | 1 + kernel/signal.c | 1 + kernel/user.c | 1 + mm/mlock.c | 1 + net/core/scm.c | 1 + security/keys/process_keys.c | 1 + 11 files changed, 73 insertions(+), 58 deletions(-)
block/ioprio.c +1 -0
@@ -25,6 +25,7 @@#include <linux/ioprio.h> #include <linux/blkdev.h> #include <linux/capability.h> +#include <linux/sched/user.h> #include <linux/syscalls.h> #include <linux/security.h> #include <linux/pid_namespace.h>
include/linux/cred.h +1 -1
@@ -18,8 +18,8 @@#include <linux/selinux.h> #include <linux/atomic.h> #include <linux/uidgid.h> +#include <linux/sched/user.h> -struct user_struct ;struct cred ;struct inode ;
include/linux/sched.h +0 -57
75 lines not on this page · raw message
include/linux/sched/user.h new file +64 -0
64 lines not on this page · raw message
ipc/mqueue.c +1 -0
@@ -37,6 +37,7 @@#include <linux/slab.h> #include <linux/sched/wake_q.h> #include <linux/sched/signal.h> +#include <linux/sched/user.h> #include <net/sock.h> #include "util.h"
kernel/fork.c +1 -0
@@ -15,6 +15,7 @@#include <linux/sched/autogroup.h> #include <linux/sched/mm.h> #include <linux/sched/coredump.h> +#include <linux/sched/user.h> #include <linux/init.h> #include <linux/unistd.h> #include <linux/module.h>
kernel/signal.c +1 -0
@@ -14,6 +14,7 @@#include <linux/export.h> #include <linux/init.h> #include <linux/sched.h> +#include <linux/sched/user.h> #include <linux/fs.h> #include <linux/tty.h> #include <linux/binfmts.h>
kernel/user.c +1 -0
@@ -13,6 +13,7 @@#include <linux/slab.h> #include <linux/bitops.h> #include <linux/key.h> +#include <linux/sched/user.h> #include <linux/interrupt.h> #include <linux/export.h> #include <linux/user_namespace.h>
mm/mlock.c +1 -0
@@ -8,6 +8,7 @@#include <linux/capability.h> #include <linux/mman.h> #include <linux/mm.h> +#include <linux/sched/user.h> #include <linux/swap.h> #include <linux/swapops.h> #include <linux/pagemap.h>
net/core/scm.c +1 -0
@@ -14,6 +14,7 @@#include <linux/capability.h> #include <linux/errno.h> #include <linux/sched.h> +#include <linux/sched/user.h> #include <linux/mm.h> #include <linux/kernel.h> #include <linux/stat.h>
security/keys/process_keys.c +1 -0
@@ -12,6 +12,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/sched.h> +#include <linux/sched/user.h> #include <linux/keyctl.h> #include <linux/fs.h> #include <linux/err.h>
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 23/89 sched/headers, softlockup: Move softlockup detector watchdog methods to <linux/nmi.h>
In reply to Ingo MolnarThese methods don't belong into <linux/sched.h>, they are neither directly related to task_struct or are scheduler functionality.
Put them next to the other watchdog methods in <linux/nmi.h>.
( Arguably that header's name is a misnomer, and this patch makes it
more so - but it should be renamed in another patch. )
--- arch/ia64/kernel/time.c | 1 + arch/ia64/kernel/uncached.c | 1 + arch/powerpc/kernel/swsusp_64.c | 1 + arch/x86/kernel/pvclock.c | 2 ++ arch/x86/xen/smp.c | 1 + drivers/ide/ide-taskfile.c | 1 + drivers/mtd/nand/nand_base.c | 1 + drivers/video/fbdev/nvidia/nv_accel.c | 2 ++ include/linux/nmi.h | 37 +++++++++++++++++++++++++++++++++++++ include/linux/sched.h | 37 ------------------------------------- init/main.c | 1 + kernel/debug/debug_core.c | 1 + kernel/power/hibernate.c | 1 + kernel/power/snapshot.c | 1 + kernel/sched/clock.c | 1 + kernel/time/tick-sched.c | 1 + kernel/time/timekeeping.c | 1 + 17 files changed, 54 insertions(+), 37 deletions(-)
arch/ia64/kernel/time.c +1 -0
@@ -16,6 +16,7 @@#include <linux/profile.h> #include <linux/sched.h> #include <linux/time.h> +#include <linux/nmi.h> #include <linux/interrupt.h> #include <linux/efi.h> #include <linux/timex.h>
arch/ia64/kernel/uncached.c +1 -0
@@ -19,6 +19,7 @@#include <linux/errno.h> #include <linux/string.h> #include <linux/efi.h> +#include <linux/nmi.h> #include <linux/genalloc.h> #include <linux/gfp.h> #include <asm/page.h>
arch/powerpc/kernel/swsusp_64.c +1 -0
@@ -10,6 +10,7 @@#include <linux/irq.h> #include <linux/sched.h> #include <linux/interrupt.h> +#include <linux/nmi.h> void do_after_copyback (void ) {
arch/x86/kernel/pvclock.c +2 -0
@@ -21,6 +21,8 @@#include <linux/sched.h> #include <linux/gfp.h> #include <linux/bootmem.h> +#include <linux/nmi.h> +#include <asm/fixmap.h> #include <asm/pvclock.h>
arch/x86/xen/smp.c +1 -0
@@ -18,6 +18,7 @@#include <linux/smp.h> #include <linux/irq_work.h> #include <linux/tick.h> +#include <linux/nmi.h> #include <asm/paravirt.h> #include <asm/desc.h>
drivers/ide/ide-taskfile.c +1 -0
@@ -19,6 +19,7 @@#include <linux/delay.h> #include <linux/hdreg.h> #include <linux/ide.h> +#include <linux/nmi.h> #include <linux/scatterlist.h> #include <linux/uaccess.h>
drivers/mtd/nand/nand_base.c +1 -0
@@ -36,6 +36,7 @@#include <linux/sched.h> #include <linux/slab.h> #include <linux/mm.h> +#include <linux/nmi.h> #include <linux/types.h> #include <linux/mtd/mtd.h> #include <linux/mtd/nand.h>
drivers/video/fbdev/nvidia/nv_accel.c +2 -0
@@ -48,6 +48,8 @@*/ #include <linux/fb.h> +#include <linux/nmi.h> +#include "nv_type.h" #include "nv_proto.h" #include "nv_dma.h"
include/linux/nmi.h +37 -0
@@ -7,6 +7,43 @@#include <linux/sched.h> #include <asm/irq.h> +#ifdef CONFIG_LOCKUP_DETECTOR +extern void touch_softlockup_watchdog_sched (void ); +extern void touch_softlockup_watchdog (void ); +extern void touch_softlockup_watchdog_sync (void ); +extern void touch_all_softlockup_watchdogs (void ); +extern int proc_dowatchdog_thresh (struct ctl_table *table,int write, +void __user *buffer, +size_t *lenp,loff_t *ppos); +extern unsigned int softlockup_panic; +extern unsigned int hardlockup_panic; +void lockup_detector_init (void ); +#else +static inline void touch_softlockup_watchdog_sched (void ) +{ +} +static inline void touch_softlockup_watchdog (void ) +{ +} +static inline void touch_softlockup_watchdog_sync (void ) +{ +} +static inline void touch_all_softlockup_watchdogs (void ) +{ +} +static inline void lockup_detector_init (void ) +{ +} +#endif + +#ifdef CONFIG_DETECT_HUNG_TASK +void reset_hung_task_detector (void ); +#else +static inline void reset_hung_task_detector (void ) +{ +} +#endif +/* * The run state of the lockup detectors is controlled by the content of the * 'watchdog_enabled' variable. Each lockup detector has its dedicated bit -
include/linux/sched.h +0 -37
@@ -290,43 +290,6 @@ extern int sched_cpu_dying(unsigned int cpu);extern void sched_show_task (struct task_struct *p); -#ifdef CONFIG_LOCKUP_DETECTOR -extern void touch_softlockup_watchdog_sched (void ); -extern void touch_softlockup_watchdog (void ); -extern void touch_softlockup_watchdog_sync (void ); -extern void touch_all_softlockup_watchdogs (void ); -extern int proc_dowatchdog_thresh (struct ctl_table *table,int write, -void __user *buffer, -size_t *lenp,loff_t *ppos); -extern unsigned int softlockup_panic; -extern unsigned int hardlockup_panic; -void lockup_detector_init (void ); -#else -static inline void touch_softlockup_watchdog_sched (void ) -{ -} -static inline void touch_softlockup_watchdog (void ) -{ -} -static inline void touch_softlockup_watchdog_sync (void ) -{ -} -static inline void touch_all_softlockup_watchdogs (void ) -{ -} -static inline void lockup_detector_init (void ) -{ -} -#endif - -#ifdef CONFIG_DETECT_HUNG_TASK -void reset_hung_task_detector (void ); -#else -static inline void reset_hung_task_detector (void ) -{ -} -#endif -/* Attach to any functions which should be ignored in wchan output. */ #define __sched __attribute__((__section__(".sched.text")))
init/main.c +1 -0
@@ -26,6 +26,7 @@#include <linux/bootmem.h> #include <linux/acpi.h> #include <linux/tty.h> +#include <linux/nmi.h> #include <linux/percpu.h> #include <linux/kmod.h> #include <linux/vmalloc.h>
kernel/debug/debug_core.c +1 -0
@@ -49,6 +49,7 @@#include <linux/init.h> #include <linux/kgdb.h> #include <linux/kdb.h> +#include <linux/nmi.h> #include <linux/pid.h> #include <linux/smp.h> #include <linux/mm.h>
kernel/power/hibernate.c +1 -0
@@ -21,6 +21,7 @@#include <linux/fs.h> #include <linux/mount.h> #include <linux/pm.h> +#include <linux/nmi.h> #include <linux/console.h> #include <linux/cpu.h> #include <linux/freezer.h>
kernel/power/snapshot.c +1 -0
@@ -22,6 +22,7 @@#include <linux/device.h> #include <linux/init.h> #include <linux/bootmem.h> +#include <linux/nmi.h> #include <linux/syscalls.h> #include <linux/console.h> #include <linux/highmem.h>
kernel/sched/clock.c +1 -0
@@ -58,6 +58,7 @@#include <linux/percpu.h> #include <linux/ktime.h> #include <linux/sched.h> +#include <linux/nmi.h> #include <linux/sched/clock.h> #include <linux/static_key.h> #include <linux/workqueue.h>
kernel/time/tick-sched.c +1 -0
@@ -17,6 +17,7 @@#include <linux/interrupt.h> #include <linux/kernel_stat.h> #include <linux/percpu.h> +#include <linux/nmi.h> #include <linux/profile.h> #include <linux/sched/signal.h> #include <linux/sched/clock.h>
kernel/time/timekeeping.c +1 -0
@@ -14,6 +14,7 @@#include <linux/percpu.h> #include <linux/init.h> #include <linux/mm.h> +#include <linux/nmi.h> #include <linux/sched.h> #include <linux/sched/loadavg.h> #include <linux/syscore_ops.h>
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 24/89 sched/headers: Remove #include <linux/capability.h> from <linux/sched.h>
In reply to Ingo MolnarThe <linux/sched.h> header does not actually make use of any types or APIs defined in <linux/capability.h>, so remove its inclusion.
--- include/linux/sched.h | 1 - 1 file changed, 1 deletion(-)
include/linux/sched.h +0 -1
@@ -7,7 +7,6 @@#include <asm/param.h> /* for HZ */ -#include <linux/capability.h> #include <linux/threads.h> #include <linux/kernel.h> #include <linux/types.h>
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 25/89 sched/headers, cgroups: Remove the threadgroup_change_*() wrappery
In reply to Ingo Molnarthreadgroup_change_begin()/end() is a pointless wrapper around cgroup_threadgroup_change_begin()/end(), minus a might_sleep() in the !CONFIG_CGROUPS=y case.
Remove the wrappery, move the might_sleep() (the down_read() already has a might_sleep() check).
This debloats <linux/sched.h> a bit and simplifies this API.
Update all call sites.
No change in functionality.
--- fs/exec.c | 6 +++--- include/linux/cgroup-defs.h | 13 ++++++++----- include/linux/sched.h | 28 ---------------------------- kernel/cgroup_pids.c | 2 +- kernel/fork.c | 6 +++--- kernel/signal.c | 6 +++--- 6 files changed, 18 insertions(+), 43 deletions(-)
fs/exec.c +3 -3
@@ -1091,7 +1091,7 @@ static int de_thread(struct task_struct *tsk)struct task_struct *leader = tsk->group_leader;for (;;) { -threadgroup_change_begin (tsk); +cgroup_threadgroup_change_begin (tsk);write_lock_irq (&tasklist_lock);/* * Do this under tasklist_lock to ensure that
@@ -1102,7 +1102,7 @@ static int de_thread(struct task_struct *tsk)break ;__set_current_state (TASK_KILLABLE );write_unlock_irq (&tasklist_lock); -threadgroup_change_end (tsk); +cgroup_threadgroup_change_end (tsk);schedule ();if (unlikely (__fatal_signal_pending (tsk))) goto killed;
@@ -1160,7 +1160,7 @@ static int de_thread(struct task_struct *tsk)if (unlikely (leader->ptrace))__wake_up_parent (leader, leader->parent);write_unlock_irq (&tasklist_lock); -threadgroup_change_end (tsk); +cgroup_threadgroup_change_end (tsk);release_task (leader); }
include/linux/cgroup-defs.h +8 -5
@@ -528,8 +528,8 @@ extern struct percpu_rw_semaphore cgroup_threadgroup_rwsem;* cgroup_threadgroup_change_begin - threadgroup exclusion for cgroups * @tsk: target task * -* Called from threadgroup_change_begin() and allows cgroup operations to -* synchronize against threadgroup changes using a percpu_rw_semaphore. +* Allows cgroup operations to synchronize against threadgroup changes +* using a percpu_rw_semaphore. */ static inline void cgroup_threadgroup_change_begin (struct task_struct *tsk) {
@@ -540,8 +540,7 @@ static inline void cgroup_threadgroup_change_begin(struct task_struct *tsk)* cgroup_threadgroup_change_end - threadgroup exclusion for cgroups * @tsk: target task * -* Called from threadgroup_change_end(). Counterpart of -* cgroup_threadcgroup_change_begin(). +* Counterpart of cgroup_threadcgroup_change_begin(). */ static inline void cgroup_threadgroup_change_end (struct task_struct *tsk) {
@@ -552,7 +551,11 @@ static inline void cgroup_threadgroup_change_end(struct task_struct *tsk)#define CGROUP_SUBSYS_COUNT 0 -static inline void cgroup_threadgroup_change_begin (struct task_struct *tsk) {} +static inline void cgroup_threadgroup_change_begin (struct task_struct *tsk) +{ +might_sleep (); +} +static inline void cgroup_threadgroup_change_end (struct task_struct *tsk) {}#endif /* CONFIG_CGROUPS */
include/linux/sched.h +0 -28
@@ -1933,34 +1933,6 @@ static inline void task_unlock(struct task_struct *p)spin_unlock (&p->alloc_lock); } -/** -* threadgroup_change_begin - mark the beginning of changes to a threadgroup -* @tsk: task causing the changes -* -* All operations which modify a threadgroup - a new thread joining the -* group, death of a member thread (the assertion of PF_EXITING) and -* exec(2) dethreading the process and replacing the leader - are wrapped -* by threadgroup_change_{begin|end}(). This is to provide a place which -* subsystems needing threadgroup stability can hook into for -* synchronization. -*/ -static inline void threadgroup_change_begin (struct task_struct *tsk) -{ -might_sleep (); -cgroup_threadgroup_change_begin (tsk); -} - -/** -* threadgroup_change_end - mark the end of changes to a threadgroup -* @tsk: task causing the changes -* -* See threadgroup_change_begin(). -*/ -static inline void threadgroup_change_end (struct task_struct *tsk) -{ -cgroup_threadgroup_change_end (tsk); -} -#ifdef CONFIG_THREAD_INFO_IN_TASK static inline struct thread_info *task_thread_info (struct task_struct *task)
kernel/cgroup_pids.c +1 -1
@@ -214,7 +214,7 @@ static void pids_cancel_attach(struct cgroup_taskset *tset)/* * task_css_check(true) in pids_can_fork() and pids_cancel_fork() relies -* on threadgroup_change_begin() held by the copy_process(). +* on cgroup_threadgroup_change_begin() held by the copy_process(). */ static int pids_can_fork (struct task_struct *task) {
kernel/fork.c +3 -3
@@ -1749,7 +1749,7 @@ static __latent_entropy struct task_struct *copy_process(INIT_LIST_HEAD (&p->thread_group); p->task_works =NULL ; -threadgroup_change_begin (current); +cgroup_threadgroup_change_begin (current);/* * Ensure that the cgroup subsystem policies allow the new process to be * forked. It should be noted the the new process's css_set can be changed
@@ -1839,7 +1839,7 @@ static __latent_entropy struct task_struct *copy_process(proc_fork_connector (p);cgroup_post_fork (p); -threadgroup_change_end (current); +cgroup_threadgroup_change_end (current);perf_event_fork (p);trace_task_newtask (p, clone_flags);
@@ -1850,7 +1850,7 @@ static __latent_entropy struct task_struct *copy_process( bad_fork_cancel_cgroup:cgroup_cancel_fork (p); bad_fork_free_pid: -threadgroup_change_end (current); +cgroup_threadgroup_change_end (current);if (pid != &init_struct_pid)free_pid (pid); bad_fork_cleanup_thread:
kernel/signal.c +3 -3
@@ -2396,11 +2396,11 @@ void exit_signals(struct task_struct *tsk)* @tsk is about to have PF_EXITING set - lock out users which * expect stable threadgroup. */ -threadgroup_change_begin (tsk); +cgroup_threadgroup_change_begin (tsk);if (thread_group_empty (tsk) ||signal_group_exit (tsk->signal)) { tsk->flags |=PF_EXITING ; -threadgroup_change_end (tsk); +cgroup_threadgroup_change_end (tsk);return ; }
@@ -2411,7 +2411,7 @@ void exit_signals(struct task_struct *tsk)*/ tsk->flags |=PF_EXITING ; -threadgroup_change_end (tsk); +cgroup_threadgroup_change_end (tsk);if (!signal_pending (tsk)) goto out;
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 26/89 sched/headers: Remove unused <linux/cgroup-defs.h> include from <linux/sched.h>
In reply to Ingo MolnarIt's not used by anything in <linux/sched.h> anymore.
This reduces the preprocessed size of <linux/sched.h> and speeds up the build a bit.
Also fix code that implicitly relied on headers included by <linux/cgroup-defs.h>.
--- include/linux/sched.h | 1 - include/target/target_core_base.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-)
include/linux/sched.h +0 -1
@@ -51,7 +51,6 @@#include <linux/uidgid.h> #include <linux/gfp.h> #include <linux/magic.h> -#include <linux/cgroup-defs.h> #include <asm/processor.h>
include/target/target_core_base.h +1 -0
@@ -4,6 +4,7 @@#include <linux/configfs.h> /* struct config_group */ #include <linux/dma-direction.h> /* enum dma_data_direction */ #include <linux/percpu_ida.h> /* struct percpu_ida */ +#include <linux/percpu-refcount.h> #include <linux/semaphore.h> /* struct semaphore */ #define TARGET_CORE_VERSION "v5.0"
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 27/89 sched/headers: Move 'struct pacct_struct' and 'struct cpu_itimer' form <linux/sched.h> to <linux/sched/signal.h>
In reply to Ingo MolnarThese structures are actually part of 'struct signal', so move them to <linux/sched/signal.h> where they belong.
This further decreases the size and complexity of <linux/sched.h>.
--- include/linux/sched.h | 13 ------------- include/linux/sched/signal.h | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 13 deletions(-)
include/linux/sched.h +0 -13
@@ -328,19 +328,6 @@ arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr,static inline void arch_pick_mmap_layout (struct mm_struct *mm) {}#endif -struct pacct_struct { -int ac_flag; -long ac_exitcode; -unsigned long ac_mem; -u64 ac_utime, ac_stime; -unsigned long ac_minflt, ac_majflt; -}; - -struct cpu_itimer { -u64 expires; -u64 incr; -}; -/** * struct prev_cputime - snaphsot of system and user cputime * @utime: time spent in user mode
include/linux/sched/signal.h +16 -0
@@ -15,6 +15,22 @@ struct sighand_struct { };/* +* Per-process accounting stats: +*/ +struct pacct_struct { +int ac_flag; +long ac_exitcode; +unsigned long ac_mem; +u64 ac_utime, ac_stime; +unsigned long ac_minflt, ac_majflt; +}; + +struct cpu_itimer { +u64 expires; +u64 incr; +}; + +/* * NOTE! "signal_struct" does not have its own * locking, because a shared signal_struct always * implies a shared sighand_struct, so locking
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 28/89 sched/cpufreq: Move the cpufreq interface to <linux/sched/cpufreq.h>
In reply to Ingo MolnarNo need to have this in the generic <linux/sched.h> header.
--- drivers/cpufreq/cpufreq_governor.c | 1 - drivers/cpufreq/cpufreq_governor.h | 1 + drivers/cpufreq/cpufreq_ondemand.c | 1 + drivers/cpufreq/intel_pstate.c | 2 +- include/linux/sched.h | 17 ----------------- include/linux/sched/cpufreq.h | 25 +++++++++++++++++++++++++ kernel/sched/sched.h | 1 + 7 files changed, 29 insertions(+), 19 deletions(-)
drivers/cpufreq/cpufreq_governor.c +0 -1
@@ -18,7 +18,6 @@#include <linux/export.h> #include <linux/kernel_stat.h> -#include <linux/sched.h> #include <linux/slab.h> #include "cpufreq_governor.h"
drivers/cpufreq/cpufreq_governor.h +1 -0
@@ -20,6 +20,7 @@#include <linux/atomic.h> #include <linux/irq_work.h> #include <linux/cpufreq.h> +#include <linux/sched/cpufreq.h> #include <linux/kernel_stat.h> #include <linux/module.h> #include <linux/mutex.h>
drivers/cpufreq/cpufreq_ondemand.c +1 -0
@@ -16,6 +16,7 @@#include <linux/percpu-defs.h> #include <linux/slab.h> #include <linux/tick.h> +#include <linux/sched/cpufreq.h> #include "cpufreq_ondemand.h"
drivers/cpufreq/intel_pstate.c +1 -1
@@ -19,7 +19,7 @@#include <linux/hrtimer.h> #include <linux/tick.h> #include <linux/slab.h> -#include <linux/sched.h> +#include <linux/sched/cpufreq.h> #include <linux/list.h> #include <linux/cpu.h> #include <linux/cpufreq.h>
include/linux/sched.h +0 -17
@@ -2297,21 +2297,4 @@ static inline void mm_update_next_owner(struct mm_struct *mm) }#endif /* CONFIG_MEMCG */ -#define SCHED_CPUFREQ_RT (1U << 0) -#define SCHED_CPUFREQ_DL (1U << 1) -#define SCHED_CPUFREQ_IOWAIT (1U << 2) - -#define SCHED_CPUFREQ_RT_DL (SCHED_CPUFREQ_RT | SCHED_CPUFREQ_DL) - -#ifdef CONFIG_CPU_FREQ -struct update_util_data { -void (*func)(struct update_util_data *data,u64 time,unsigned int flags); -}; - -void cpufreq_add_update_util_hook (int cpu,struct update_util_data *data, -void (*func)(struct update_util_data *data,u64 time, -unsigned int flags)); -void cpufreq_remove_update_util_hook (int cpu); -#endif /* CONFIG_CPU_FREQ */ -#endif
include/linux/sched/cpufreq.h new file +25 -0
@@ -0,0 +1,25 @@ +#ifndef _LINUX_SCHED_CPUFREQ_H +#define _LINUX_SCHED_CPUFREQ_H + +/* +* Interface between cpufreq drivers and the scheduler: +*/ + +#define SCHED_CPUFREQ_RT (1U << 0) +#define SCHED_CPUFREQ_DL (1U << 1) +#define SCHED_CPUFREQ_IOWAIT (1U << 2) + +#define SCHED_CPUFREQ_RT_DL (SCHED_CPUFREQ_RT | SCHED_CPUFREQ_DL) + +#ifdef CONFIG_CPU_FREQ +struct update_util_data { +void (*func)(struct update_util_data *data,u64 time,unsigned int flags); +}; + +void cpufreq_add_update_util_hook (int cpu,struct update_util_data *data, +void (*func)(struct update_util_data *data,u64 time, +unsigned int flags)); +void cpufreq_remove_update_util_hook (int cpu); +#endif /* CONFIG_CPU_FREQ */ + +#endif /* _LINUX_SCHED_CPUFREQ_H */
kernel/sched/sched.h +1 -0
@@ -7,6 +7,7 @@#include <linux/sched/wake_q.h> #include <linux/sched/signal.h> #include <linux/sched/mm.h> +#include <linux/sched/cpufreq.h> #include <linux/u64_stats_sync.h> #include <linux/sched/deadline.h> #include <linux/kernel_stat.h>
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 29/89 sched/headers: Move more mm_struct related functionality from <linux/sched.h> to <linux/sched/mm.h>
In reply to Ingo MolnarNeither the mmap_layout nor the mm_update_next_owner() methods need to be in <linux/sched.h> - move them to the more appropriate <linux/sched/mm.h> header.
--- arch/alpha/kernel/osf_sys.c | 1 + arch/arc/mm/mmap.c | 3 ++- arch/arm/mm/mmap.c | 1 + arch/arm64/mm/mmap.c | 1 + arch/frv/mm/elf-fdpic.c | 1 + arch/ia64/kernel/sys_ia64.c | 1 + arch/mips/mm/mmap.c | 1 + arch/parisc/kernel/cache.c | 1 + arch/parisc/kernel/sys_parisc.c | 1 + arch/parisc/mm/hugetlbpage.c | 1 + arch/powerpc/mm/mmap.c | 1 + arch/s390/mm/mmap.c | 1 + arch/sh/mm/mmap.c | 1 + arch/sparc/kernel/sys_sparc_32.c | 1 + arch/sparc/kernel/sys_sparc_64.c | 1 + arch/sparc/mm/hugetlbpage.c | 1 + arch/tile/mm/hugetlbpage.c | 1 + arch/tile/mm/mmap.c | 1 + arch/x86/kernel/sys_x86_64.c | 1 + arch/x86/mm/hugetlbpage.c | 1 + arch/x86/mm/mmap.c | 1 + arch/xtensa/kernel/syscall.c | 1 + include/linux/sched.h | 21 --------------------- include/linux/sched/mm.h | 21 +++++++++++++++++++++ 24 files changed, 44 insertions(+), 22 deletions(-)
arch/alpha/kernel/osf_sys.c +1 -0
@@ -12,6 +12,7 @@#include <linux/errno.h> #include <linux/sched/signal.h> +#include <linux/sched/mm.h> #include <linux/kernel.h> #include <linux/mm.h> #include <linux/smp.h>
arch/arc/mm/mmap.c +2 -1
@@ -13,7 +13,8 @@#include <linux/fs.h> #include <linux/mm.h> #include <linux/mman.h> -#include <linux/sched.h> +#include <linux/sched/mm.h> +#include <asm/cacheflush.h> #define COLOUR_ALIGN (addr, pgoff) \
arch/arm/mm/mmap.c +1 -0
@@ -6,6 +6,7 @@#include <linux/mman.h> #include <linux/shm.h> #include <linux/sched/signal.h> +#include <linux/sched/mm.h> #include <linux/io.h> #include <linux/personality.h> #include <linux/random.h>
arch/arm64/mm/mmap.c +1 -0
@@ -23,6 +23,7 @@#include <linux/export.h> #include <linux/shm.h> #include <linux/sched/signal.h> +#include <linux/sched/mm.h> #include <linux/io.h> #include <linux/personality.h> #include <linux/random.h>
arch/frv/mm/elf-fdpic.c +1 -0
@@ -10,6 +10,7 @@*/ #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/mm.h> #include <linux/fs.h> #include <linux/elf-fdpic.h>
arch/ia64/kernel/sys_ia64.c +1 -0
@@ -10,6 +10,7 @@#include <linux/mm.h> #include <linux/mman.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/shm.h> #include <linux/file.h> /* doh, must come after sched.h... */ #include <linux/smp.h>
arch/mips/mm/mmap.c +1 -0
@@ -14,6 +14,7 @@#include <linux/personality.h> #include <linux/random.h> #include <linux/sched/signal.h> +#include <linux/sched/mm.h> unsigned long shm_align_mask =PAGE_SIZE -1 ;/* Sane caches */ EXPORT_SYMBOL (shm_align_mask);
arch/parisc/kernel/cache.c +1 -0
@@ -18,6 +18,7 @@#include <linux/seq_file.h> #include <linux/pagemap.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <asm/pdc.h> #include <asm/cache.h> #include <asm/cacheflush.h>
arch/parisc/kernel/sys_parisc.c +1 -0
@@ -31,6 +31,7 @@#include <linux/mm.h> #include <linux/mman.h> #include <linux/sched/signal.h> +#include <linux/sched/mm.h> #include <linux/shm.h> #include <linux/syscalls.h> #include <linux/utsname.h>
arch/parisc/mm/hugetlbpage.c +1 -0
@@ -8,6 +8,7 @@#include <linux/fs.h> #include <linux/mm.h> +#include <linux/sched/mm.h> #include <linux/hugetlb.h> #include <linux/pagemap.h> #include <linux/sysctl.h>
arch/powerpc/mm/mmap.c +1 -0
@@ -26,6 +26,7 @@#include <linux/mm.h> #include <linux/random.h> #include <linux/sched/signal.h> +#include <linux/sched/mm.h> #include <linux/elf-randomize.h> #include <linux/security.h> #include <linux/mman.h>
arch/s390/mm/mmap.c +1 -0
@@ -27,6 +27,7 @@#include <linux/mm.h> #include <linux/mman.h> #include <linux/sched/signal.h> +#include <linux/sched/mm.h> #include <linux/module.h> #include <linux/random.h> #include <linux/compat.h>
arch/sh/mm/mmap.c +1 -0
@@ -9,6 +9,7 @@*/ #include <linux/io.h> #include <linux/mm.h> +#include <linux/sched/mm.h> #include <linux/mman.h> #include <linux/module.h> #include <asm/page.h>
arch/sparc/kernel/sys_sparc_32.c +1 -0
@@ -8,6 +8,7 @@#include <linux/errno.h> #include <linux/types.h> #include <linux/sched/signal.h> +#include <linux/sched/mm.h> #include <linux/mm.h> #include <linux/fs.h> #include <linux/file.h>
arch/sparc/kernel/sys_sparc_64.c +1 -0
@@ -8,6 +8,7 @@#include <linux/errno.h> #include <linux/types.h> #include <linux/sched/signal.h> +#include <linux/sched/mm.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/mm.h>
arch/sparc/mm/hugetlbpage.c +1 -0
@@ -6,6 +6,7 @@#include <linux/fs.h> #include <linux/mm.h> +#include <linux/sched/mm.h> #include <linux/hugetlb.h> #include <linux/pagemap.h> #include <linux/sysctl.h>
arch/tile/mm/hugetlbpage.c +1 -0
@@ -19,6 +19,7 @@#include <linux/init.h> #include <linux/fs.h> #include <linux/mm.h> +#include <linux/sched/mm.h> #include <linux/hugetlb.h> #include <linux/pagemap.h> #include <linux/slab.h>
arch/tile/mm/mmap.c +1 -0
@@ -18,6 +18,7 @@#include <linux/random.h> #include <linux/limits.h> #include <linux/sched/signal.h> +#include <linux/sched/mm.h> #include <linux/mman.h> #include <linux/compat.h>
arch/x86/kernel/sys_x86_64.c +1 -0
@@ -1,5 +1,6 @@#include <linux/errno.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/syscalls.h> #include <linux/mm.h> #include <linux/fs.h>
arch/x86/mm/hugetlbpage.c +1 -0
@@ -7,6 +7,7 @@#include <linux/init.h> #include <linux/fs.h> #include <linux/mm.h> +#include <linux/sched/mm.h> #include <linux/hugetlb.h> #include <linux/pagemap.h> #include <linux/err.h>
arch/x86/mm/mmap.c +1 -0
@@ -29,6 +29,7 @@#include <linux/random.h> #include <linux/limits.h> #include <linux/sched/signal.h> +#include <linux/sched/mm.h> #include <asm/elf.h> struct va_alignment __read_mostly va_align = {
arch/xtensa/kernel/syscall.c +1 -0
@@ -25,6 +25,7 @@#include <linux/file.h> #include <linux/fs.h> #include <linux/mman.h> +#include <linux/sched/mm.h> #include <linux/shm.h> typedef void (*syscall_t )(void );
include/linux/sched.h +0 -21
@@ -315,19 +315,6 @@ void __noreturn do_task_dead(void);struct nsproxy ; -#ifdef CONFIG_MMU -extern void arch_pick_mmap_layout (struct mm_struct *mm); -extern unsigned long -arch_get_unmapped_area (struct file *,unsigned long ,unsigned long , -unsigned long ,unsigned long ); -extern unsigned long -arch_get_unmapped_area_topdown (struct file *filp,unsigned long addr, -unsigned long len,unsigned long pgoff, -unsigned long flags); -#else -static inline void arch_pick_mmap_layout (struct mm_struct *mm) {} -#endif -/** * struct prev_cputime - snaphsot of system and user cputime * @utime: time spent in user mode
@@ -2289,12 +2276,4 @@ static inline void inc_syscw(struct task_struct *tsk)#define TASK_SIZE_OF (tsk) TASK_SIZE#endif -#ifdef CONFIG_MEMCG -extern void mm_update_next_owner (struct mm_struct *mm); -#else -static inline void mm_update_next_owner (struct mm_struct *mm) -{ -} -#endif /* CONFIG_MEMCG */ -#endif
include/linux/sched/mm.h +21 -0
@@ -56,4 +56,25 @@ extern struct mm_struct *mm_access(struct task_struct *task, unsigned int mode);/* Remove the current tasks stale references to the old mm_struct */ extern void mm_release (struct task_struct *,struct mm_struct *); +#ifdef CONFIG_MEMCG +extern void mm_update_next_owner (struct mm_struct *mm); +#else +static inline void mm_update_next_owner (struct mm_struct *mm) +{ +} +#endif /* CONFIG_MEMCG */ + +#ifdef CONFIG_MMU +extern void arch_pick_mmap_layout (struct mm_struct *mm); +extern unsigned long +arch_get_unmapped_area (struct file *,unsigned long ,unsigned long , +unsigned long ,unsigned long ); +extern unsigned long +arch_get_unmapped_area_topdown (struct file *filp,unsigned long addr, +unsigned long len,unsigned long pgoff, +unsigned long flags); +#else +static inline void arch_pick_mmap_layout (struct mm_struct *mm) {} +#endif +#endif /* _LINUX_SCHED_MM_H */
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 30/89 sched/headers: Move the 'init_mm' declaration from <linux/sched.h> to <linux/mm_types.h>
In reply to Ingo Molnar--- include/linux/mm_types.h | 2 ++ include/linux/sched.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-)
include/linux/mm_types.h +2 -0
@@ -515,6 +515,8 @@ struct mm_struct {struct work_struct async_put_work; }; +extern struct mm_struct init_mm; +static inline void mm_init_cpumask (struct mm_struct *mm) {#ifdef CONFIG_CPUMASK_OFFSTACK
include/linux/sched.h +0 -2
@@ -1785,8 +1785,6 @@ static inline int kstack_end(void *addr)extern union thread_union init_thread_union;extern struct task_struct init_task; -extern struct mm_struct init_mm; -extern struct pid_namespace init_pid_ns;/*
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 31/89 sched/headers: Move in_vfork() from <linux/sched.h> to <linux/sched/mm.h>
In reply to Ingo MolnarThe in_vfork() function deals with task->mm, so it better belongs into <linux/sched/mm.h>.
--- include/linux/sched.h | 26 -------------------------- include/linux/sched/mm.h | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 26 deletions(-)
include/linux/sched.h +0 -26
@@ -1245,32 +1245,6 @@ static inline int tsk_nr_cpus_allowed(struct task_struct *p)#define TNF_FAULT_LOCAL 0x08#define TNF_MIGRATE_FAIL 0x10 -static inline bool in_vfork (struct task_struct *tsk) -{ -bool ret; - -/* -* need RCU to access ->real_parent if CLONE_VM was used along with -* CLONE_PARENT. -* -* We check real_parent->mm == tsk->mm because CLONE_VFORK does not -* imply CLONE_VM -* -* CLONE_VFORK can be used with CLONE_PARENT/CLONE_THREAD and thus -* ->real_parent is not necessarily the task doing vfork(), so in -* theory we can't rely on task_lock() if we want to dereference it. -* -* And in this case we can't trust the real_parent->mm == tsk->mm -* check, it can be false negative. But we do not care, if init or -* another oom-unkillable task does this it should blame itself. -*/ -rcu_read_lock (); - ret = tsk->vfork_done && tsk->real_parent->mm == tsk->mm; -rcu_read_unlock (); - -return ret; -} -#ifdef CONFIG_NUMA_BALANCING extern void task_numa_fault (int last_node,int node,int pages,int flags);extern pid_t task_numa_group_id (struct task_struct *p);
include/linux/sched/mm.h +27 -0
@@ -3,6 +3,7 @@#include <linux/kernel.h> #include <linux/atomic.h> +#include <linux/sched.h> /* * Routines for handling mm_structs
@@ -77,4 +78,30 @@ arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr,static inline void arch_pick_mmap_layout (struct mm_struct *mm) {}#endif +static inline bool in_vfork (struct task_struct *tsk) +{ +bool ret; + +/* +* need RCU to access ->real_parent if CLONE_VM was used along with +* CLONE_PARENT. +* +* We check real_parent->mm == tsk->mm because CLONE_VFORK does not +* imply CLONE_VM +* +* CLONE_VFORK can be used with CLONE_PARENT/CLONE_THREAD and thus +* ->real_parent is not necessarily the task doing vfork(), so in +* theory we can't rely on task_lock() if we want to dereference it. +* +* And in this case we can't trust the real_parent->mm == tsk->mm +* check, it can be false negative. But we do not care, if init or +* another oom-unkillable task does this it should blame itself. +*/ +rcu_read_lock (); + ret = tsk->vfork_done && tsk->real_parent->mm == tsk->mm; +rcu_read_unlock (); + +return ret; +} +#endif /* _LINUX_SCHED_MM_H */
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 32/89 sched/numa: Split <linux/sched/numa_balancing.h> out of <linux/sched.h>
In reply to Ingo MolnarSplit out the interface between the scheduler and the MM which deals with page fault driven NUMA balancing, into the new <linux/sched/numa_balancing.h> header.
--- fs/exec.c | 1 + fs/proc/array.c | 1 + include/linux/sched.h | 35 ----------------------------------- include/linux/sched/numa_balancing.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ include/trace/events/sched.h | 2 +- kernel/fork.c | 1 + kernel/sched/sched.h | 1 + mm/huge_memory.c | 1 + mm/memory.c | 1 + mm/mempolicy.c | 1 + 10 files changed, 54 insertions(+), 36 deletions(-)
fs/exec.c +1 -0
@@ -35,6 +35,7 @@#include <linux/sched/mm.h> #include <linux/sched/coredump.h> #include <linux/sched/signal.h> +#include <linux/sched/numa_balancing.h> #include <linux/pagemap.h> #include <linux/perf_event.h> #include <linux/highmem.h>
fs/proc/array.c +1 -0
@@ -61,6 +61,7 @@#include <linux/string.h> #include <linux/mman.h> #include <linux/sched/mm.h> +#include <linux/sched/numa_balancing.h> #include <linux/proc_fs.h> #include <linux/ioport.h> #include <linux/uaccess.h>
include/linux/sched.h +0 -35
@@ -1239,41 +1239,6 @@ static inline int tsk_nr_cpus_allowed(struct task_struct *p)return p->nr_cpus_allowed; } -#define TNF_MIGRATED 0x01 -#define TNF_NO_GROUP 0x02 -#define TNF_SHARED 0x04 -#define TNF_FAULT_LOCAL 0x08 -#define TNF_MIGRATE_FAIL 0x10 - -#ifdef CONFIG_NUMA_BALANCING -extern void task_numa_fault (int last_node,int node,int pages,int flags); -extern pid_t task_numa_group_id (struct task_struct *p); -extern void set_numabalancing_state (bool enabled); -extern void task_numa_free (struct task_struct *p); -extern bool should_numa_migrate_memory (struct task_struct *p,struct page *page, -int src_nid,int dst_cpu); -#else -static inline void task_numa_fault (int last_node,int node,int pages, -int flags) -{ -} -static inline pid_t task_numa_group_id (struct task_struct *p) -{ -return 0 ; -} -static inline void set_numabalancing_state (bool enabled) -{ -} -static inline void task_numa_free (struct task_struct *p) -{ -} -static inline bool should_numa_migrate_memory (struct task_struct *p, -struct page *page,int src_nid,int dst_cpu) -{ -return true; -} -#endif -static inline struct pid *task_pid (struct task_struct *task) {return task->pids[PIDTYPE_PID ].pid;
include/linux/sched/numa_balancing.h new file +46 -0
46 lines not on this page · raw message
include/trace/events/sched.h +1 -1
@@ -4,7 +4,7 @@#if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ )#define _TRACE_SCHED_H -#include <linux/sched.h> +#include <linux/sched/numa_balancing.h> #include <linux/tracepoint.h> #include <linux/binfmts.h>
kernel/fork.c +1 -0
@@ -16,6 +16,7 @@#include <linux/sched/mm.h> #include <linux/sched/coredump.h> #include <linux/sched/user.h> +#include <linux/sched/numa_balancing.h> #include <linux/init.h> #include <linux/unistd.h> #include <linux/module.h>
kernel/sched/sched.h +1 -0
@@ -6,6 +6,7 @@#include <linux/sched/clock.h> #include <linux/sched/wake_q.h> #include <linux/sched/signal.h> +#include <linux/sched/numa_balancing.h> #include <linux/sched/mm.h> #include <linux/sched/cpufreq.h> #include <linux/u64_stats_sync.h>
mm/huge_memory.c +1 -0
@@ -10,6 +10,7 @@#include <linux/mm.h> #include <linux/sched.h> #include <linux/sched/coredump.h> +#include <linux/sched/numa_balancing.h> #include <linux/highmem.h> #include <linux/hugetlb.h> #include <linux/mmu_notifier.h>
mm/memory.c +1 -0
@@ -42,6 +42,7 @@#include <linux/mm.h> #include <linux/sched/mm.h> #include <linux/sched/coredump.h> +#include <linux/sched/numa_balancing.h> #include <linux/hugetlb.h> #include <linux/mman.h> #include <linux/swap.h>
mm/mempolicy.c +1 -0
@@ -74,6 +74,7 @@#include <linux/kernel.h> #include <linux/sched.h> #include <linux/sched/mm.h> +#include <linux/sched/numa_balancing.h> #include <linux/nodemask.h> #include <linux/cpuset.h> #include <linux/slab.h>
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 33/89 sched/headers: Move the JOBCTL_ defines and methods from <linux/sched.h> to <linux/sched/jobctl.h>
In reply to Ingo MolnarOnly a small fraction of sched.h users actually utilizes these defines, and they are not scheduler functionality in any case, so move them into their separate header.
--- include/linux/sched.h | 30 ------------------------------ include/linux/sched/jobctl.h | 32 ++++++++++++++++++++++++++++++++ include/linux/sched/signal.h | 1 + 3 files changed, 33 insertions(+), 30 deletions(-)
include/linux/sched.h +0 -30
@@ -1552,36 +1552,6 @@ TASK_PFA_CLEAR(SPREAD_SLAB, spread_slab) TASK_PFA_TEST(LMK_WAITING, lmk_waiting) TASK_PFA_SET(LMK_WAITING, lmk_waiting) -/* -* task->jobctl flags - */ -#define JOBCTL_STOP_SIGMASK 0xffff/* signr of the last group stop */ - -#define JOBCTL_STOP_DEQUEUED_BIT 16/* stop signal dequeued */ -#define JOBCTL_STOP_PENDING_BIT 17/* task should stop for group stop */ -#define JOBCTL_STOP_CONSUME_BIT 18/* consume group stop count */ -#define JOBCTL_TRAP_STOP_BIT 19/* trap for STOP */ -#define JOBCTL_TRAP_NOTIFY_BIT 20/* trap for NOTIFY */ -#define JOBCTL_TRAPPING_BIT 21/* switching to TRACED */ -#define JOBCTL_LISTENING_BIT 22/* ptracer is listening for events */ - -#define JOBCTL_STOP_DEQUEUED (1UL << JOBCTL_STOP_DEQUEUED_BIT) -#define JOBCTL_STOP_PENDING (1UL << JOBCTL_STOP_PENDING_BIT) -#define JOBCTL_STOP_CONSUME (1UL << JOBCTL_STOP_CONSUME_BIT) -#define JOBCTL_TRAP_STOP (1UL << JOBCTL_TRAP_STOP_BIT) -#define JOBCTL_TRAP_NOTIFY (1UL << JOBCTL_TRAP_NOTIFY_BIT) -#define JOBCTL_TRAPPING (1UL << JOBCTL_TRAPPING_BIT) -#define JOBCTL_LISTENING (1UL << JOBCTL_LISTENING_BIT) - -#define JOBCTL_TRAP_MASK (JOBCTL_TRAP_STOP | JOBCTL_TRAP_NOTIFY) -#define JOBCTL_PENDING_MASK (JOBCTL_STOP_PENDING | JOBCTL_TRAP_MASK) - -extern bool task_set_jobctl_pending (struct task_struct *task, -unsigned long mask); -extern void task_clear_jobctl_trapping (struct task_struct *task); -extern void task_clear_jobctl_pending (struct task_struct *task, -unsigned long mask); -static inline void rcu_copy_process (struct task_struct *p) {#ifdef CONFIG_PREEMPT_RCU
include/linux/sched/jobctl.h new file +32 -0
@@ -0,0 +1,32 @@ +#ifndef _LINUX_SCHED_JOBCTL_H +#define _LINUX_SCHED_JOBCTL_H + +/* +* task->jobctl flags +*/ +#define JOBCTL_STOP_SIGMASK 0xffff/* signr of the last group stop */ + +#define JOBCTL_STOP_DEQUEUED_BIT 16/* stop signal dequeued */ +#define JOBCTL_STOP_PENDING_BIT 17/* task should stop for group stop */ +#define JOBCTL_STOP_CONSUME_BIT 18/* consume group stop count */ +#define JOBCTL_TRAP_STOP_BIT 19/* trap for STOP */ +#define JOBCTL_TRAP_NOTIFY_BIT 20/* trap for NOTIFY */ +#define JOBCTL_TRAPPING_BIT 21/* switching to TRACED */ +#define JOBCTL_LISTENING_BIT 22/* ptracer is listening for events */ + +#define JOBCTL_STOP_DEQUEUED (1UL << JOBCTL_STOP_DEQUEUED_BIT) +#define JOBCTL_STOP_PENDING (1UL << JOBCTL_STOP_PENDING_BIT) +#define JOBCTL_STOP_CONSUME (1UL << JOBCTL_STOP_CONSUME_BIT) +#define JOBCTL_TRAP_STOP (1UL << JOBCTL_TRAP_STOP_BIT) +#define JOBCTL_TRAP_NOTIFY (1UL << JOBCTL_TRAP_NOTIFY_BIT) +#define JOBCTL_TRAPPING (1UL << JOBCTL_TRAPPING_BIT) +#define JOBCTL_LISTENING (1UL << JOBCTL_LISTENING_BIT) + +#define JOBCTL_TRAP_MASK (JOBCTL_TRAP_STOP | JOBCTL_TRAP_NOTIFY) +#define JOBCTL_PENDING_MASK (JOBCTL_STOP_PENDING | JOBCTL_TRAP_MASK) + +extern bool task_set_jobctl_pending (struct task_struct *task,unsigned long mask); +extern void task_clear_jobctl_trapping (struct task_struct *task); +extern void task_clear_jobctl_pending (struct task_struct *task,unsigned long mask); + +#endif /* _LINUX_SCHED_JOBCTL_H */
include/linux/sched/signal.h +1 -0
@@ -2,6 +2,7 @@#define _LINUX_SCHED_SIGNAL_H#include <linux/sched.h> +#include <linux/sched/jobctl.h> /* * Types defining task->signal and task->sighand and APIs using them:
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 34/89 sched/core: Move <asm/paravirt.h> include to kernel/sched/sched.h
In reply to Ingo MolnarRecent header reorganizations unearthed this hidden dependency:
kernel/sched/core.c:199:25: error: 'paravirt_steal_rq_enabled' undeclared (first use in this function) kernel/sched/core.c:200:11: error: implicit declaration of function 'paravirt_steal_clock' [-Werror=implicit-function-declaration]
So move the asm/paravirt.h include from kernel/sched/cpuclock.c to kernel/sched/sched.h.
--- kernel/sched/cputime.c | 4 ---- kernel/sched/sched.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-)
kernel/sched/cputime.c +0 -4
@@ -6,10 +6,6 @@#include <linux/context_tracking.h> #include <linux/cputime.h> #include "sched.h" -#ifdef CONFIG_PARAVIRT -#include <asm/paravirt.h> -#endif -#ifdef CONFIG_IRQ_TIME_ACCOUNTING
kernel/sched/sched.h +4 -0
@@ -20,6 +20,10 @@#include <linux/tick.h> #include <linux/slab.h> +#ifdef CONFIG_PARAVIRT +#include <asm/paravirt.h> +#endif +#include "cpupri.h" #include "cpudeadline.h" #include "cpuacct.h"
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 35/89 kasan, sched/headers: Remove <linux/sched.h> from <linux/kasan.h> and uninline kasan_enable/disable_current()
In reply to Ingo Molnar<linux/kasan.h> is a low level header that is included early in affected kernel headers. But it includes <linux/sched.h> which complicates the cleanup of sched.h dependencies.
But kasan.h has almost no need for sched.h: its only use of scheduler functionality is in two inline functions which are not used very frequently - so uninline kasan_enable_current() and kasan_disable_current() and remove the <linux/sched.h> include from kasan.h.
--- include/linux/kasan.h | 11 ++--------- mm/kasan/kasan.c | 10 ++++++++++ 2 files changed, 12 insertions(+), 9 deletions(-)
include/linux/kasan.h +2 -9
@@ -1,7 +1,6 @@#ifndef _LINUX_KASAN_H#define _LINUX_KASAN_H -#include <linux/sched.h> #include <linux/types.h> struct kmem_cache ;
@@ -30,16 +29,10 @@ static inline void *kasan_mem_to_shadow(const void *addr) }/* Enable reporting bugs after kasan_disable_current() */ -static inline void kasan_enable_current (void ) -{ - current->kasan_depth++; -} +extern void kasan_enable_current (void );/* Disable reporting bugs for current task */ -static inline void kasan_disable_current (void ) -{ - current->kasan_depth--; -} +extern void kasan_disable_current (void );void kasan_unpoison_shadow (const void *address,size_t size);
mm/kasan/kasan.c +10 -0
@@ -39,6 +39,16 @@#include "kasan.h" #include "../slab.h" +void kasan_enable_current (void ) +{ + current->kasan_depth++; +} + +void kasan_disable_current (void ) +{ + current->kasan_depth--; +} +/* * Poisons the shadow memory for 'size' bytes starting from 'addr'. * Memory addresses should be aligned to KASAN_SHADOW_SCALE_SIZE.
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 36/89 sched/headers: Remove <linux/cred.h> inclusion from <linux/sched.h>
In reply to Ingo Molnar... and fix up missing #includes in other places that relied on sched.h doing that for them.
Note that even if the count where we need to add extra headers seems high, it's still a net win, because <linux/sched.h> is included in over 2,200 files ...
--- arch/arm/kernel/sys_oabi-compat.c | 1 + arch/mips/kernel/mips-mt-fpaff.c | 1 + arch/x86/include/asm/intel_rdt.h | 1 + arch/x86/kernel/cpu/intel_cacheinfo.c | 1 + block/ioprio.c | 1 + drivers/misc/eeprom/eeprom.c | 1 + drivers/misc/lkdtm_heap.c | 1 + drivers/misc/vmw_vmci/vmci_context.c | 1 + drivers/misc/vmw_vmci/vmci_host.c | 1 + drivers/staging/lustre/lustre/include/lustre_compat.h | 1 + drivers/staging/lustre/lustre/ptlrpc/sec.c | 1 + drivers/xen/balloon.c | 1 + fs/9p/v9fs.c | 1 + fs/affs/inode.c | 1 + fs/affs/super.c | 1 + fs/autofs4/dev-ioctl.c | 1 + fs/befs/linuxvfs.c | 1 + fs/binfmt_elf.c | 1 + fs/cachefiles/internal.h | 1 + fs/compat.c | 1 + fs/exportfs/expfs.c | 1 + fs/ext2/balloc.c | 1 + fs/ext4/ialloc.c | 2 ++ fs/file_table.c | 1 + fs/gfs2/inode.c | 1 + fs/gfs2/sys.c | 1 + fs/hfs/inode.c | 1 + fs/hfsplus/inode.c | 1 + fs/isofs/inode.c | 1 + fs/jffs2/fs.c | 1 + fs/libfs.c | 1 + fs/namespace.c | 1 + fs/ncpfs/ioctl.c | 1 + fs/notify/fanotify/fanotify.c | 1 + fs/notify/inotify/inotify_fsnotify.c | 1 + fs/omfs/inode.c | 1 + fs/overlayfs/copy_up.c | 1 + fs/overlayfs/inode.c | 1 + fs/overlayfs/namei.c | 1 + fs/overlayfs/super.c | 1 + fs/overlayfs/util.c | 1 + fs/posix_acl.c | 1 + fs/proc/proc_sysctl.c | 1 + fs/proc/root.c | 1 + fs/quota/dquot.c | 1 + fs/stat.c | 1 + fs/xfs/xfs_ioctl.c | 1 + include/linux/cred.h | 1 + include/linux/sched.h | 1 - include/linux/sched/signal.h | 1 + include/linux/wait.h | 1 + include/net/scm.h | 1 + include/rdma/ib.h | 1 + ipc/namespace.c | 1 + kernel/pid_namespace.c | 1 + kernel/ucount.c | 1 + kernel/uid16.c | 1 + kernel/utsname.c | 1 + lib/sbitmap.c | 1 + mm/usercopy.c | 1 + net/dns_resolver/dns_query.c | 2 ++ net/netfilter/xt_owner.c | 2 ++ net/sunrpc/auth.c | 1 + security/apparmor/policy.c | 1 + security/keys/internal.h | 1 + security/keys/keyctl.c | 1 + security/keys/persistent.c | 2 ++ 67 files changed, 70 insertions(+), 1 deletion(-)
arch/arm/kernel/sys_oabi-compat.c +1 -0
@@ -76,6 +76,7 @@#include <linux/syscalls.h> #include <linux/errno.h> #include <linux/fs.h> +#include <linux/cred.h> #include <linux/fcntl.h> #include <linux/eventpoll.h> #include <linux/sem.h>
arch/mips/kernel/mips-mt-fpaff.c +1 -0
@@ -9,6 +9,7 @@#include <linux/kernel.h> #include <linux/init.h> #include <linux/sched.h> +#include <linux/cred.h> #include <linux/security.h> #include <linux/types.h> #include <linux/uaccess.h>
arch/x86/include/asm/intel_rdt.h +1 -0
@@ -3,6 +3,7 @@#ifdef CONFIG_INTEL_RDT_A +#include <linux/sched.h> #include <linux/kernfs.h> #include <linux/jump_label.h>
arch/x86/kernel/cpu/intel_cacheinfo.c +1 -0
@@ -11,6 +11,7 @@#include <linux/cacheinfo.h> #include <linux/cpu.h> #include <linux/sched.h> +#include <linux/capability.h> #include <linux/sysfs.h> #include <linux/pci.h>
block/ioprio.c +1 -0
@@ -23,6 +23,7 @@#include <linux/kernel.h> #include <linux/export.h> #include <linux/ioprio.h> +#include <linux/cred.h> #include <linux/blkdev.h> #include <linux/capability.h> #include <linux/sched/user.h>
drivers/misc/eeprom/eeprom.c +1 -0
@@ -19,6 +19,7 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/device.h> +#include <linux/capability.h> #include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/mutex.h>
drivers/misc/lkdtm_heap.c +1 -0
@@ -4,6 +4,7 @@*/ #include "lkdtm.h" #include <linux/slab.h> +#include <linux/sched.h> /* * This tries to stay within the next largest power-of-2 kmalloc cache
drivers/misc/vmw_vmci/vmci_context.c +1 -0
@@ -19,6 +19,7 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/sched.h> +#include <linux/cred.h> #include <linux/slab.h> #include "vmci_queue_pair.h"
drivers/misc/vmw_vmci/vmci_host.c +1 -0
@@ -24,6 +24,7 @@#include <linux/module.h> #include <linux/mutex.h> #include <linux/sched.h> +#include <linux/cred.h> #include <linux/slab.h> #include <linux/file.h> #include <linux/init.h>
drivers/staging/lustre/lustre/include/lustre_compat.h +1 -0
@@ -35,6 +35,7 @@#include <linux/fs_struct.h> #include <linux/namei.h> +#include <linux/cred.h> #include "lustre_patchless_compat.h"
drivers/staging/lustre/lustre/ptlrpc/sec.c +1 -0
@@ -38,6 +38,7 @@#include "../../include/linux/libcfs/libcfs.h" #include <linux/crypto.h> +#include <linux/cred.h> #include <linux/key.h> #include "../include/obd.h"
drivers/xen/balloon.c +1 -0
@@ -41,6 +41,7 @@#include <linux/cpu.h> #include <linux/kernel.h> #include <linux/sched.h> +#include <linux/cred.h> #include <linux/errno.h> #include <linux/mm.h> #include <linux/bootmem.h>
fs/9p/v9fs.c +1 -0
@@ -29,6 +29,7 @@#include <linux/errno.h> #include <linux/fs.h> #include <linux/sched.h> +#include <linux/cred.h> #include <linux/parser.h> #include <linux/idr.h> #include <linux/slab.h>
fs/affs/inode.c +1 -0
@@ -10,6 +10,7 @@* (C) 1991 Linus Torvalds - minix filesystem */ #include <linux/sched.h> +#include <linux/cred.h> #include <linux/gfp.h> #include "affs.h"
fs/affs/super.c +1 -0
@@ -16,6 +16,7 @@#include <linux/parser.h> #include <linux/magic.h> #include <linux/sched.h> +#include <linux/cred.h> #include <linux/slab.h> #include <linux/writeback.h> #include <linux/blkdev.h>
fs/autofs4/dev-ioctl.c +1 -0
@@ -17,6 +17,7 @@#include <linux/file.h> #include <linux/fdtable.h> #include <linux/sched.h> +#include <linux/cred.h> #include <linux/compat.h> #include <linux/syscalls.h> #include <linux/magic.h>
fs/befs/linuxvfs.c +1 -0
@@ -18,6 +18,7 @@#include <linux/parser.h> #include <linux/namei.h> #include <linux/sched.h> +#include <linux/cred.h> #include <linux/exportfs.h> #include "befs.h"
fs/binfmt_elf.c +1 -0
@@ -36,6 +36,7 @@#include <linux/coredump.h> #include <linux/sched.h> #include <linux/sched/coredump.h> +#include <linux/cred.h> #include <linux/dax.h> #include <linux/uaccess.h> #include <asm/param.h>
fs/cachefiles/internal.h +1 -0
@@ -19,6 +19,7 @@#include <linux/fscache-cache.h> #include <linux/timer.h> #include <linux/wait.h> +#include <linux/cred.h> #include <linux/workqueue.h> #include <linux/security.h>
fs/compat.c +1 -0
@@ -21,6 +21,7 @@#include <linux/compat.h> #include <linux/errno.h> #include <linux/time.h> +#include <linux/cred.h> #include <linux/fs.h> #include <linux/fcntl.h> #include <linux/namei.h>
fs/exportfs/expfs.c +1 -0
@@ -15,6 +15,7 @@#include <linux/mount.h> #include <linux/namei.h> #include <linux/sched.h> +#include <linux/cred.h> #define dprintk(fmt, args...) do{}while(0)
fs/ext2/balloc.c +1 -0
@@ -15,6 +15,7 @@#include <linux/quotaops.h> #include <linux/slab.h> #include <linux/sched.h> +#include <linux/cred.h> #include <linux/buffer_head.h> #include <linux/capability.h>
fs/ext4/ialloc.c +2 -0
@@ -21,6 +21,8 @@#include <linux/random.h> #include <linux/bitops.h> #include <linux/blkdev.h> +#include <linux/cred.h> +#include <asm/byteorder.h> #include "ext4.h"
fs/file_table.c +1 -0
@@ -13,6 +13,7 @@#include <linux/module.h> #include <linux/fs.h> #include <linux/security.h> +#include <linux/cred.h> #include <linux/eventpoll.h> #include <linux/rcupdate.h> #include <linux/mount.h>
fs/gfs2/inode.c +1 -0
@@ -13,6 +13,7 @@#include <linux/buffer_head.h> #include <linux/namei.h> #include <linux/mm.h> +#include <linux/cred.h> #include <linux/xattr.h> #include <linux/posix_acl.h> #include <linux/gfs2_ondisk.h>
fs/gfs2/sys.c +1 -0
@@ -10,6 +10,7 @@#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt#include <linux/sched.h> +#include <linux/cred.h> #include <linux/spinlock.h> #include <linux/completion.h> #include <linux/buffer_head.h>
fs/hfs/inode.c +1 -0
@@ -14,6 +14,7 @@#include <linux/pagemap.h> #include <linux/mpage.h> #include <linux/sched.h> +#include <linux/cred.h> #include <linux/uio.h> #include <linux/xattr.h>
fs/hfsplus/inode.c +1 -0
@@ -14,6 +14,7 @@#include <linux/pagemap.h> #include <linux/mpage.h> #include <linux/sched.h> +#include <linux/cred.h> #include <linux/uio.h> #include "hfsplus_fs.h"
fs/isofs/inode.c +1 -0
@@ -15,6 +15,7 @@#include <linux/module.h> #include <linux/slab.h> +#include <linux/cred.h> #include <linux/nls.h> #include <linux/ctype.h> #include <linux/statfs.h>
fs/jffs2/fs.c +1 -0
@@ -15,6 +15,7 @@#include <linux/capability.h> #include <linux/kernel.h> #include <linux/sched.h> +#include <linux/cred.h> #include <linux/fs.h> #include <linux/list.h> #include <linux/mtd/mtd.h>
fs/libfs.c +1 -0
@@ -7,6 +7,7 @@#include <linux/export.h> #include <linux/pagemap.h> #include <linux/slab.h> +#include <linux/cred.h> #include <linux/mount.h> #include <linux/vfs.h> #include <linux/quotaops.h>
fs/namespace.c +1 -0
@@ -15,6 +15,7 @@#include <linux/user_namespace.h> #include <linux/namei.h> #include <linux/security.h> +#include <linux/cred.h> #include <linux/idr.h> #include <linux/init.h> /* init_rootfs */ #include <linux/fs_struct.h> /* get_fs_root et.al. */
fs/ncpfs/ioctl.c +1 -0
@@ -19,6 +19,7 @@#include <linux/highuid.h> #include <linux/vmalloc.h> #include <linux/sched.h> +#include <linux/cred.h> #include <linux/uaccess.h>
fs/notify/fanotify/fanotify.c +1 -0
@@ -6,6 +6,7 @@#include <linux/kernel.h> /* UINT_MAX */ #include <linux/mount.h> #include <linux/sched.h> +#include <linux/sched/user.h> #include <linux/types.h> #include <linux/wait.h>
fs/notify/inotify/inotify_fsnotify.c +1 -0
@@ -30,6 +30,7 @@#include <linux/slab.h> /* kmem_* */ #include <linux/types.h> #include <linux/sched.h> +#include <linux/sched/user.h> #include "inotify.h"
fs/omfs/inode.c +1 -0
@@ -8,6 +8,7 @@#include <linux/slab.h> #include <linux/fs.h> #include <linux/vfs.h> +#include <linux/cred.h> #include <linux/parser.h> #include <linux/buffer_head.h> #include <linux/vmalloc.h>
fs/overlayfs/copy_up.c +1 -0
@@ -16,6 +16,7 @@#include <linux/security.h> #include <linux/uaccess.h> #include <linux/sched.h> +#include <linux/cred.h> #include <linux/namei.h> #include <linux/fdtable.h> #include <linux/ratelimit.h>
fs/overlayfs/inode.c +1 -0
@@ -9,6 +9,7 @@#include <linux/fs.h> #include <linux/slab.h> +#include <linux/cred.h> #include <linux/xattr.h> #include <linux/posix_acl.h> #include "overlayfs.h"
fs/overlayfs/namei.c +1 -0
@@ -8,6 +8,7 @@*/ #include <linux/fs.h> +#include <linux/cred.h> #include <linux/namei.h> #include <linux/xattr.h> #include <linux/ratelimit.h>
fs/overlayfs/super.c +1 -0
@@ -7,6 +7,7 @@* the Free Software Foundation. */ +#include <uapi/linux/magic.h> #include <linux/fs.h> #include <linux/namei.h> #include <linux/xattr.h>
fs/overlayfs/util.c +1 -0
@@ -10,6 +10,7 @@#include <linux/fs.h> #include <linux/mount.h> #include <linux/slab.h> +#include <linux/cred.h> #include <linux/xattr.h> #include "overlayfs.h" #include "ovl_entry.h"
fs/posix_acl.c +1 -0
@@ -15,6 +15,7 @@#include <linux/atomic.h> #include <linux/fs.h> #include <linux/sched.h> +#include <linux/cred.h> #include <linux/posix_acl.h> #include <linux/posix_acl_xattr.h> #include <linux/xattr.h>
fs/proc/proc_sysctl.c +1 -0
@@ -8,6 +8,7 @@#include <linux/printk.h> #include <linux/security.h> #include <linux/sched.h> +#include <linux/cred.h> #include <linux/namei.h> #include <linux/mm.h> #include <linux/module.h>
fs/proc/root.c +1 -0
@@ -20,6 +20,7 @@#include <linux/mount.h> #include <linux/pid_namespace.h> #include <linux/parser.h> +#include <linux/cred.h> #include "internal.h"
fs/quota/dquot.c +1 -0
@@ -72,6 +72,7 @@#include <linux/proc_fs.h> #include <linux/security.h> #include <linux/sched.h> +#include <linux/cred.h> #include <linux/kmod.h> #include <linux/namei.h> #include <linux/capability.h>
fs/stat.c +1 -0
@@ -12,6 +12,7 @@#include <linux/fs.h> #include <linux/namei.h> #include <linux/security.h> +#include <linux/cred.h> #include <linux/syscalls.h> #include <linux/pagemap.h>
fs/xfs/xfs_ioctl.c +1 -0
@@ -43,6 +43,7 @@#include "xfs_acl.h" #include <linux/capability.h> +#include <linux/cred.h> #include <linux/dcache.h> #include <linux/mount.h> #include <linux/namei.h>
include/linux/cred.h +1 -0
@@ -18,6 +18,7 @@#include <linux/selinux.h> #include <linux/atomic.h> #include <linux/uidgid.h> +#include <linux/sched.h> #include <linux/sched/user.h> struct cred ;
include/linux/sched.h +0 -1
@@ -46,7 +46,6 @@#include <linux/kcov.h> #include <linux/task_io_accounting.h> #include <linux/latencytop.h> -#include <linux/cred.h> #include <linux/llist.h> #include <linux/uidgid.h> #include <linux/gfp.h>
include/linux/sched/signal.h +1 -0
@@ -1,6 +1,7 @@#ifndef _LINUX_SCHED_SIGNAL_H#define _LINUX_SCHED_SIGNAL_H +#include <linux/cred.h> #include <linux/sched.h> #include <linux/sched/jobctl.h>
include/linux/wait.h +1 -0
@@ -6,6 +6,7 @@#include <linux/list.h> #include <linux/stddef.h> #include <linux/spinlock.h> +#include <asm/current.h> #include <uapi/linux/wait.h>
include/net/scm.h +1 -0
@@ -3,6 +3,7 @@#include <linux/limits.h> #include <linux/net.h> +#include <linux/cred.h> #include <linux/security.h> #include <linux/pid.h> #include <linux/nsproxy.h>
include/rdma/ib.h +1 -0
@@ -35,6 +35,7 @@#include <linux/types.h> #include <linux/sched.h> +#include <linux/cred.h> struct ib_addr { union {
ipc/namespace.c +1 -0
@@ -9,6 +9,7 @@#include <linux/rcupdate.h> #include <linux/nsproxy.h> #include <linux/slab.h> +#include <linux/cred.h> #include <linux/fs.h> #include <linux/mount.h> #include <linux/user_namespace.h>
kernel/pid_namespace.c +1 -0
@@ -12,6 +12,7 @@#include <linux/pid_namespace.h> #include <linux/user_namespace.h> #include <linux/syscalls.h> +#include <linux/cred.h> #include <linux/err.h> #include <linux/acct.h> #include <linux/slab.h>
kernel/ucount.c +1 -0
@@ -8,6 +8,7 @@#include <linux/stat.h> #include <linux/sysctl.h> #include <linux/slab.h> +#include <linux/cred.h> #include <linux/hash.h> #include <linux/user_namespace.h>
kernel/uid16.c +1 -0
@@ -12,6 +12,7 @@#include <linux/init.h> #include <linux/highuid.h> #include <linux/security.h> +#include <linux/cred.h> #include <linux/syscalls.h> #include <linux/uaccess.h>
kernel/utsname.c +1 -0
@@ -14,6 +14,7 @@#include <linux/utsname.h> #include <linux/err.h> #include <linux/slab.h> +#include <linux/cred.h> #include <linux/user_namespace.h> #include <linux/proc_ns.h>
lib/sbitmap.c +1 -0
@@ -15,6 +15,7 @@* along with this program. If not, see <https://www.gnu.org/licenses/>. */ +#include <linux/sched.h> #include <linux/random.h> #include <linux/sbitmap.h>
mm/usercopy.c +1 -0
@@ -16,6 +16,7 @@#include <linux/mm.h> #include <linux/slab.h> +#include <linux/sched.h> #include <asm/sections.h> enum {
net/dns_resolver/dns_query.c +2 -0
@@ -37,8 +37,10 @@#include <linux/module.h> #include <linux/slab.h> +#include <linux/cred.h> #include <linux/dns_resolver.h> #include <linux/err.h> +#include <keys/dns_resolver-type.h> #include <keys/user-type.h>
net/netfilter/xt_owner.c +2 -0
@@ -13,6 +13,8 @@#include <linux/module.h> #include <linux/skbuff.h> #include <linux/file.h> +#include <linux/cred.h> +#include <net/sock.h> #include <net/inet_sock.h> #include <linux/netfilter/x_tables.h>
net/sunrpc/auth.c +1 -0
@@ -8,6 +8,7 @@#include <linux/types.h> #include <linux/sched.h> +#include <linux/cred.h> #include <linux/module.h> #include <linux/slab.h> #include <linux/errno.h>
security/apparmor/policy.c +1 -0
@@ -76,6 +76,7 @@#include <linux/slab.h> #include <linux/spinlock.h> #include <linux/string.h> +#include <linux/cred.h> #include "include/apparmor.h" #include "include/capability.h"
security/keys/internal.h +1 -0
@@ -13,6 +13,7 @@#define _INTERNAL_H#include <linux/sched.h> +#include <linux/cred.h> #include <linux/key-type.h> #include <linux/task_work.h> #include <linux/keyctl.h>
security/keys/keyctl.c +1 -0
@@ -18,6 +18,7 @@#include <linux/keyctl.h> #include <linux/fs.h> #include <linux/capability.h> +#include <linux/cred.h> #include <linux/string.h> #include <linux/err.h> #include <linux/vmalloc.h>
security/keys/persistent.c +2 -0
@@ -10,6 +10,8 @@*/ #include <linux/user_namespace.h> +#include <linux/cred.h> +#include "internal.h" unsigned persistent_keyring_expiry =3 *24 *3600 ;/* Expire after 3 days of non-use */
Signature · 1 line
2.7.4
Ingo Molnar
maintainerPATCH 37/89 sched/headers: Remove <asm/ptrace.h> from <linux/sched.h>
In reply to Ingo Molnar... and fix up missing #includes in other places that relied on sched.h doing that for them.
--- arch/alpha/math-emu/math.c | 1 + arch/sh/kernel/cpu/fpu.c | 1 + arch/sh/kernel/process.c | 1 + drivers/oprofile/cpu_buffer.c | 2 ++ include/linux/sched.h | 1 - 5 files changed, 5 insertions(+), 1 deletion(-)
arch/alpha/math-emu/math.c +1 -0
@@ -2,6 +2,7 @@#include <linux/types.h> #include <linux/kernel.h> #include <linux/sched.h> +#include <asm/ptrace.h> #include <linux/uaccess.h>
arch/sh/kernel/cpu/fpu.c +1 -0
@@ -3,6 +3,7 @@#include <asm/processor.h> #include <asm/fpu.h> #include <asm/traps.h> +#include <asm/ptrace.h> int init_fpu (struct task_struct *tsk) {
arch/sh/kernel/process.c +1 -0
@@ -5,6 +5,7 @@#include <linux/export.h> #include <linux/stackprotector.h> #include <asm/fpu.h> +#include <asm/ptrace.h> struct kmem_cache *task_xstate_cachep =NULL ;unsigned int xstate_size;
drivers/oprofile/cpu_buffer.c +2 -0
@@ -23,6 +23,8 @@#include <linux/oprofile.h> #include <linux/errno.h> +#include <asm/ptrace.h> +#include "event_buffer.h" #include "cpu_buffer.h" #include "buffer_sync.h"
include/linux/sched.h +0 -1
@@ -22,7 +22,6 @@#include <linux/preempt.h> #include <asm/page.h> -#include <asm/ptrace.h> #include <linux/smp.h> #include <linux/sem.h>
Signature · 1 line
2.7.4