25 Jul, 2008
4 commits
-
…el/git/tip/linux-2.6-tip
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
nohz: adjust tick_nohz_stop_sched_tick() call of s390 as well
nohz: prevent tick stop outside of the idle loop -
- Make some variables and functions static, since they don't need to be
global.- Remove an unused function - arch/um/kernel/time.c::sched_clock().
- Clean the style a bit as complained by checkpatch.pl.
Cc: Jeff Dike
Signed-off-by: WANG Cong
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
- Remove arch_validate(), because no one uses it.
- Remove useless macro HAVE_ARCH_VALIDATE.
- Make the variable 'empty_bad_page' static.
Cc: Jeff Dike
Signed-off-by: WANG Cong
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Make activate_fd() and free_irq_by_irq_and_dev() static. Remove
init_aio_irq() since it has no users.Cc: Jeff Dike
Signed-off-by: WANG Cong
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
24 Jul, 2008
1 commit
-
My copying of linux/init.h didn't go far enough. The definition of
__used singled out gcc minor version 3, but didn't care what the major
version was. This broke when unit-at-a-time was added and gcc started
throwing out initcalls.This results in an early boot crash when ptrace tries to initialize a
process with an empty, uninitialized register set.Signed-off-by: Jeff Dike
Signed-off-by: Linus Torvalds
19 Jul, 2008
2 commits
-
Jack Ren and Eric Miao tracked down the following long standing
problem in the NOHZ code:scheduler switch to idle task
enable interruptsWindow starts here
----> interrupt happens (does not set NEED_RESCHED)
irq_exit() stops the tick----> interrupt happens (does set NEED_RESCHED)
return from schedule()
cpu_idle(): preempt_disable();
Window ends here
The interrupts can happen at any point inside the race window. The
first interrupt stops the tick, the second one causes the scheduler to
rerun and switch away from idle again and we end up with the tick
disabled.The fact that it needs two interrupts where the first one does not set
NEED_RESCHED and the second one does made the bug obscure and extremly
hard to reproduce and analyse. Kudos to Jack and Eric.Solution: Limit the NOHZ functionality to the idle loop to make sure
that we can not run into such a situation ever again.cpu_idle()
{
preempt_disable();while(1) {
tick_nohz_stop_sched_tick(1); ,
Debugged-by: eric miao
Signed-off-by: Thomas Gleixner
16 Jul, 2008
1 commit
-
Conflicts:
arch/powerpc/Kconfig
arch/s390/kernel/time.c
arch/x86/kernel/apic_32.c
arch/x86/kernel/cpu/perfctr-watchdog.c
arch/x86/kernel/i8259_64.c
arch/x86/kernel/ldt.c
arch/x86/kernel/nmi_64.c
arch/x86/kernel/smpboot.c
arch/x86/xen/smp.c
include/asm-x86/hw_irq_32.h
include/asm-x86/hw_irq_64.h
include/asm-x86/mach-default/irq_vectors.h
include/asm-x86/mach-voyager/irq_vectors.h
include/asm-x86/smp.h
kernel/MakefileSigned-off-by: Ingo Molnar
15 Jul, 2008
1 commit
08 Jul, 2008
1 commit
-
There are various constraints on the use of unit-at-a-time:
- i386 uses no-unit-at-a-time for pre-4.0 (not 4.3)
- x86_64 uses unit-at-a-time alwaysUli reported a crash on x86_64 with gcc 4.1.2 with unit-at-a-time,
resulting in commit c0a18111e571138747a98af18b3a2124df56a0d1Ingo reported a gcc internal error with gcc 4.3 with no-unit-at-a-timem,
resulting in 22eecde2f9034764a3fd095eecfa3adfb8ec9a98Benny Halevy is seeing extern inlines not resolved with gcc 4.3 with
no-unit-at-a-timeThis patch reintroduces unit-at-a-time for gcc >= 4.0, bringing back the
possibility of Uli's crash. If that happens, we'll debug it.I started seeing both the internal compiler errors and unresolved
inlines on Fedora 9. This patch fixes both problems, without so far
reintroducing the crash reported by Uli.Signed-off-by: Jeff Dike
Cc: Benny Halevy
Cc: Adrian Bunk
Cc: Ingo Molnar
Cc: Ulrich Drepper
Signed-off-by: Linus Torvalds
03 Jul, 2008
3 commits
-
Signed-off-by: Arnd Bergmann
-
Signed-off-by: Arnd Bergmann
-
Signed-off-by: Arnd Bergmann
26 Jun, 2008
1 commit
-
It's never used and the comments refer to nonatomic and retry
interchangably. So get rid of it.Acked-by: Jeremy Fitzhardinge
Signed-off-by: Jens Axboe
13 Jun, 2008
2 commits
-
Fedora broke PTRACE_SYSEMU again, and UML crashes as a result when it
doesn't need to. This patch makes the PTRACE_SYSEMU check fail gracefully
and makes UML fall back to PTRACE_SYSCALL.Signed-off-by: Jeff Dike
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
I allowed an include of asm/user.h to sneak back in. This patch replaces
it with sys/user.h.Signed-off-by: Jeff Dike
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 Jun, 2008
6 commits
-
Include limits.h to get a definition of PATH_MAX.
Signed-off-by: Ingo Molnar
Signed-off-by: Jeff Dike
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We lost the marking of SIGWINCH as being OK to receive during stub
execution, causing a panic should that happen.Cc: Benedict Verheyen
Signed-off-by: Jeff Dike
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
x86_64 defines either memcpy or __memcpy depending on the gcc version, and
it looks like UML needs to follow that in its exporting.Cc: Gabriel C
Signed-off-by: Jeff Dike
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch makes os_get_task_size locate the bottom of the address space,
as well as the top. This is for systems which put a lower limit on mmap
addresses. It works by manually scanning pages from zero onwards until a
valid page is found.Because the bottom of the address space may not be zero, it's not
sufficient to assume the top of the address space is the size of the
address space. The size is the difference between the top address and
bottom address.[jdike@addtoit.com: changed the name to reflect that this function is
supposed to return the top of the process address space, not its size and
changed the return value to reflect that. Also some minor formatting
changes]
Signed-off-by: Tom Spink
Signed-off-by: Jeff Dike
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Removed duplicated include file "kern_util.h" in
arch/um/drivers/ubd_kern.c.Signed-off-by: Huang Weiyi
Signed-off-by: Jeff Dike
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Protection against the host's time going backwards (eg, ntp activity on
the host) by keeping track of the time at the last tick and if it's
greater than the current time, keep time stopped until the host catches
up.Cc: Nix
Signed-off-by: Jeff Dike
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 May, 2008
5 commits
-
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
We want sys/ptrace.h before any includes of linux/ptrace.h and
asm/user.h pulls the latter.Signed-off-by: Al Viro
Acked-by: Jeff Dike
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Acked-by: Jeff Dike
Signed-off-by: Linus Torvalds
17 May, 2008
1 commit
-
Signed-off-by: Al Viro
13 May, 2008
12 commits
-
Alarm delivery could be noticably late in the !CONFIG_NOHZ case because lost
ticks weren't being taken into account. This is now treated more carefully,
with the time between ticks being calculated and the appropriate number of
ticks delivered to the timekeeping system.Cc: Nix
Signed-off-by: Jeff Dike
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Give random.c a style workover while I'm changing it.
Signed-off-by: Jeff Dike
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The random driver would essentially hang if the host's /dev/random returned
-EAGAIN. There was a test of need_resched followed by a schedule inside the
loop, but that didn't help and it's the wrong way to work anyway.The right way is to ask for an interrupt when there is input available from
the host and handle it then rather than polling.Now, when the host's /dev/random returns -EAGAIN, the driver asks for a wakeup
when there's randomness available again and sleeps. The interrupt routine
just wakes up whatever processes are sleeping on host_read_wait.There is an atomic_t, host_sleep_count, which counts the number of processes
waiting for randomness. When this reaches zero, the interrupt is disabled.An added complication is that async I/O notification was only recently added
to /dev/random (by me), so essentially all hosts will lack it. So, we use the
sigio workaround here, which is to have a separate thread poll on the
descriptor and send an interrupt when there is input on it. This mechanism is
activated when a process gets -EAGAIN (activating this multiple times is
harmless, if a bit wasteful) and deactivated by the last process still
waiting.The module name was changed from "random" to "hw_random" in order for udev to
recognize it.The sigio workaround needed some changes. sigio_broken was added for cases
when we know that async notification doesn't work. This is now called from
maybe_sigio_broken, which deals with pts devices.Signed-off-by: Jeff Dike
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The top of physical memory should be below the initial process stack, not the
top of the address space, at least for as long as the stack isn't known to the
kernel VM system and appropriately reserved.Cc: "Christopher S. Aker"
Signed-off-by: Jeff Dike
Cc: WANG Cong
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch includes page.h header into linker scripts that allow us to
use PAGE_SIZE macro instead of numeric constant.To be able to include page.h into linker scripts page.h is needed for
some modification - i.e. we need to use __ASSEMBLY__ and _AC macro[jdike@linux.intel.com - fixed conflict with as-layout.h]
Signed-off-by: Cyrill Gorcunov
Signed-off-by: Jeff Dike
Cc: WANG Cong
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
I just saw similar patches in the janitor kernel's list, and spotted place it
fits.Signed-off-by: Jiri Olsa
Signed-off-by: Jeff Dike
Cc: WANG Cong
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add the BLOCK dependency for RAW_DRIVER, to match what's in
drivers/char/Kconfig. Also, while we're there, update the alleged
obsolesence of RAW_DRIVER since it doesn't seem to be going away any
time soon.Signed-off-by: Robert P. J. Day
Signed-off-by: Jeff Dike
Cc: WANG Cong
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
From: Robert P. J. Day
Use newer, non-deprecated __SPIN_LOCK_UNLOCKED macro.
Signed-off-by: Robert P. J. Day
Signed-off-by: Jeff Dike
Cc: WANG Cong
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
UML's supposed nanosecond clock interacts badly with NTP when NTP
decides that the clock has drifted ahead and needs to be slowed down.
Slowing down the clock is done by decrementing the cycle-to-nanosecond
multiplier, which is 1. Decrementing that gives you 0 and time is
stopped.This is fixed by switching to a microsecond clock, with a multiplier
of 1000.Signed-off-by: Jeff Dike
Cc: WANG Cong
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Reintroduce uml_kmalloc for the benefit of UML libc code. The
previous tactic of declaring __kmalloc so it could be called directly
from the libc side of the house turned out to be getting too intimate
with slab, and it doesn't work with slob.So, the uml_kmalloc wrapper is back. It calls kmalloc or whatever
that translates into, and libc code calls it.kfree is left alone since that still works, leaving a somewhat
inconsistent API.Signed-off-by: Jeff Dike
Cc: WANG Cong
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Error returns are negative.
Signed-off-by: Johann Felix Soden
Signed-off-by: Jeff Dike
Cc: WANG Cong
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Tidy the ptrace interface code. Removed a bunch of unused macros.
Started converting register sets from arrays of longs to structures.Signed-off-by: Jeff Dike
Cc: WANG Cong
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds