Skip to content
  1. Nov 17, 2007
  2. Nov 11, 2007
  3. Nov 10, 2007
    • Chuck Ebbert's avatar
      x86 - 32-bit ptrace emulation mishandles 6th arg · ecd744ee
      Chuck Ebbert authored
      [ jdike - Pushing Chuck's patch - see
      http://lkml.org/lkml/2005/9/16/261
      
       for some history and a test
      program.  UML is also broken without this patch - its processes get
      SIGBUS from the corrupt 6th argument to mmap being interpretted as a
      file offset ]
      
      When the 32-bit vDSO is used to make a system call, the %ebp register for
      the 6th syscall arg has to be loaded from the user stack (where it's pushed
      by the vDSO user code).  The native i386 kernel always does this before
      stopping for syscall tracing, so %ebp can be seen and modified via ptrace
      to access the 6th syscall argument.  The x86-64 kernel fails to do this,
      presenting the stack address to ptrace instead.  This makes the %rbp value
      seen by 64-bit ptrace of a 32-bit process, and the %ebp value seen by a
      32-bit caller of ptrace, both differ from the native i386 behavior.
      
      This patch fixes the problem by putting the word loaded from the user stack
      into %rbp before calling syscall_trace_enter, and reloading the 6th syscall
      argument from there afterwards (so ptrace can change it).  This makes the
      behavior match that of i386 kernels.
      
      Original-Patch-By: default avatarRoland McGrath <roland@redhat.com>
      
      Signed-off-by: default avatarChuck Ebbert <76306.1226@compuserve.com>
      Signed-off-by: default avatarJeff Dike <jdike@linux.intel.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      ecd744ee
    • Roland McGrath's avatar
      x86_64: ia32 ptrace THREAD_AREA fix · fd181c72
      Roland McGrath authored
      
      
      The addr argument to PTRACE_GET_THREAD_AREA and PTRACE_SET_THREAD_AREA is
      not a magic constant.  It's derived from the segment register values being
      used, which are computed originally from the index used with set_thread_area.
      The value does not need to match what a native i386 kernel would accept.
      It needs to match the segment selectors that can actually be in use in this
      32-bit process.  The 64-bit ptrace support for PTRACE_GET_THREAD_AREA
      (normally used only on 32-bit processes) is correct, but the 32-bit emulation
      of ptrace is broken.
      
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      fd181c72
    • Randy Dunlap's avatar
      voyager: use struct instead of PARAM · 1a0c3ea6
      Randy Dunlap authored
      
      
      Use struct boot_params instead of PARAM + 0xoffsets.
      Fixes one of many Voyager build problems.
      
      arch/x86/kernel/setup_32.c:543: error: 'PARAM' undeclared (first use in this function)
      
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      1a0c3ea6
    • David Miller's avatar
      [FUTEX] Fix address computation in compat code. · 3c5fd9c7
      David Miller authored
      
      
      compat_exit_robust_list() computes a pointer to the
      futex entry in userspace as follows:
      
      	(void __user *)entry + futex_offset
      
      'entry' is a 'struct robust_list __user *', and
      'futex_offset' is a 'compat_long_t' (typically a 's32').
      
      Things explode if the 32-bit sign bit is set in futex_offset.
      
      Type promotion sign extends futex_offset to a 64-bit value before
      adding it to 'entry'.
      
      This triggered a problem on sparc64 running 32-bit applications which
      would lock up a cpu looping forever in the fault handling for the
      userspace load in handle_futex_death().
      
      Compat userspace runs with address masking (wherein the cpu zeros out
      the top 32-bits of every effective address given to a memory operation
      instruction) so the sparc64 fault handler accounts for this by
      zero'ing out the top 32-bits of the fault address too.
      
      Since the kernel properly uses the compat_uptr interfaces, kernel side
      accesses to compat userspace work too since they will only use
      addresses with the top 32-bit clear.
      
      Because of this compat futex layer bug we get into the following loop
      when executing the get_user() load near the top of handle_futex_death():
      
      1) load from address '0xfffffffff7f16bd8', FAULT
      2) fault handler clears upper 32-bits, processes fault
         for address '0xf7f16bd8' which succeeds
      3) goto #1
      
      I want to thank Bernd Zeimetz, Josip Rodin, and Fabio Massimo Di Nitto
      for their tireless efforts helping me track down this bug.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3c5fd9c7
    • Linus Torvalds's avatar
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 · 8fc543c8
      Linus Torvalds authored
      * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
        [IA64] IOSAPIC bogus error cleanup
        [IA64] Update printing of feature set bits
        [IA64] Fix IOSAPIC delivery mode setting
        [IA64] XPC heartbeat timer function must run on CPU 0
        [IA64] Clean up /proc/interrupts output
        [IA64] Disable/re-enable CPE interrupts on Altix
        [IA64] Clean-up McKinley Errata message
        [IA64] Add gate.lds to list of files ignored by Git
        [IA64] Fix section mismatch in contig.c version of per_cpu_init()
        [IA64] Wrong args to memset in efi_gettimeofday()
        [IA64] Remove duplicate includes from ia32priv.h
        [IA64] fix number of bytes zeroed by sys_fw_init() in arch/ia64/hp/sim/boot/fw-emu.c
        [IA64] Fix perfmon sysctl directory modes
      8fc543c8
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched · a70a9322
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
        sched: proper prototype for kernel/sched.c:migration_init()
        sched: avoid large irq-latencies in smp-balancing
        sched: fix copy_namespace() <-> sched_fork() dependency in do_fork
        sched: clean up the wakeup preempt check, #2
        sched: clean up the wakeup preempt check
        sched: wakeup preemption fix
        sched: remove PREEMPT_RESTRICT
        sched: turn off PREEMPT_RESTRICT
        KVM: fix !SMP build error
        x86: make nmi_cpu_busy() always defined
        x86: make ipi_handler() always defined
        sched: cleanup, use NSEC_PER_MSEC and NSEC_PER_SEC
        sched: reintroduce SMP tunings again
        sched: restore deterministic CPU accounting on powerpc
        sched: fix delay accounting regression
        sched: reintroduce the sched_min_granularity tunable
        sched: documentation: place_entity() comments
        sched: fix vslice
      a70a9322
    • Linus Torvalds's avatar
      Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6 · a80b824f
      Linus Torvalds authored
      * master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: (26 commits)
        sh: remove dead config symbols from SH code
        sh: Kill off broken snapgear ds1302 code.
        sh: Add a dummy vga.h.
        rtc: rtc-sh: Zero out tm value for invalid rtc states.
        rtc: sh-rtc: Handle rtc_device_register() failure properly.
        sh: Fix heartbeart on Solution Engine series
        sh: Remove SCI_NPORTS from sh-sci.h
        sh: Fix up PAGE_KERNEL_PCC() for nommu.
        sh: hs7751rvoip: Kill off dead IPR IRQ mappings.
        sh: hs7751rvoip: irq.c needs linux/interrupt.h.
        sh: Kill off __{copy,clear}_user_page().
        sh: Optimized copy_{to,from}_user_page() for SH-4.
        sh: Wire up clear_user_highpage().
        sh: Kill off the remaining ST40 cruft.
        superhyway: Handle device_register() retval properly.
        sh: kgdb sysrq depends on magic sysrq.
        sh: Add -Werror for clean directories.
        sh: Fix up kgdb build with modular sh-sci.
        sh: Export __{s,u}divsi3_i4i on all CPUs.
        sh: Fix up kgdb-on-NMI branch target.
        ...
      a80b824f
    • Linus Torvalds's avatar
      Merge master.kernel.org:/home/rmk/linux-2.6-arm · 45ff993d
      Linus Torvalds authored
      * master.kernel.org:/home/rmk/linux-2.6-arm:
        [ARM] pxa: fix one-shot timer mode
        [ARM] 4645/1: Cyberpro: Trivial fix to restore 16bpp mode.
        [ARM] 4644/2: fix flush_kern_tlb_range() in module space
        [ARM] Allow watchdog drivers to be selected again
        [ARM] 4633/1: omap build fix when FB enabled
        [ARM] 4642/2: netX: default config for netx based boards
        [ARM] 4641/2: netX: fix kobject_name type
        [ARM] Fix iop3xx macro
      45ff993d
    • Linus Torvalds's avatar
      cb834e7c
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block · 4c31c303
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
        Add UNPLUG traces to all appropriate places
        block: fix requeue handling in blk_queue_invalidate_tags()
        mmc: Fix sg helper copy-and-paste error
        pktcdvd: fix BUG caused by sysfs module reference semantics change
        ioprio: allow sys_ioprio_set() value of 0 to reset ioprio setting
        cfq_idle_class_timer: add paranoid checks for jiffies overflow
        cfq: fix IOPRIO_CLASS_IDLE delays
        cfq: fix IOPRIO_CLASS_IDLE accounting
      4c31c303
    • Linus Torvalds's avatar
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc · c4888f9f
      Linus Torvalds authored
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (37 commits)
        [POWERPC] EEH: Make sure warning message is printed
        [POWERPC] Make altivec code in swsusp_32.S depend on CONFIG_ALTIVEC
        [POWERPC] windfarm: Fix windfarm thread freezer interaction
        [POWERPC] Fix si_addr value on low level hash failures
        [POWERPC] Refresh ppc64_defconfig and enable pasemi-related options
        [POWERPC] pasemi: Update defconfig
        [POWERPC] iSeries: Fix ref counting in vio setup
        [POWERPC] ] Fix memset size error
        [POWERPC] Fix link errors for allyesconfig
        [POWERPC] iSeries_init_IRQ non-PCI tidy
        [POWERPC] Change fallocate to match unistd.h on powerpc
        [POWERPC] EEH: Avoid crash on null device
        [POWERPC] EEH: Drivers that need reset trump others
        [POWERPC] EEH: Clean up comments
        [POWERPC] Fix off-by-one error in setting decrementer on Book E/4xx (v2)
        [POWERPC] Fix switch_slb handling of 1T ESID values
        [POWERPC] Fix build failure when CONFIG_VIRT_CPU_ACCOUNTING is not defined
        [POWERPC] Include udbg.h when using udbg_printf
        [POWERPC] Fix cache line vs. block size confusion
        [POWERPC] Fix sysctl table check failure on PowerMac
        ...
      c4888f9f
    • Linus Torvalds's avatar
      Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2 · e36aeee6
      Linus Torvalds authored
      * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
        ocfs2: fix rename vs unlink race
        [PATCH] Fix possibly too long write in o2hb_setup_one_bio()
        ocfs2: fix write() performance regression
        ocfs2: Commit journal on sync writes
        ocfs2: Re-order iput in ocfs2_drop_dentry_lock
        ocfs2: Create locks at initially requested level
        [PATCH] Fix priority mistakes in fs/ocfs2/{alloc.c, dlmglue.c}
        [2.6 patch] make ocfs2_find_entry_el() static
      e36aeee6
    • Alan Cox's avatar
      frv: Remove bogus NO_IRQ = -1 define · b2f051ae
      Alan Cox authored
      
      
      The old NO_IRQ define some platforms had was long ago declared obsolete
      and wrong. FRV should therefore not be re-introducing this, especially as
      IRQs are usually unsigned in the kernel. The "no IRQ" case is defined to be
      zero and Linus made this rather clear at the time.
      
      arch/frv shows no dependancy on this but it might show up driver fixes
      needing doing I guess
      
      Signed-off-by: default avatarAlan Cox <alan@redhat.com>
      Acked-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b2f051ae
    • Linus Torvalds's avatar
      Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 · a90fcf31
      Linus Torvalds authored
      * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
        [SPARC64]: Use "is_power_of_2" macro for simplicity.
        [SPARC]: Remove duplicate includes.
      a90fcf31
    • Linus Torvalds's avatar
      Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 · c5b875e3
      Linus Torvalds authored
      * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (44 commits)
        [NETLINK]: Fix unicast timeouts
        [INET]: Remove per bucket rwlock in tcp/dccp ehash table.
        [IPVS]: Synchronize closing of Connections
        [IPVS]: Bind connections on stanby if the destination exists
        [NET]: Remove Documentation/networking/pt.txt
        [NET]: Remove Documentation/networking/routing.txt
        [NET]: Remove Documentation/networking/ncsa-telnet
        [NET]: Remove comx driver docs.
        [NET]: Remove Documentation/networking/Configurable
        [NET]: Clean proto_(un)register from in-code ifdefs
        [IPSEC]: Fix crypto_alloc_comp error checking
        [VLAN]: Fix SET_VLAN_INGRESS_PRIORITY_CMD ioctl
        [NETNS]: Fix compiler error in net_namespace.c
        [TTY]: Use tty_mode_ioctl() in network drivers.
        [TTY]: Fix network driver interactions with TCGET/SET calls.
        [PKT_SCHED] CLS_U32: Fix endianness problem with u32 classifier hash masks.
        [NET]: Removing duplicit #includes
        [NET]: Let USB_USBNET always select MII.
        [RRUNNER]: Do not muck with sysctl_{r,w}mem_max
        [DLM] lowcomms: Do not muck with sysctl_rmem_max.
        ...
      c5b875e3
    • Linus Torvalds's avatar
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6 · 98d74e08
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
        SELinux: add more validity checks on policy load
        SELinux: fix bug in new ebitmap code.
        SELinux: suppress a warning for 64k pages.
      98d74e08
    • David Howells's avatar
      FRV: Remove the section annotation on free_initmem() · e4fc5a1a
      David Howells authored
      
      
      Remove the section annotation on FRV's free_initmem().  It can't be marked
      __init, lest it free itself.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e4fc5a1a
    • Adrian Bunk's avatar
      sched: proper prototype for kernel/sched.c:migration_init() · e6fe6649
      Adrian Bunk authored
      
      
      This patch adds a proper prototype for migration_init() in
      include/linux/sched.h
      
      Since there's no point in always returning 0 to a caller that doesn't check
      the return value it also changes the function to return void.
      
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e6fe6649
    • Peter Zijlstra's avatar
      sched: avoid large irq-latencies in smp-balancing · b82d9fdd
      Peter Zijlstra authored
      
      
      SMP balancing is done with IRQs disabled and can iterate the full rq.
      When rqs are large this can cause large irq-latencies. Limit the nr of
      iterations on each run.
      
      This fixes a scheduling latency regression reported by the -rt folks.
      
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Tested-by: default avatarGregory Haskins <ghaskins@novell.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      b82d9fdd
    • Srivatsa Vaddagiri's avatar
      sched: fix copy_namespace() <-> sched_fork() dependency in do_fork · 3c90e6e9
      Srivatsa Vaddagiri authored
      
      
      Sukadev Bhattiprolu reported a kernel crash with control groups.
      There are couple of problems discovered by Suka's test:
      
      - The test requires the cgroup filesystem to be mounted with
        atleast the cpu and ns options (i.e both namespace and cpu 
        controllers are active in the same hierarchy). 
      
      	# mkdir /dev/cpuctl
      	# mount -t cgroup -ocpu,ns none cpuctl
      	(or simply)
      	# mount -t cgroup none cpuctl -> Will activate all controllers
      					 in same hierarchy.
      
      - The test invokes clone() with CLONE_NEWNS set. This causes a a new child
        to be created, also a new group (do_fork->copy_namespaces->ns_cgroup_clone->
        cgroup_clone) and the child is attached to the new group (cgroup_clone->
        attach_task->sched_move_task). At this point in time, the child's scheduler 
        related fields are uninitialized (including its on_rq field, which it has
        inherited from parent). As a result sched_move_task thinks its on
        runqueue, when it isn't.
      
        As a solution to this problem, I moved sched_fork() call, which
        initializes scheduler related fields on a new task, before
        copy_namespaces(). I am not sure though whether moving up will
        cause other side-effects. Do you see any issue?
      
      - The second problem exposed by this test is that task_new_fair()
        assumes that parent and child will be part of the same group (which 
        needn't be as this test shows). As a result, cfs_rq->curr can be NULL
        for the child.
      
        The solution is to test for curr pointer being NULL in
        task_new_fair().
      
      With the patch below, I could run ns_exec() fine w/o a crash.
      
      Reported-by: default avatarSukadev Bhattiprolu <sukadev@us.ibm.com>
      Signed-off-by: default avatarSrivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      3c90e6e9
    • Ingo Molnar's avatar
      sched: clean up the wakeup preempt check, #2 · 502d26b5
      Ingo Molnar authored
      
      
      clean up the preemption check to not use unnecessary 64-bit
      variables. This improves code size:
      
         text    data     bss     dec     hex filename
        44227    3326      36   47589    b9e5 sched.o.before
        44201    3326      36   47563    b9cb sched.o.after
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      502d26b5
    • Ingo Molnar's avatar
      sched: clean up the wakeup preempt check · 77d9cc44
      Ingo Molnar authored
      
      
      clean up the wakeup preemption check. No code changed:
      
         text    data     bss     dec     hex filename
        44227    3326      36   47589    b9e5 sched.o.before
        44227    3326      36   47589    b9e5 sched.o.after
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      77d9cc44
    • Ingo Molnar's avatar
      sched: wakeup preemption fix · 8bc6767a
      Ingo Molnar authored
      
      
      wakeup preemption fix: do not make it dependent on p->prio.
      Preemption purely depends on ->vruntime.
      
      This improves preemption in mixed-nice-level workloads.
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      8bc6767a
    • Ingo Molnar's avatar
      sched: remove PREEMPT_RESTRICT · 3e3e13f3
      Ingo Molnar authored
      
      
      remove PREEMPT_RESTRICT. (this is a separate commit so that any
      regression related to the removal itself is bisectable)
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      3e3e13f3
    • Ingo Molnar's avatar
      sched: turn off PREEMPT_RESTRICT · 52d3da1a
      Ingo Molnar authored
      
      
      PREEMPT_RESTRICT was a method aimed at reducing the amount of wakeup
      related preemption. It has a disadvantage though, it can prevent
      legitimate wakeups if a task is 'unlucky' to be hit too early by a tick
      that clears peer_preempt.
      
      Now that the wakeup preemption has been cleaned up we dont seem to have
      excessive preemptions anymore, so this feature can be turned off. (and
      removed in the next patch)
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      52d3da1a
    • Ingo Molnar's avatar
      KVM: fix !SMP build error · a5fbb6d1
      Ingo Molnar authored
      
      
      fix a !SMP build error:
      
      drivers/kvm/kvm_main.c: In function 'kvm_flush_remote_tlbs':
      drivers/kvm/kvm_main.c:220: error: implicit declaration of function 'smp_call_function_mask'
      
      (and also avoid unused function warning related to up_smp_call_function()
      not making use of the 'func' parameter.)
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      a5fbb6d1
    • Ingo Molnar's avatar
      x86: make nmi_cpu_busy() always defined · 0492007e
      Ingo Molnar authored
      
      
      nmi_cpu_busy() must be available on !SMP too.
      
      this is in preparation to a smp_call_function_mask() fix.
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      0492007e
    • Ingo Molnar's avatar
      x86: make ipi_handler() always defined · 4e2947f1
      Ingo Molnar authored
      
      
      prepare for up_smp_call_function() to ensure that the 'func'
      pointer is unused. (which is related to a KVM build fix)
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      4e2947f1
    • Eric Dumazet's avatar
      sched: cleanup, use NSEC_PER_MSEC and NSEC_PER_SEC · d6322faf
      Eric Dumazet authored
      
      
      1) hardcoded 1000000000 value is used five times in places where
         NSEC_PER_SEC might be more readable.
      
      2) A conversion from nsec to msec uses the hardcoded 1000000 value,
         which is a candidate for NSEC_PER_MSEC.
      
      no code changed:
      
          text    data     bss     dec     hex filename
         44359    3326      36   47721    ba69 sched.o.before
         44359    3326      36   47721    ba69 sched.o.after
      
      Signed-off-by: default avatarEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d6322faf
    • Ingo Molnar's avatar
      sched: reintroduce SMP tunings again · 19978ca6
      Ingo Molnar authored
      Yanmin Zhang reported an aim7 regression and bisected it down to:
      
       |  commit 38ad464d
      
      
       |  Author: Ingo Molnar <mingo@elte.hu>
       |  Date:   Mon Oct 15 17:00:02 2007 +0200
       |
       |     sched: uniform tunings
       |
       |     use the same defaults on both UP and SMP.
      
      fix this by reintroducing similar SMP tunings again. This resolves
      the regression.
      
      (also update the comments to match the ilog2(nr_cpus) tuning effect)
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      19978ca6
    • Paul Mackerras's avatar
      sched: restore deterministic CPU accounting on powerpc · fa13a5a1
      Paul Mackerras authored
      
      
      Since powerpc started using CONFIG_GENERIC_CLOCKEVENTS, the
      deterministic CPU accounting (CONFIG_VIRT_CPU_ACCOUNTING) has been
      broken on powerpc, because we end up counting user time twice: once in
      timer_interrupt() and once in update_process_times().
      
      This fixes the problem by pulling the code in update_process_times
      that updates utime and stime into a separate function called
      account_process_tick.  If CONFIG_VIRT_CPU_ACCOUNTING is not defined,
      there is a version of account_process_tick in kernel/timer.c that
      simply accounts a whole tick to either utime or stime as before.  If
      CONFIG_VIRT_CPU_ACCOUNTING is defined, then arch code gets to
      implement account_process_tick.
      
      This also lets us simplify the s390 code a bit; it means that the s390
      timer interrupt can now call update_process_times even when
      CONFIG_VIRT_CPU_ACCOUNTING is turned on, and can just implement a
      suitable account_process_tick().
      
      account_process_tick() now takes the task_struct * as an argument.
      Tested both with and without CONFIG_VIRT_CPU_ACCOUNTING.
      
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      fa13a5a1
    • Balbir Singh's avatar
      sched: fix delay accounting regression · 9a41785c
      Balbir Singh authored
      Fix the delay accounting regression introduced by commit
      75d4ef16
      
      . rq no longer has sched_info
      data associated with it. task_struct sched_info structure is used by delay
      accounting to provide back statistics to user space.
      
      also remove direct use of sched_clock() (which is not a valid thing to
      do anymore) and use rq->clock instead.
      
      Signed-off-by: default avatarBalbir Singh <balbir@linux.vnet.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      9a41785c
    • Peter Zijlstra's avatar
      sched: reintroduce the sched_min_granularity tunable · b2be5e96
      Peter Zijlstra authored
      
      
      we lost the sched_min_granularity tunable to a clever optimization
      that uses the sched_latency/min_granularity ratio - but the ratio
      is quite unintuitive to users and can also crash the kernel if the
      ratio is set to 0. So reintroduce the min_granularity tunable,
      while keeping the ratio maintained internally.
      
      no functionality changed.
      
      [ mingo@elte.hu: some fixlets. ]
      
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      b2be5e96
    • Peter Zijlstra's avatar
      sched: documentation: place_entity() comments · 2cb8600e
      Peter Zijlstra authored
      
      
      Add a few comments to place_entity(). No code changed.
      
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      2cb8600e
    • Peter Zijlstra's avatar
      sched: fix vslice · 10b77724
      Peter Zijlstra authored
      
      
      vslice was missing a factor NICE_0_LOAD, as weight is in
      weight*NICE_0_LOAD units.
      
      the effect of this bug was larger initial slices and
      thus latency-noisier forks.
      
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      10b77724
    • George Beshers's avatar
      [IA64] IOSAPIC bogus error cleanup · 7f6ff62a
      George Beshers authored
      
      
      On Altix (sn2) machines the "Error parsing MADT" message is
      misleading because the lack of IOSAPIC entries is expected.
      
      Since I am sure someone will ask, I have been told that
      the chance of this changing anytime soon is close to nil.
      
      Signed-off-by: default avatarGeorge Beshers <gbeshers@sgi.com>
      Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
      7f6ff62a
    • Russ Anderson's avatar
      [IA64] Update printing of feature set bits · b8de471f
      Russ Anderson authored
      
      
      Newer Itanium versions have added additional processor feature set
      bits.  This patch prints all the implemented feature set bits.  Some
      bit descriptions have not been made public.  For those bits, a generic
      "Feature set X bit Y" message is printed.  Bits that are not implemented
      will no longer be printed.
      
      Signed-off-by: default avatarRuss Anderson <rja@sgi.com>
      Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
      b8de471f