1. 07 1月, 2006 3 次提交
  2. 09 11月, 2005 3 次提交
    • N
      [PATCH] sched: resched and cpu_idle rework · 64c7c8f8
      Nick Piggin 提交于
      Make some changes to the NEED_RESCHED and POLLING_NRFLAG to reduce
      confusion, and make their semantics rigid.  Improves efficiency of
      resched_task and some cpu_idle routines.
      
      * In resched_task:
      - TIF_NEED_RESCHED is only cleared with the task's runqueue lock held,
        and as we hold it during resched_task, then there is no need for an
        atomic test and set there. The only other time this should be set is
        when the task's quantum expires, in the timer interrupt - this is
        protected against because the rq lock is irq-safe.
      
      - If TIF_NEED_RESCHED is set, then we don't need to do anything. It
        won't get unset until the task get's schedule()d off.
      
      - If we are running on the same CPU as the task we resched, then set
        TIF_NEED_RESCHED and no further action is required.
      
      - If we are running on another CPU, and TIF_POLLING_NRFLAG is *not* set
        after TIF_NEED_RESCHED has been set, then we need to send an IPI.
      
      Using these rules, we are able to remove the test and set operation in
      resched_task, and make clear the previously vague semantics of
      POLLING_NRFLAG.
      
      * In idle routines:
      - Enter cpu_idle with preempt disabled. When the need_resched() condition
        becomes true, explicitly call schedule(). This makes things a bit clearer
        (IMO), but haven't updated all architectures yet.
      
      - Many do a test and clear of TIF_NEED_RESCHED for some reason. According
        to the resched_task rules, this isn't needed (and actually breaks the
        assumption that TIF_NEED_RESCHED is only cleared with the runqueue lock
        held). So remove that. Generally one less locked memory op when switching
        to the idle thread.
      
      - Many idle routines clear TIF_POLLING_NRFLAG, and only set it in the inner
        most polling idle loops. The above resched_task semantics allow it to be
        set until before the last time need_resched() is checked before going into
        a halt requiring interrupt wakeup.
      
        Many idle routines simply never enter such a halt, and so POLLING_NRFLAG
        can be always left set, completely eliminating resched IPIs when rescheduling
        the idle task.
      
        POLLING_NRFLAG width can be increased, to reduce the chance of resched IPIs.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Con Kolivas <kernel@kolivas.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      64c7c8f8
    • N
      [PATCH] sched: disable preempt in idle tasks · 5bfb5d69
      Nick Piggin 提交于
      Run idle threads with preempt disabled.
      
      Also corrected a bugs in arm26's cpu_idle (make it actually call schedule()).
      How did it ever work before?
      
      Might fix the CPU hotplugging hang which Nigel Cunningham noted.
      
      We think the bug hits if the idle thread is preempted after checking
      need_resched() and before going to sleep, then the CPU offlined.
      
      After calling stop_machine_run, the CPU eventually returns from preemption and
      into the idle thread and goes to sleep.  The CPU will continue executing
      previous idle and have no chance to call play_dead.
      
      By disabling preemption until we are ready to explicitly schedule, this bug is
      fixed and the idle threads generally become more robust.
      
      From: alexs <ashepard@u.washington.edu>
      
        PPC build fix
      
      From: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
      
        MIPS build fix
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Signed-off-by: NYoichi Yuasa <yuasa@hh.iij4u.or.jp>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5bfb5d69
    • A
      [PATCH] s390: "extern inline" -> "static inline" · 4448aaf0
      Adrian Bunk 提交于
      "extern inline" -> "static inline"
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4448aaf0
  3. 07 11月, 2005 5 次提交
  4. 31 10月, 2005 4 次提交
  5. 29 9月, 2005 1 次提交
  6. 18 9月, 2005 3 次提交
  7. 13 9月, 2005 1 次提交
    • T
      [PATCH] x86-64: Fix 32bit sendfile · 83b942bd
      Tsuneo.Yoshioka@f-secure.com 提交于
      If we use 64bit kernel on ia64/x86_64/s390 architecture, and we run
      32bit binary on 32bit compatibility mode, sendfile system call seems be
      not set offset argument.
      
      This is because sendfile's return value is not zero but the code regards
      the result by return value is zero or not.
      
      This problem will be affect to ia64/x86_64/s390 and not affect to other
      architecture does not affect other architecture (mips/parisc/ppc64/sparc64).
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      83b942bd
  8. 10 9月, 2005 1 次提交
  9. 08 9月, 2005 1 次提交
  10. 05 9月, 2005 3 次提交
  11. 30 8月, 2005 1 次提交
    • S
      [PATCH] convert signal handling of NODEFER to act like other Unix boxes. · 69be8f18
      Steven Rostedt 提交于
      It has been reported that the way Linux handles NODEFER for signals is
      not consistent with the way other Unix boxes handle it.  I've written a
      program to test the behavior of how this flag affects signals and had
      several reports from people who ran this on various Unix boxes,
      confirming that Linux seems to be unique on the way this is handled.
      
      The way NODEFER affects signals on other Unix boxes is as follows:
      
      1) If NODEFER is set, other signals in sa_mask are still blocked.
      
      2) If NODEFER is set and the signal is in sa_mask, then the signal is
      still blocked. (Note: this is the behavior of all tested but Linux _and_
      NetBSD 2.0 *).
      
      The way NODEFER affects signals on Linux:
      
      1) If NODEFER is set, other signals are _not_ blocked regardless of
      sa_mask (Even NetBSD doesn't do this).
      
      2) If NODEFER is set and the signal is in sa_mask, then the signal being
      handled is not blocked.
      
      The patch converts signal handling in all current Linux architectures to
      the way most Unix boxes work.
      
      Unix boxes that were tested:  DU4, AIX 5.2, Irix 6.5, NetBSD 2.0, SFU
      3.5 on WinXP, AIX 5.3, Mac OSX, and of course Linux 2.6.13-rcX.
      
      * NetBSD was the only other Unix to behave like Linux on point #2. The
      main concern was brought up by point #1 which even NetBSD isn't like
      Linux.  So with this patch, we leave NetBSD as the lonely one that
      behaves differently here with #2.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      69be8f18
  12. 24 8月, 2005 1 次提交
  13. 02 8月, 2005 2 次提交
  14. 30 7月, 2005 1 次提交
  15. 28 7月, 2005 4 次提交
  16. 27 7月, 2005 1 次提交
  17. 14 7月, 2005 1 次提交
    • M
      [PATCH] s390: fadvise hint values. · 068e1b94
      Martin Schwidefsky 提交于
      Add special case for the POSIX_FADV_DONTNEED and POSIX_FADV_NOREUSE hint
      values for s390-64.  The user space values in the s390-64 glibc headers for
      these two defines have always been 6 and 7 instead of 4 and 5.  All 64 bit
      applications therefore use the "wrong" values.  To get these applications
      working without recompiling the kernel needs to accept the "wrong" values.
      Since the values for s390-31 are 4 and 5 the compat wrapper for fadvise64
      and fadvise64_64 need to rewrite the values for 31 bit system calls.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      068e1b94
  18. 26 6月, 2005 4 次提交
    • M
      [PATCH] kexec code cleanup · 72414d3f
      Maneesh Soni 提交于
      o Following patch provides purely cosmetic changes and corrects CodingStyle
        guide lines related certain issues like below in kexec related files
      
        o braces for one line "if" statements, "for" loops,
        o more than 80 column wide lines,
        o No space after "while", "for" and "switch" key words
      
      o Changes:
        o take-2: Removed the extra tab before "case" key words.
        o take-3: Put operator at the end of line and space before "*/"
      Signed-off-by: NManeesh Soni <maneesh@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      72414d3f
    • A
      [PATCH] kdump: Use real pt_regs from exception · 6e274d14
      Alexander Nyberg 提交于
      Makes kexec_crashdump() take a pt_regs * as an argument.  This allows to
      get exact register state at the point of the crash.  If we come from direct
      panic assertion NULL will be passed and the current registers saved before
      crashdump.
      
      This hooks into two places:
      die(): check the conditions under which we will panic when calling
      do_exit and go there directly with the pt_regs that caused the fatal
      fault.
      
      die_nmi(): If we receive an NMI lockup while in the kernel use the
      pt_regs and go directly to crash_kexec(). We're probably nested up badly
      at this point so this might be the only chance to escape with proper
      information.
      Signed-off-by: NAlexander Nyberg <alexn@telia.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6e274d14
    • H
      [PATCH] kexec: s390 support · cf13f0ea
      Heiko Carstens 提交于
      Add kexec support for s390 architecture.
      
      From: Milton Miller <miltonm@bga.com>
      
      - Fix passing of first argument to relocate_kernel assembly.
      - Fix Kconfig description.
      - Remove wrong comment and comments that describe obvious things.
      - Allow only KEXEC_TYPE_DEFAULT as image type -> dump not supported.
      Acked-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      cf13f0ea
    • M
      [PATCH] s390: debug feature changes · 66a464db
      Michael Holzheu 提交于
      This patch changes the memory allocation method for the s390 debug feature.
      Trace buffers had been allocated using the get_free_pages() function before.
      Therefore it was not possible to get big memory areas in a running system due
      to memory fragmentation.  Now the trace buffers are subdivided into several
      subbuffers with pagesize.  Therefore it is now possible to allocate more
      memory for the trace buffers and more trace records can be written.
      
      In addition to that, dynamic specification of the size of the trace buffers is
      implemented.  It is now possible to change the size of a trace buffer using a
      new debugfs file instance.  When writing a number into this file, the trace
      buffer size is changed to 'number * pagesize'.
      
      In the past all the traces could be obtained from userspace by accessing files
      in the "proc" filesystem.  Now with debugfs we have a new filesystem which
      should be used for debugging purposes.  This patch moves the debug feature
      from procfs to debugfs.
      
      Since the interface of debug_register() changed, all device drivers, which use
      the debug feature had to be adjusted.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      66a464db