summaryrefslogtreecommitdiffstats
path: root/kernel
Commit message (Collapse)AuthorAgeFilesLines
* CFS: Fix missing digit off in wmult tableThomas Gleixner2007-07-131-1/+1
| | | | | | | | | Roman Zippel noticed another inconsistency of the wmult table. wmult[16] has a missing digit. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'splice-2.6.23' of git://git.kernel.dk/data/git/linux-2.6-blockLinus Torvalds2007-07-131-2/+4
|\ | | | | | | | | | | | | | | * 'splice-2.6.23' of git://git.kernel.dk/data/git/linux-2.6-block: splice: fix offset mangling with direct splicing (sendfile) security: revalidate rw permissions for sys_splice and sys_vmsplice relay: fixup kerneldoc comment relay: fix bogus cast in subbuf_splice_actor()
| * relay: fixup kerneldoc commentTom Zanussi2007-07-131-1/+1
| | | | | | | | | | | | | | Change comment from kerneldoc to normal. Signed-off-by: Tom Zanussi <zanussi@us.ibm.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * relay: fix bogus cast in subbuf_splice_actor()Tom Zanussi2007-07-131-1/+3
| | | | | | | | | | | | | | | | | | The current code that sets the read position in subbuf_splice_actor may give erroneous results if the buffer size isn't a power of 2. This patch fixes the problem. Signed-off-by: Tom Zanussi <zanussi@us.ibm.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-schedLinus Torvalds2007-07-132-19/+13
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched: [PATCH] sched: small topology.h cleanup [PATCH] sched: fix show_task()/show_tasks() output [PATCH] sched: remove stale version info from kernel/sched_debug.c [PATCH] sched: allow larger granularity [PATCH] sched: fix prio_to_wmult[] for nice 1 [ I re-did the commits to get rid of some bogus merge commit that Ingo had. - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * [PATCH] sched: fix show_task()/show_tasks() outputIngo Molnar2007-07-131-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix show_task()/show_tasks() output: - there's no sibling info anymore - the fields were not aligned properly with the description - get rid of the lazy-TLB output: it's been quite some time since we last had a bug there, and when we had a bug it wasnt helped a bit by this debug output. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * [PATCH] sched: remove stale version info from kernel/sched_debug.cIngo Molnar2007-07-131-1/+1
| | | | | | | | | | | | | | | | kernel/sched_debug.c referred to CFS -v20, but there's no CFS versioning needed within the upstream kernel. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * [PATCH] sched: allow larger granularityIngo Molnar2007-07-131-1/+1
| | | | | | | | | | | | | | | | Allow granularity up to 100 msecs, instead of 10 msecs. (needed on larger boxes) Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * [PATCH] sched: fix prio_to_wmult[] for nice 1Mike Galbraith2007-07-131-1/+1
| | | | | | | | | | | | | | | | | | There's a typo in the values in prio_to_wmult[] for nice level 1. While it did not cause bad CPU distribution, but caused more rescheduling between nice-0 and nice-1 tasks than necessary. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge branch 'for-linus' of ↵Linus Torvalds2007-07-121-0/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6: security: unexport mmap_min_addr SELinux: use SECINITSID_NETMSG instead of SECINITSID_UNLABELED for NetLabel security: Protection for exploiting null dereference using mmap SELinux: Use %lu for inode->i_no when printing avc SELinux: allow preemption between transition permission checks selinux: introduce schedule points in policydb_destroy() selinux: add selinuxfs structure for object class discovery selinux: change sel_make_dir() to specify inode counter. selinux: rename sel_remove_bools() for more general usage. selinux: add support for querying object classes and permissions from the running policy
| * | security: Protection for exploiting null dereference using mmapEric Paris2007-07-111-0/+10
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new security check on mmap operations to see if the user is attempting to mmap to low area of the address space. The amount of space protected is indicated by the new proc tunable /proc/sys/vm/mmap_min_addr and defaults to 0, preserving existing behavior. This patch uses a new SELinux security class "memprotect." Policy already contains a number of allow rules like a_t self:process * (unconfined_t being one of them) which mean that putting this check in the process class (its best current fit) would make it useless as all user processes, which we also want to protect against, would be allowed. By taking the memprotect name of the new class it will also make it possible for us to move some of the other memory protect permissions out of 'process' and into the new class next time we bump the policy version number (which I also think is a good future idea) Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Acked-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
* / sysfs: kill unnecessary attribute->ownerTejun Heo2007-07-112-7/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | sysfs is now completely out of driver/module lifetime game. After deletion, a sysfs node doesn't access anything outside sysfs proper, so there's no reason to hold onto the attribute owners. Note that often the wrong modules were accounted for as owners leading to accessing removed modules. This patch kills now unnecessary attribute->owner. Note that with this change, userland holding a sysfs node does not prevent the backing module from being unloaded. For more info regarding lifetime rule cleanup, please read the following message. http://article.gmane.org/gmane.linux.kernel/510293 (tweaked by Greg to not delete the field just yet, to make it easier to merge things properly.) Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* pipe: change the ->pin() operation to ->confirm()Jens Axboe2007-07-101-1/+1
| | | | | | | | | | | | The name 'pin' was badly chosen, it doesn't pin a pipe buffer in the most commonly used sense in the kernel. So change the name to 'confirm', after debating this issue with Hugh Dickins a bit. A good return from ->confirm() means that the buffer is really there, and that the contents are good. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* relay: use splice_to_pipe() instead of open-coding the pipe loopJens Axboe2007-07-101-91/+55
| | | | | | | | | | It cleans up the relay splice implementation a lot, and gets rid of a lot of internal pipe knowledge that should not be in there. Plus fixes for padding and partial first page (and lots more) from Tom Zanussi. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* splice: divorce the splice structure/function definitions from the pipe headerJens Axboe2007-07-101-1/+1
| | | | | | | | | We need to move even more stuff into the header so that folks can use the splice_to_pipe() implementation instead of open-coding a lot of pipe knowledge (see relay implementation), so move to our own header file finally. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* splice: relay supportTom Zanussi2007-07-101-50/+191
| | | | Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* sched: add CFS creditsIngo Molnar2007-07-091-0/+6
| | | | | | | | | | | add credits for recent major scheduler contributions: Con Kolivas, for pioneering the fair-scheduling approach Peter Williams, for smpnice Mike Galbraith, for interactivity tuning of CFS Srivatsa Vaddagiri, for group scheduling enhancements Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: clean up sleep_on() APIsIngo Molnar2007-07-091-30/+41
| | | | | | | | | clean up the sleep_on() APIs: - do not use fastcall - replace fragile macro magic with proper inline functions Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: style cleanupsIngo Molnar2007-07-091-6/+7
| | | | | | | 4 small style cleanups to sched.c: checkpatch.pl is now happy about the totality of sched.c [ignoring false positives] - yay! ;-) Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: do not set softirqs to nice +19Ingo Molnar2007-07-091-1/+0
| | | | | | | | | do not set softirqs to nice +19. _If_ for whatever reason we missed to process some high-prio softirq and woke up ksoftirqd, we should give it a fair chance to actually get some work done, even if the system is under load. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: scheduler debugging, coreIngo Molnar2007-07-091-0/+275
| | | | | | | scheduler debugging core: implement /proc/sched_debug and /proc/<PID>/sched files for scheduler debugging. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: add CFS debug sysctlsIngo Molnar2007-07-091-0/+80
| | | | | | | add CFS debug sysctls: only tweakable if SCHED_DEBUG is enabled. This allows for faster debugging of scheduler problems. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: remove unused rq types from sched.cIngo Molnar2007-07-091-16/+0
| | | | | | | remove unused rq types from sched.c, now that we switched over to CFS. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: remove interactivity typesIngo Molnar2007-07-091-89/+12
| | | | | | | remove now unused interactivity-heuristics related defined and types of the old scheduler. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: clean up include files in sched.cIngo Molnar2007-07-091-2/+2
| | | | | | clean up include files in sched.c, they were still old-style <asm/>. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: update delay-accounting to use CFS's precise statsBalbir Singh2007-07-094-9/+9
| | | | | | update delay-accounting to use CFS's precise stats. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: turn on the use of unstable eventsIngo Molnar2007-07-091-7/+14
| | | | | | make use of sched-clock-unstable events. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: x86, track TSC-unstable eventsIngo Molnar2007-07-091-0/+7
| | | | | | | | track TSC-unstable events and propagate it to the scheduler code. Also allow sched_clock() to be used when the TSC is unstable, the rq_clock() wrapper creates a reliable clock out of it. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: cfs core codeIngo Molnar2007-07-091-774/+758
| | | | | | | | | | | | | | | | apply the CFS core code. this change switches over the scheduler core to CFS's modular design and makes use of kernel/sched_fair/rt/idletask.c to implement Linux's scheduling policies. thanks to Andrew Morton and Thomas Gleixner for lots of detailed review feedback and for fixlets. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Mike Galbraith <efault@gmx.de> Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com> Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
* sched: remove the sleep-bonus interactivity codeIngo Molnar2007-07-091-46/+1
| | | | | | | | | remove the sleep-bonus interactivity code from the core scheduler. scheduling policy is implemented in the policy modules, and CFS does not need such type of heuristics. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: remove expired_starving()Ingo Molnar2007-07-091-22/+1
| | | | | | | | | remove the expired_starving() heuristics from the core scheduler. CFS does not need it, and this did not really work well in practice anyway, due to the rq->nr_running multiplier to STARVATION_LIMIT. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: remove sleep_typeIngo Molnar2007-07-091-89/+2
| | | | | | | | remove the sleep_type heuristics from the core scheduler - scheduling policy is implemented in the scheduling-policy modules. (and CFS does not use this type of sleep-type heuristics) Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: cfs, add load-calculation methodsIngo Molnar2007-07-091-18/+120
| | | | | | add the new load-calculation methods of CFS. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: clean up __normal_prio() positionIngo Molnar2007-07-091-29/+29
| | | | | | | | clean up: move __normal_prio() in head of normal_prio(). no code changed. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: cleanup: move dequeue/enqueue_task()Ingo Molnar2007-07-091-38/+38
| | | | | | | cleanup: move dequeue/enqueue_task() to a more logical place, to not split up __normal_prio()/normal_prio(). Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: move around resched_task()Ingo Molnar2007-07-091-52/+52
| | | | | | | move resched_task()/resched_cpu() into the 'public interfaces' section of sched.c, for use by kernel/sched_fair/rt/idletask.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: clean up the rt priority macrosIngo Molnar2007-07-092-6/+18
| | | | | | clean up the rt priority macros, pointed out by Andrew Morton. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: add cfs_rq opsIngo Molnar2007-07-091-0/+12
| | | | | | | | add the set_task_cfs_rq() abstraction needed by CONFIG_FAIR_GROUP_SCHED. (not activated yet) Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: make posix-cpu-timers use CFS's accounting informationIngo Molnar2007-07-092-40/+30
| | | | | | update the posix-cpu-timers code to use CFS's CPU accounting information. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: add rq_clock()/__rq_clock()Ingo Molnar2007-07-091-0/+46
| | | | | | | | add rq_clock()/__rq_clock(), a robust wrapper around sched_clock(), used by CFS. It protects against common type of sched_clock() problems (caused by hardware): time warps forwards and backwards. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: cfs rq data typesIngo Molnar2007-07-091-6/+78
| | | | | | | | | add the CFS rq data types to sched.c. (the old scheduler fields are still intact, they are removed by a later patch) Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: cfs core, kernel/sched_idletask.cIngo Molnar2007-07-091-0/+71
| | | | | | | | | add kernel/sched_idletask.c - which implements the idle thread scheduling class. This further simplifies sched.c (under CFS), for example a number of 'if (p == rq->idle)' type of special-cases can be removed from sched.c, and schedule() gets simpler too. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: cfs core, kernel/sched_rt.cIngo Molnar2007-07-091-0/+255
| | | | | | | add kernel/sched_rt.c: SCHED_FIFO/SCHED_RR support. The behavior and semantics of SCHED_FIFO/SCHED_RR tasks is unchanged. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: cfs core, kernel/sched_fair.cIngo Molnar2007-07-091-0/+1131
| | | | | | | | | | | | | | | | | | | add kernel/sched_fair.c - which implements the bulk of CFS's behavioral changes for SCHED_OTHER tasks. see Documentation/sched-design-CFS.txt about details. Authors: Ingo Molnar <mingo@elte.hu> Dmitry Adamushko <dmitry.adamushko@gmail.com> Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> Mike Galbraith <efault@gmx.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Mike Galbraith <efault@gmx.de> Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com> Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
* sched: move code into kernel/sched_stats.hIngo Molnar2007-07-092-233/+236
| | | | | | | | | create sched_stats.h and move sched.c schedstats code into it. This cleans up sched.c a bit. no code changes are caused by this patch. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: add init_idle_bootup_task()Ingo Molnar2007-07-091-0/+5
| | | | | | | | add the init_idle_bootup_task() callback to the bootup thread, unused at the moment. (CFS will use it to switch the scheduling class of the boot thread to the idle class) Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: remove sched_exit()Ingo Molnar2007-07-092-32/+0
| | | | | | | | | remove sched_exit(): the elaborate dance of us trying to recover timeslices given to child tasks never really worked. CFS does not need it either. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: uninline set_task_cpu()Ingo Molnar2007-07-091-0/+6
| | | | | | uninline set_task_cpu(): CFS will add more code to it. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: zap the migration init / cache-hot balancing codeIngo Molnar2007-07-091-481/+0
| | | | | | | | | | | | | | | | | | | | | | the SMP load-balancer uses the boot-time migration-cost estimation code to attempt to improve the quality of balancing. The reason for this code is that the discrete priority queues do not preserve the order of scheduling accurately, so the load-balancer skips tasks that were running on a CPU 'recently'. this code is fundamental fragile: the boot-time migration cost detector doesnt really work on systems that had large L3 caches, it caused boot delays on large systems and the whole cache-hot concept made the balancing code pretty undeterministic as well. (and hey, i wrote most of it, so i can say it out loud that it sucks ;-) under CFS the same purpose of cache affinity can be achieved without any special cache-hot special-case: tasks are sorted in the 'timeline' tree and the SMP balancer picks tasks from the left side of the tree, thus the most cache-cold task is balanced automatically. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sched: rename idle_type/SCHED_IDLEIngo Molnar2007-07-091-30/+30
| | | | | | | | enum idle_type (used by the load-balancer) clashes with the SCHED_IDLE name that we want to introduce. 'CPU_IDLE' instead of 'SCHED_IDLE' is more descriptive as well. Signed-off-by: Ingo Molnar <mingo@elte.hu>