summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'timers/range-hrtimers' into v28-range-hrtimers-for-linus-v2Thomas Gleixner2008-10-2230-379/+710
|\ | | | | | | | | | | | | | | Conflicts: kernel/time/tick-sched.c Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * hrtimers: add missing docbook comments to struct hrtimerThomas Gleixner2008-10-201-2/+7
| | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * hrtimers: simplify hrtimer_peek_ahead_timers()Thomas Gleixner2008-10-201-9/+3
| | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * hrtimers: fix docbook commentsThomas Gleixner2008-10-201-2/+2
| | | | | | | | | | | | | | hrtimer_start() and hrtimer_start_range_ns() handle relative and absolute timers. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * Merge branch 'for-linus' of ↵Thomas Gleixner2008-10-206399-205995/+398919
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/arjan/linux-2.6-hrtimer into timers/range-hrtimers
| | * Merge commit 'linus/master' into merge-linusArjan van de Ven2008-10-176399-205995/+398917
| | |\ | | | | | | | | | | | | | | | | | | | | Conflicts: arch/x86/kvm/i8254.c
| | * | DECLARE_PER_CPU needs linux/percpu.hStephen Rothwell2008-10-151-0/+2
| | | | | | | | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
| | * | rangetimers: fix the bug reported by Ingo for realArjan van de Ven2008-10-131-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and please hand me a brown paper bag (thanks to Thomas for pointing out this very obvious bug) Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| | * | rangetimer: fix BUG_ON reported by IngoArjan van de Ven2008-10-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a small race/chance that, while hrtimers are enabled globally, they're later not enabled when we're calling the hrtimer_interrupt() function, which then BUG_ON()'s for that. This patch closes that race/gap. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | | hrtimers: fix typoIngo Molnar2008-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by Thomas Gleixner. This caused the lockups i've bisected back to the range-hrtimers tree. Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * | | Merge branch 'master' of ↵Ingo Molnar2008-10-094-2/+55
| |\ \ \ | | |/ / | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/arjan/linux-2.6-hrtimer into timers/range-hrtimers
| | * | rangetimer: fix x86 build failure for the !HRTIMERS caseArjan van de Ven2008-10-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the timer peek function was on the wrong side of an ifdef, breaking for the !HRTIMERs case. Just provide an empty inline for that case since it doesn't make sense in that scenario. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| | * | select: fix alpha OSF wrapperArjan van de Ven2008-10-061-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... alpha calls the core select code from inside it's architecture code for emulating OSF; this patch makes it compile again Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| | * | hrtimer: peek at the timer queue just before going idleArjan van de Ven2008-09-113-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of going idle, we already look at the time of the next timer event to determine which C-state to select etc. This patch adds functionality that causes the timers that are past their soft expire time, to fire at this time, before we calculate the next wakeup time. This functionality will thus avoid wakeups by running timers before going idle rather than specially waking up for it. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| | * | hrtimer: make the futex() system call use the per process slack valueArjan van de Ven2008-09-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the futex() system call use the per process slack value; with this users are able to externally control existing applications to reduce the wakeup rate. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| | * | hrtimer: make the nanosleep() syscall use the per process slackArjan van de Ven2008-09-111-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the nanosleep() system call use the per process slack value; with this users are able to externally control existing applications to reduce the wakeup rate. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | | select: fix alpha OSF wrapperArjan van de Ven2008-10-071-6/+7
| |/ / | | | | | | | | | | | | | | | | | | | | | ... alpha calls the core select code from inside it's architecture code for emulating OSF; this patch makes it compile again Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * | hrtimer: fix signed/unsigned bug in slack estimatorArjan van de Ven2008-09-071-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the slack estimator used unsigned math; however for very short delay it's possible that by the time you calculate the timeout, it's already passed and you get a negative time/slack... in an unsigned variable... which then gets turned into a 100 msec delay rather than zero. This patch fixes this by using a signed typee in the right places. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | hrtimer: show the timer ranges in /proc/timer_listArjan van de Ven2008-09-071-1/+3
| | | | | | | | | | | | | | | | | | | | | to help debugging and visibility of timer ranges, show them in the existing timer list in /proc/timer_list Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | hrtimer: incorporate feedback from Peter ZijlstraArjan van de Ven2008-09-072-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | (based on lkml review) * use rt_task() * task_nice() has a sign Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | hrtimer: add a hrtimer_start_range() functionArjan van de Ven2008-09-072-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | this patch adds a _range version of hrtimer_start() so that range timers can be created; the hrtimer_start() function is just a wrapper around this. In addition, hrtimer_start_expires() will now preserve existing ranges. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | hrtimer: another build fixArjan van de Ven2008-09-061-13/+13
| | | | | | | | | | | | | | | | | | More randconfig testing Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | hrtimer: fix build bug found by IngoArjan van de Ven2008-09-061-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in some randconfig configurations, hrtimers are used even though the hrtimer config if off; and it broke the build due to some of the new functions being on the wrong side of the ifdef. This patch moves the functions to the other side of the ifdef, fixing the build bug. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | hrtimer: make select() and poll() use the hrtimer range featureArjan van de Ven2008-09-051-2/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the select() and poll() hrtimers use the new range feature and settings from the task struct. In addition, this includes the estimate_accuracy() function that Linus posted to lkml, but changed entirely based on other peoples lkml feedback. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | hrtimer: create a "timer_slack" field in the task structArjan van de Ven2008-09-055-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to be able to control the default "rounding" that is used by select() and poll() and friends. This is a per process property (so that we can have a "nice" like program to start certain programs with a looser or stricter rounding) that can be set/get via a prctl(). For this purpose, a field called "timer_slack_ns" is added to the task struct. In addition, a field called "default_timer_slack"ns" is added so that tasks easily can temporarily to a more/less accurate slack and then back to the default. The default value of the slack is set to 50 usec; this is significantly less than 2.6.27's average select() and poll() timing error but still allows the kernel to group timers somewhat to preserve power behavior. Applications and admins can override this via the prctl() Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | hrtimer: turn hrtimers into range timersArjan van de Ven2008-09-052-5/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this patch turns hrtimers into range timers; they have 2 expire points 1) the soft expire point 2) the hard expire point the kernel will do it's regular best effort attempt to get the timer run at the hard expire point. However, if some other time fires after the soft expire point, the kernel now has the freedom to fire this timer at this point, and thus grouping the events and preventing a power-expensive wakeup in the future. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | hrtimer: rename the "expires" struct member to avoid accidental usageArjan van de Ven2008-09-051-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | To catch code that still touches the "expires" memory directly, rename it to have the compiler complain rather than get nasty, hard to explain, runtime behavior Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | hrtimer: convert sound/ to the new hrtimer apisArjan van de Ven2008-09-051-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | In order to be able to do range hrtimers we need to use accessor functions to the "expire" member of the hrtimer struct. This patch converts sound/ to these accessors. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | hrtimer: convert s390 to the new hrtimer apisArjan van de Ven2008-09-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | In order to be able to do range hrtimers we need to use accessor functions to the "expire" member of the hrtimer struct. This patch converts s390 to these accessors. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | hrtimer: convert kvm-ia64 to the new hrtimer apisArjan van de Ven2008-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | In order to be able to do range hrtimers we need to use accessor functions to the "expire" member of the hrtimer struct. This patch converts KVM-ia64 to these accessors. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | hrtimer: convert powerpc/oprofile to the new hrtimer apisArjan van de Ven2008-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | In order to be able to do range hrtimers we need to use accessor functions to the "expire" member of the hrtimer struct. This patch converts powerpc/oprofile to these accessors. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | hrtimer: convert kernel/* to the new hrtimer apisArjan van de Ven2008-09-058-52/+47
| | | | | | | | | | | | | | | | | | | | | | | | In order to be able to do range hrtimers we need to use accessor functions to the "expire" member of the hrtimer struct. This patch converts kernel/* to these accessors. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | hrtimer: convert net::sched_cbq to the new hrtimer apisArjan van de Ven2008-09-051-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | In order to be able to do range hrtimers we need to use accessor functions to the "expire" member of the hrtimer struct. This patch converts sched_cbq to these accessors. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | hrtimer: convert timerfd to the new hrtimer apisArjan van de Ven2008-09-051-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | In order to be able to do range hrtimers we need to use accessor functions to the "expire" member of the hrtimer struct. This patch converts timerfd to these accessors. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | hrtimer: convert kvm to the new hrtimer apisArjan van de Ven2008-09-052-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | In order to be able to do range hrtimers we need to use accessor functions to the "expire" member of the hrtimer struct. This patch converts KVM to these accessors. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | hrtimer: add abstraction functions for accessing the "expires" memberArjan van de Ven2008-09-051-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to be able to turn hrtimers into range based, we need to provide accessor functions for getting to the "expires" ktime_t member of the struct hrtimer. This patch adds a set of accessors for this purpose: * hrtimer_set_expires * hrtimer_set_expires_tv64 * hrtimer_add_expires * hrtimer_add_expires_ns * hrtimer_get_expires * hrtimer_get_expires_tv64 * hrtimer_get_expires_ns * hrtimer_expires_remaining * hrtimer_start_expires No users of these new accessors are added yet; these follow in later patches. Hopefully this patch can even go into 2.6.27-rc so that the conversions will not have a bottleneck in -next Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | select: switch select() and poll() over to hrtimersArjan van de Ven2008-09-053-294/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With lots of help, input and cleanups from Thomas Gleixner This patch switches select() and poll() over to hrtimers. The core of the patch is replacing the "s64 timeout" with a "struct timespec end_time" in all the plumbing. But most of the diffstat comes from using the just introduced helpers: poll_select_set_timeout poll_select_copy_remaining timespec_add_safe which make manipulating the timespec easier and less error-prone. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * | select: add a poll specific struct to the restart_block unionThomas Gleixner2008-09-051-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with hrtimer poll/select, the signal restart data no longer is a single long representing a jiffies count, but it becomes a second/nanosecond pair that also needs to encode if there was a timeout at all or not. This patch adds a struct to the restart_block union for this purpose Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | select: add poll_select_set_timeout() and poll_select_copy_remaining() helpersThomas Gleixner2008-09-053-0/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds 2 helpers that will be used for the hrtimer based select/poll: poll_select_set_timeout() is a helper that takes a timeout (as a second, nanosecond pair) and turns that into a "struct timespec" that represents the absolute end time. This is a common operation in the many select() and poll() variants and needs various, common, sanity checks. poll_select_copy_remaining() is a helper that takes care of copying the remaining time to userspace, as select(), pselect() and ppoll() do. This function comes in both a natural and a compat implementation (due to datastructure differences). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | select: add a timespec_add_safe() functionThomas Gleixner2008-09-052-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the select() rework, it's important to be able to add timespec structures in an overflow-safe manner. This patch adds a timespec_add_safe() function for this which is similar in operation to ktime_add_safe(), but works on a struct timespec. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | select: Introduce a hrtimeout functionArjan van de Ven2008-09-052-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a schedule_hrtimeout() function, to be used by select() and poll() in a later patch. This function works similar to schedule_timeout() in most ways, but takes a timespec rather than jiffies. With a lot of contributions/fixes from Thomas Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | | NOHZ: fix thinko in the timer restart code pathThomas Gleixner2008-10-211-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit fb02fbc14d17837b4b7b02dbb36142c16a7bf208 (NOHZ: restart tick device from irq_enter()) solves the problem of stale jiffies when long running softirqs happen in a long idle sleep period, but it has a major thinko in it: When the interrupt which came in _is_ the timer interrupt which should expire ts->sched_timer then we cancel and rearm the timer _before_ it gets expired in hrtimer_interrupt() to the next period. That means the call back function is not called. This game can go on for ever :( Prevent this by making sure to only rearm the timer when the expiry time is more than one tick_period away. Otherwise keep it running as it is either already expired or will expiry at the right point to update jiffies. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Venkatesch Pallipadi <venkatesh.pallipadi@intel.com>
* | | binfmt_elf_fdpic: Update for cputime changes.Paul Mundt2008-10-201-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit f06febc96ba8e0af80bcc3eaec0a109e88275fac ("timers: fix itimer/ many thread hang") introduced a new task_cputime interface and subsequently only converted binfmt_elf over to it. This results in the build for binfmt_elf_fdpic blowing up given that p->signal->{u,s}time have disappeared from underneath us. Apply the same trivial fix from binfmt_elf to binfmt_elf_fdpic. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | mm: remove duplicated #include'sHuang Weiyi2008-10-202-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | Removed duplicated #include <linux/vmalloc.h> in mm/vmalloc.c and "internal.h" in mm/memory.c. Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | Export tiny shmem_file_setup for DRM-GEMHugh Dickins2008-10-202-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're trying to keep the !CONFIG_SHMEM tiny-shmem.c (using ramfs without swap) in synch with CONFIG_SHMEM shmem.c (and mpm is preparing patches to combine them). I was glad to see EXPORT_SYMBOL_GPL(shmem_file_setup) go into shmem.c, but why not support DRM-GEM when !CONFIG_SHMEM too? But caution says still depend on MMU, since !CONFIG_MMU is.. different. Signed-off-by: Hugh Dickins <hugh@veritas.com> Acked-by: Matt Mackall <mpm@selenic.com> Acked-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | misc: replace remaining __FUNCTION__ with __func__Harvey Harrison2008-10-205-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | fix CONFIG_HIGHMEM compile error in drivers/gpu/drm/i915/i915_gem.cThomas Gleixner2008-10-201-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 9b7530cc329eb036cfa589930c270e85031f554c ("i915: cleanup coding horrors in i915_gem_gtt_pwrite()") broke the i386 build for CONFIG_HIGHMEM=y. Caught by automatic testing http://www.tglx.de/autoqa-logs/000137-0006-0001.log Signed-off-by: Thomas Gleixner <tglx@linutronix.de> [ My bad. It's the same patch I sent out earlier, nobody noticed then either.. ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | fix WARN() for PPCArjan van de Ven2008-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | powerpc doesn't use the generic WARN_ON infrastructure. The newly introduced WARN() as a result didn't print the message, this patch adds the printk for this specific case. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | kexec: fix crash_save_vmcoreinfo_init build problemLuck, Tony2008-10-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes kernel/kexec.c: In function 'crash_save_vmcoreinfo_init': kernel/kexec.c:1374: error: 'vmlist' undeclared (first use in this function) kernel/kexec.c:1374: error: (Each undeclared identifier is reported only once kernel/kexec.c:1374: error: for each function it appears in.) kernel/kexec.c:1410: error: invalid use of undefined type 'struct vm_struct' make[1]: *** [kernel/kexec.o] Error 1 Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6Linus Torvalds2008-10-20138-318/+457
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6: parisc: convert to generic compat_sys_ptrace parisc: add rtc platform driver parisc: initialize unwinder much earlier parisc: add new syscalls parisc: hijack jump to start_kernel parisc: add pdc_coproc_cfg_unlocked and set_firmware_width_unlocked parisc: move include/asm-parisc to arch/parisc/include/asm parisc: move pdc_result to real2.S parisc: unify CCIO_COLLECT_STATS implementation parisc: add arch/parisc/kernel/.gitignore parisc: ropes.h - fix <asm-parisc/*> -> <asm/*> parisc: parisc-agp - fix <asm-parisc/*> -> <asm/*> Resolve remove/rename conflict: include/asm-parisc/a.out.h is no longer relevant.
OpenPOWER on IntegriCloud