aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
Commit message (Collapse)AuthorAge
* rt domain: evil hack to avoid recursive hrtimer lock acquisitionBjoern B. Brandenburg2009-05-04
| | | | | | | | This is a really dirty hack, but works for now since our real-time tasks do not use hrtimer_wakeup(). The need for this will go away when we port since newer versions of the Linux kernel allow timers to be activated directly in the scheduler.
* hrtimer: remove unused flag of pull implementationBjoern B. Brandenburg2009-05-03
| | | | The flag was racy anyway and could not be used safely.
* litmus core: add dump-trace-buffer magic sysrqBjoern B. Brandenburg2009-05-02
| | | | Pump stuff from the TRACE() buffer to printk() on demand.
* litmus tracing: expose scheduling overheadBjoern B. Brandenburg2009-04-22
| | | | | move the switch_from/switch_to trace macros so that the scheduling overhead shows up more clearly in the traces
* fixup commit: missing hrtimer bitsBjoern B. Brandenburg2009-04-22
|
* hrtimer: add support for starting timers on remote CPUsBjoern B. Brandenburg2009-04-22
| | | | | This depends on the ability to send the special 'pull_timers' IPI even with IRQs disabled.
* litmus core: trace task state on wake ups of RT tasks.Bjoern B. Brandenburg2009-04-19
| | | | Helps when debugging wake-up related crashes.
* move task present flag from PFAIR to Litmus coreBjoern B. Brandenburg2009-04-02
| | | | | Other quantum-based plugins also require the present flag. Hence, move it to the core data structure
* LITMUS: export CPU stagger offsetBjoern B. Brandenburg2008-11-06
| | | | Let scheduler plugins inquire stagger offsets.
* sched_trace: new implementationBjoern B. Brandenburg2008-10-06
| | | | | This provides and hooks up a new made-from-scratch sched_trace() implementation based on Feather-Trace and ftdev.
* Feather-Trace: make SCHED only depend on nextBjoern B. Brandenburg2008-05-22
|
* record task type in feather trace time stampBjoern B. Brandenburg2008-05-22
|
* Add Feather-Trace support.Bjoern B. Brandenburg2008-05-22
| | | | | | | | - TICK - SCHED1 - SCHED2 - RELEASE - CXS
* TRACE(): facilitate debuggingBjoern B. Brandenburg2008-05-11
| | | | | | | - don't deadlock on a runqueue lock in case of a bug inside the scheduler - write printk() messages to TRACE() - tell user of TRACE() buffer
* two fixes and some logging improvementBjoern B. Brandenburg2008-05-10
| | | | | | - remove outdated comment - reorder stack_in_use marker to be in front of finish_lock_switch() - add TRACE()s to try_to_wake_up()
* LITMUS: disable Linux scheduler optimizationBjoern B. Brandenburg2008-05-05
| | | | | This caused LITMUS^RT real-time tasks to be missed, which in turn caused all kinds of inconsistent state.
* LITMUS: avoid using the same stack on two CPUs in global schedulersBjoern B. Brandenburg2008-05-04
| | | | | This change fixes a race where a job could be executed on more than one CPU, which to random crashes.
* LITMUS: don't let real-time tasks fork real-time tasks.Bjoern B. Brandenburg2008-05-03
| | | | The forked task will be a best-effort task.
* LITMUS: add framework for carrying out jobs after dropping rq locksBjoern B. Brandenburg2008-05-02
| | | | | Many things can't be done from within the scheduler. This framework should make it easer to defer them.
* Merge commit 'jupiter/debug' into debugBjoern B. Brandenburg2008-05-02
|\
| * LITMUS: rework job migration codeBjoern B. Brandenburg2008-05-02
| | | | | | | | | | The old version had a significant window for races with interrupt handlers executing on other CPUs.
* | LITMUS: don't let real-time tasks migrate by themselvesBjoern B. Brandenburg2008-05-02
|/ | | | | | | | A proper real-time migration works as follows: 1) transition to best-effort task 2) migrate to target CPU 3) update real-time parameters 4) transition to real-time task
* SRP: improve robustnessBjoern B. Brandenburg2008-05-01
| | | | | | | | The SRP implementation did not correctly address various suspension-related scenarios correctly. Now the need for SRP blocking is tested on each scheduling event. This ensures mutual exclusion under the SRP even in the face of unexpected suspensions, for example due to IO.
* add synchronized quanta supportJohn M. Calandrino2008-04-30
| | | | | Modify offsets in such a way that quantum boundaries occur either synchronized or staggered (based on the kernel command line).
* add complete_n() call to the completion API.Bjoern B. Brandenburg2008-02-19
| | | | | This is usefule for releasing exactly n tasks without having to call compete() repeatedly.
* LITMUS 2008: Initial PortBjoern B. Brandenburg2008-02-13
| | | | | This introduces the core changes ported from LITMUS 2007. The kernel seems to work under QEMU, but many bugs probably remain.
* lockdep: fix kernel crash on module unloadArjan van de Ven2008-01-24
| | | | | | | | | | | | | | | | | | | | Michael Wu noticed in his lkml post at http://marc.info/?l=linux-kernel&m=119396182726091&w=2 that certain wireless drivers ended up having their name in module memory, which would then crash the kernel on module unload. The patch he proposed was a bit clumsy in that it increased the size of a lockdep entry significantly; the patch below tries another approach, it checks, on module teardown, if the name of a class is in module space and then zaps the class. This is very similar to what we already do with keys that are in module space. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-schedLinus Torvalds2008-01-22
|\ | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched: sched: group scheduler, set uid share fix
| * sched: group scheduler, set uid share fixIngo Molnar2008-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | setting cpu share to 1 causes hangs, as reported in: http://bugzilla.kernel.org/show_bug.cgi?id=9779 as the default share is 1024, the values of 0 and 1 can indeed cause problems. Limit it to 2 or higher values. These values can only be set by the root user - but still it makes sense to protect against nonsensical values. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | rcu: fix section mismatchRandy Dunlap2008-01-22
|/ | | | | | | | | | | | | rcu_online_cpu() should be __cpuinit instead of __devinit. WARNING: vmlinux.o(.text+0x4b6d5): Section mismatch: reference to .init.text: (between 'rcu_cpu_notify' and 'wakeme_after_rcu') Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Sam Ravnborg <sam@ravnborg.org> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* timer: fix section mismatchRandy Dunlap2008-01-21
| | | | | | | | | | | | | | | The caller is __cpuinit. Also, this code block and its caller are inside #ifdef CONFIG_HOTPLUG_CPU blocks, so this code should reflect that config symbol's usage. WARNING: vmlinux.o(.text+0x4252f): Section mismatch: reference to .init.text: (between 'timer_cpu_notify' and 'msleep') Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@akpm@linux-foundation.org>
* hrtimer: fix section mismatchRandy Dunlap2008-01-21
| | | | | | | | | | | | | | | Fix section mismatch in hrtimer.c: WARNING: vmlinux.o(.text+0x50c61): Section mismatch: reference to .init.text: (between 'hrtimer_cpu_notify' and 'down_read_trylock') Noticed by Johannes Berg and confirmed by Sam Ravnborg. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@akpm@linux-foundation.org>
* Fix unbalanced helper_lock in kernel/kmod.cNigel Cunningham2008-01-17
| | | | | | | | | | | call_usermodehelper_exec() has an exit path that can leave the helper_lock() call at the top of the routine unbalanced. The attached patch fixes this issue. Signed-off-by: Nigel Cunningham <nigel@tuxonice.net> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* lockdep: fix workqueue creation API lockdep interactionJohannes Berg2008-01-16
| | | | | | | | | | | | | | | | | | | | Dave Young reported warnings from lockdep that the workqueue API can sometimes try to register lockdep classes with the same key but different names. This is not permitted in lockdep. Unfortunately, I was unaware of that restriction when I wrote the code to debug workqueue problems with lockdep and used the workqueue name as the lockdep class name. This can obviously lead to the problem if the workqueue name is dynamic. This patch solves the problem by always using a constant name for the workqueue's lockdep class, namely either the constant name that was passed in or a string consisting of the variable name. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
* lockdep: fix internal double unlock during self-testNick Piggin2008-01-16
| | | | | | | | | | Lockdep, during self-test (when it was simulating double unlocks) was sometimes unconditionally unlocking a spinlock when it had not been locked. This won't work for ticket locks. Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
* modules: de-mutex more symbol lookup paths in the module codeRusty Russell2008-01-14
| | | | | | | | | | | | | | | Kyle McMartin reports sysrq_timer_list_show() can hit the module mutex from hard interrupt context. These paths don't need to though, since we long ago changed all the module list manipulation to occur via stop_machine(). Disabling preemption is enough. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Ingo Molnar <mingo@elte.hu> Cc: Kyle McMartin <kyle@mcmartin.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'release' of ↵Linus Torvalds2008-01-13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: pnpacpi: print resource shortage message only once PM: ACPI and APM must not be enabled at the same time ACPI: apply quirk_ich6_lpc_acpi to more ICH8 and ICH9 ACPICA: fix acpi_serialize hang regression ACPI : Not register gsi for PCI IDE controller in legacy mode ACPI: Reintroduce run time configurable max_cstate for !CPU_IDLE case ACPI: Make sysfs interface in ACPI power optional. ACPI: EC: Enable boot EC before bus_scan increase PNP_MAX_PORT to 40 from 24
| * Pull bugzilla-9194 into release branchLen Brown2008-01-11
| |\
| | * PM: ACPI and APM must not be enabled at the same timeLen Brown2008-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ACPI and APM used "pm_active" to guarantee that they would not be simultaneously active. But pm_active was recently moved under CONFIG_PM_LEGACY, so that without CONFIG_PM_LEGACY, pm_active became a NOP -- allowing ACPI and APM to both be simultaneously enabled. This caused unpredictable results, including boot hangs. Further, the code under CONFIG_PM_LEGACY is scheduled for removal. So replace pm_active with pm_flags. pm_flags depends only on CONFIG_PM, which is present for both CONFIG_APM and CONFIG_ACPI. http://bugzilla.kernel.org/show_bug.cgi?id=9194 Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
* | | remove task_ppid_nr_nsRoland McGrath2008-01-13
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | task_ppid_nr_ns is called in three places. One of these should never have called it. In the other two, using it broke the existing semantics. This was presumably accidental. If the function had not been there, it would have been much more obvious to the eye that those patches were changing the behavior. We don't need this function. In task_state, the pid of the ptracer is not the ppid of the ptracer. In do_task_stat, ppid is the tgid of the real_parent, not its pid. I also moved the call outside of lock_task_sighand, since it doesn't need it. In sys_getppid, ppid is the tgid of the real_parent, not its pid. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | show_task: real_parentRoland McGrath2008-01-09
| | | | | | | | | | | | | | | | | | | | The show_task function invoked by sysrq-t et al displays the pid and parent's pid of each task. It seems more useful to show the actual process hierarchy here than who is using ptrace on each process. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | futex: Prevent stale futex owner when interrupted/timeoutThomas Gleixner2008-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Roland Westrelin did a great analysis of a long standing thinko in the return path of futex_lock_pi. While we fixed the lock steal case long ago, which was easy to trigger, we never had a test case which exposed this problem and stupidly never thought about the reverse lock stealing scenario and the return to user space with a stale state. When a blocked tasks returns from rt_mutex_timed_locked without holding the rt_mutex (due to a signal or timeout) and at the same time the task holding the futex is releasing the futex and assigning the ownership of the futex to the returning task, then it might happen that a third task acquires the rt_mutex before the final rt_mutex_trylock() of the returning task happens under the futex hash bucket lock. The returning task returns to user space with ETIMEOUT or EINTR, but the user space futex value is assigned to this task. The task which acquired the rt_mutex fixes the user space futex value right after the hash bucket lock has been released by the returning task, but for a short period of time the user space value is wrong. Detailed description is available at: https://bugzilla.redhat.com/show_bug.cgi?id=400541 The fix for this is the same as we do when the rt_mutex was acquired by a higher priority task via lock stealing from the designated new owner. In that case we already fix the user space value and the internal pi_state up before we return. This mechanism can be used to fixup the above corner case as well. When the returning task, which failed to acquire the rt_mutex, notices that it is the designated owner of the futex, then it fixes up the stale user space value and the pi_state, before returning to user space. This happens with the futex hash bucket lock held, so the task which acquired the rt_mutex is guaranteed to be blocked on the hash bucket lock. We can access the rt_mutex owner, which gives us the pid of the new owner, safely here as the owner is not able to modify (release) it while waiting on the hash bucket lock. Rename the "curr" argument of fixup_pi_state_owner() to "newowner" to avoid confusion with current and add the check for the stale state into the failure path of rt_mutex_trylock() in the return path of unlock_futex_pi(). If the situation is detected use fixup_pi_state_owner() to assign everything to the owner of the rt_mutex. Pointed-out-and-tested-by: Roland Westrelin <roland.westrelin@sun.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | vmcoreinfo: add the array length of "free_list" for filtering free pagesKen'ichi Ohmichi2008-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the array length of "free_area.free_list" to the vmcoreinfo data so that makedumpfile (dump filtering command) can exclude all free pages in linux-2.6.24. makedumpfile creates a small dumpfile by excluding unnecessary pages for the analysis. To distinguish unnecessary pages, makedumpfile gets the vmcoreinfo data which has the minimum debugging information only for dump filtering. In 2.6.24-rc1 or later, the free_area.free_list is an array which has one list for each migrate types instead of a single list. makedumpfile needs the array length of "free_area.free_list" and the vmcoreinfo data should contain it. Signed-off-by: Huang Ying <ying.huang@intel.com> Tested-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> Acked-by: Simon Horman <horms@verge.net.au> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | acct: real_parent ppidRoland McGrath2008-01-07
| | | | | | | | | | | | | | | | | | The ac_ppid field reported in process accounting records should match what getppid() would have returned to that process, regardless of whether a debugger is attached. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-schedLinus Torvalds2008-01-03
|\ \ | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched: sched: fix gcc warnings
| * | sched: fix gcc warningsIngo Molnar2007-12-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Meelis Roos reported these warnings on sparc64: CC kernel/sched.o In file included from kernel/sched.c:879: kernel/sched_debug.c: In function 'nsec_high': kernel/sched_debug.c:38: warning: comparison of distinct pointer types lacks a cast the debug check in do_div() is over-eager here, because the long long is always positive in these places. Mark this by casting them to unsigned long long. no change in code output: text data bss dec hex filename 51471 6582 376 58429 e43d sched.o.before 51471 6582 376 58429 e43d sched.o.after md5: 7f7729c111f185bf3ccea4d542abc049 sched.o.before.asm 7f7729c111f185bf3ccea4d542abc049 sched.o.after.asm Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | | Fix kernel/ptrace.c compile problem (missing "may_attach()")Linus Torvalds2008-01-02
| | | | | | | | | | | | | | | | | | | | | The previous commit missed one use of "may_attach()" that had been renamed to __ptrace_may_attach(). Tssk, tssk, Al. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | restrict reading from /proc/<pid>/maps to those who share ->mm or can ptrace pidAl Viro2008-01-02
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Contents of /proc/*/maps is sensitive and may become sensitive after open() (e.g. if target originally shares our ->mm and later does exec on suid-root binary). Check at read() (actually, ->start() of iterator) time that mm_struct we'd grabbed and locked is - still the ->mm of target - equal to reader's ->mm or the target is ptracable by reader. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Rik van Riel <riel@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | [SERIAL]: Fix section mismatches in Sun serial console drivers.David S. Miller2007-12-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're exporting an __init function, oops :-) The core issue here is that add_preferred_console() is marked as __init, this makes it impossible to invoke this thing from a driver probe routine which is what the Sparc serial drivers need to do. There is no harm in dropping the __init marker. This code will actually work properly when invoked from a modular driver, except that init will probably not pick up the console change without some other support code. Then we can drop the __init from sunserial_console_match() and we're no longer exporting an __init function to modules. Signed-off-by: David S. Miller <davem@davemloft.net>
* | Modules: fix memory leak of module namesGreg Kroah-Hartman2007-12-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the change in kobject name handling, the module kobject needs to have a null release function to ensure that the name it previously set will be properly cleaned up. All of this wierdness goes away in 2.6.25 with the rework of the kobject name and cleanup logic, but this is required for 2.6.24. Thanks to Alexey Dobriyan for finding the problem, and to Kay Sievers for pointing out the simple way to fix it after I tried many complex ways. Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>