1. 27 9月, 2006 1 次提交
  2. 26 9月, 2006 2 次提交
    • S
      [PATCH] add DIV_ROUND_UP() · 930631ed
      Steven Whitehouse 提交于
      Add the DIV_ROUND_UP() helper macro: divide `n' by `d', rounding up.
      
      Stolen from the gfs2 tree(!) because the swsusp patches need it.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      930631ed
    • D
      [PATCH] x86: Allow users to force a panic on NMI · 8da5adda
      Don Zickus 提交于
      To quote Alan Cox:
      
      The default Linux behaviour on an NMI of either memory or unknown is to
      continue operation. For many environments such as scientific computing
      it is preferable that the box is taken out and the error dealt with than
      an uncorrected parity/ECC error get propogated.
      
      A small number of systems do generate NMI's for bizarre random reasons
      such as power management so the default is unchanged. In other respects
      the new proc/sys entry works like the existing panic controls already in
      that directory.
      
      This is separate to the edac support - EDAC allows supported chipsets to
      handle ECC errors well, this change allows unsupported cases to at least
      panic rather than cause problems further down the line.
      Signed-off-by: NDon Zickus <dzickus@redhat.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      8da5adda
  3. 24 9月, 2006 1 次提交
  4. 12 8月, 2006 1 次提交
  5. 11 7月, 2006 1 次提交
  6. 27 6月, 2006 1 次提交
  7. 26 6月, 2006 1 次提交
  8. 23 6月, 2006 2 次提交
    • H
      [PATCH] remove unlikely() in might_sleep_if() · 368a5fa1
      Hua Zhong 提交于
      The likely() profiling tools show that __alloc_page() causes a lot of misses:
      
      !       132    119193 __alloc_pages():mm/page_alloc.c@937
      
      Because most __alloc_page() calls are not atomic.
      Signed-off-by: NHua Zhong <hzhong@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      368a5fa1
    • O
      [PATCH] writeback: fix range handling · 111ebb6e
      OGAWA Hirofumi 提交于
      When a writeback_control's `start' and `end' fields are used to
      indicate a one-byte-range starting at file offset zero, the required
      values of .start=0,.end=0 mean that the ->writepages() implementation
      has no way of telling that it is being asked to perform a range
      request.  Because we're currently overloading (start == 0 && end == 0)
      to mean "this is not a write-a-range request".
      
      To make all this sane, the patch changes range of writeback_control.
      
      So caller does: If it is calling ->writepages() to write pages, it
      sets range (range_start/end or range_cyclic) always.
      
      And if range_cyclic is true, ->writepages() thinks the range is
      cyclic, otherwise it just uses range_start and range_end.
      
      This patch does,
      
          - Add LLONG_MAX, LLONG_MIN, ULLONG_MAX to include/linux/kernel.h
            -1 is usually ok for range_end (type is long long). But, if someone did,
      
      		range_end += val;		range_end is "val - 1"
      		u64val = range_end >> bits;	u64val is "~(0ULL)"
      
            or something, they are wrong. So, this adds LLONG_MAX to avoid nasty
            things, and uses LLONG_MAX for range_end.
      
          - All callers of ->writepages() sets range_start/end or range_cyclic.
      
          - Fix updates of ->writeback_index. It seems already bit strange.
            If it starts at 0 and ended by check of nr_to_write, this last
            index may reduce chance to scan end of file.  So, this updates
            ->writeback_index only if range_cyclic is true or whole-file is
            scanned.
      Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Nathan Scott <nathans@sgi.com>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: "Vladimir V. Saveliev" <vs@namesys.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      111ebb6e
  9. 16 5月, 2006 1 次提交
  10. 11 4月, 2006 1 次提交
  11. 28 3月, 2006 1 次提交
    • A
      [PATCH] Notifier chain update: API changes · e041c683
      Alan Stern 提交于
      The kernel's implementation of notifier chains is unsafe.  There is no
      protection against entries being added to or removed from a chain while the
      chain is in use.  The issues were discussed in this thread:
      
          http://marc.theaimsgroup.com/?l=linux-kernel&m=113018709002036&w=2
      
      We noticed that notifier chains in the kernel fall into two basic usage
      classes:
      
      	"Blocking" chains are always called from a process context
      	and the callout routines are allowed to sleep;
      
      	"Atomic" chains can be called from an atomic context and
      	the callout routines are not allowed to sleep.
      
      We decided to codify this distinction and make it part of the API.  Therefore
      this set of patches introduces three new, parallel APIs: one for blocking
      notifiers, one for atomic notifiers, and one for "raw" notifiers (which is
      really just the old API under a new name).  New kinds of data structures are
      used for the heads of the chains, and new routines are defined for
      registration, unregistration, and calling a chain.  The three APIs are
      explained in include/linux/notifier.h and their implementation is in
      kernel/sys.c.
      
      With atomic and blocking chains, the implementation guarantees that the chain
      links will not be corrupted and that chain callers will not get messed up by
      entries being added or removed.  For raw chains the implementation provides no
      guarantees at all; users of this API must provide their own protections.  (The
      idea was that situations may come up where the assumptions of the atomic and
      blocking APIs are not appropriate, so it should be possible for users to
      handle these things in their own way.)
      
      There are some limitations, which should not be too hard to live with.  For
      atomic/blocking chains, registration and unregistration must always be done in
      a process context since the chain is protected by a mutex/rwsem.  Also, a
      callout routine for a non-raw chain must not try to register or unregister
      entries on its own chain.  (This did happen in a couple of places and the code
      had to be changed to avoid it.)
      
      Since atomic chains may be called from within an NMI handler, they cannot use
      spinlocks for synchronization.  Instead we use RCU.  The overhead falls almost
      entirely in the unregister routine, which is okay since unregistration is much
      less frequent that calling a chain.
      
      Here is the list of chains that we adjusted and their classifications.  None
      of them use the raw API, so for the moment it is only a placeholder.
      
        ATOMIC CHAINS
        -------------
      arch/i386/kernel/traps.c:		i386die_chain
      arch/ia64/kernel/traps.c:		ia64die_chain
      arch/powerpc/kernel/traps.c:		powerpc_die_chain
      arch/sparc64/kernel/traps.c:		sparc64die_chain
      arch/x86_64/kernel/traps.c:		die_chain
      drivers/char/ipmi/ipmi_si_intf.c:	xaction_notifier_list
      kernel/panic.c:				panic_notifier_list
      kernel/profile.c:			task_free_notifier
      net/bluetooth/hci_core.c:		hci_notifier
      net/ipv4/netfilter/ip_conntrack_core.c:	ip_conntrack_chain
      net/ipv4/netfilter/ip_conntrack_core.c:	ip_conntrack_expect_chain
      net/ipv6/addrconf.c:			inet6addr_chain
      net/netfilter/nf_conntrack_core.c:	nf_conntrack_chain
      net/netfilter/nf_conntrack_core.c:	nf_conntrack_expect_chain
      net/netlink/af_netlink.c:		netlink_chain
      
        BLOCKING CHAINS
        ---------------
      arch/powerpc/platforms/pseries/reconfig.c:	pSeries_reconfig_chain
      arch/s390/kernel/process.c:		idle_chain
      arch/x86_64/kernel/process.c		idle_notifier
      drivers/base/memory.c:			memory_chain
      drivers/cpufreq/cpufreq.c		cpufreq_policy_notifier_list
      drivers/cpufreq/cpufreq.c		cpufreq_transition_notifier_list
      drivers/macintosh/adb.c:		adb_client_list
      drivers/macintosh/via-pmu.c		sleep_notifier_list
      drivers/macintosh/via-pmu68k.c		sleep_notifier_list
      drivers/macintosh/windfarm_core.c	wf_client_list
      drivers/usb/core/notify.c		usb_notifier_list
      drivers/video/fbmem.c			fb_notifier_list
      kernel/cpu.c				cpu_chain
      kernel/module.c				module_notify_list
      kernel/profile.c			munmap_notifier
      kernel/profile.c			task_exit_notifier
      kernel/sys.c				reboot_notifier_list
      net/core/dev.c				netdev_chain
      net/decnet/dn_dev.c:			dnaddr_chain
      net/ipv4/devinet.c:			inetaddr_chain
      
      It's possible that some of these classifications are wrong.  If they are,
      please let us know or submit a patch to fix them.  Note that any chain that
      gets called very frequently should be atomic, because the rwsem read-locking
      used for blocking chains is very likely to incur cache misses on SMP systems.
      (However, if the chain's callout routines may sleep then the chain cannot be
      atomic.)
      
      The patch set was written by Alan Stern and Chandra Seetharaman, incorporating
      material written by Keith Owens and suggestions from Paul McKenney and Andrew
      Morton.
      
      [jes@sgi.com: restructure the notifier chain initialization macros]
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NChandra Seetharaman <sekharan@us.ibm.com>
      Signed-off-by: NJes Sorensen <jes@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e041c683
  12. 26 3月, 2006 1 次提交
    • A
      [PATCH] roundup_pow_of_two() 64-bit fix · 962749af
      Andrew Morton 提交于
      fls() takes an integer, so roundup_pow_of_two() is busted for ulongs larger
      than 2^32-1.
      
      Fix this by implementing and using fls_long().
      
      (Why does roundup_pow_of_two() return a long?)
      
      (Why is roundup_pow_of_two() __attribute_const__ whereas long_log2() is
      __attribute_pure__?)
      
      (Why does long_log2() suck so much?  Because we were missing fls_long()?)
      
      Cc: Roland Dreier <rdreier@cisco.com>
      Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
      Cc: John Hawkes <hawkes@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      962749af
  13. 23 3月, 2006 1 次提交
    • A
      [PATCH] pause_on_oops command line option · dd287796
      Andrew Morton 提交于
      Attempt to fix the problem wherein people's oops reports scroll off the screen
      due to repeated oopsing or to oopses on other CPUs.
      
      If this happens the user can reboot with the `pause_on_oops=<seconds>' option.
      It will allow the first oopsing CPU to print an oops record just a single
      time.  Second oopsing attempts, or oopses on other CPUs will cause those CPUs
      to enter a tight loop until the specified number of seconds have elapsed.
      
      The patch implements the infrastructure generically in the expectation that
      architectures other than x86 will find it useful.
      
      Cc: Dave Jones <davej@codemonkey.org.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      dd287796
  14. 18 2月, 2006 1 次提交
  15. 17 1月, 2006 1 次提交
  16. 14 1月, 2006 1 次提交
    • J
      [NET]: Use NIP6_FMT in kernel.h · 46b86a2d
      Joe Perches 提交于
      There are errors and inconsistency in the display of NIP6 strings.
      	ie: net/ipv6/ip6_flowlabel.c
      
      There are errors and inconsistency in the display of NIPQUAD strings too.
      	ie: net/netfilter/nf_conntrack_ftp.c
      
      This patch:
      	adds NIP6_FMT to kernel.h
      	changes all code to use NIP6_FMT
      	fixes net/ipv6/ip6_flowlabel.c
      	adds NIPQUAD_FMT to kernel.h
      	fixes net/netfilter/nf_conntrack_ftp.c
      	changes a few uses of "%u.%u.%u.%u" to NIPQUAD_FMT for symmetry to NIP6_FMT
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      46b86a2d
  17. 11 1月, 2006 1 次提交
  18. 10 1月, 2006 1 次提交
  19. 09 1月, 2006 1 次提交
  20. 16 12月, 2005 1 次提交
  21. 07 11月, 2005 2 次提交
  22. 31 10月, 2005 1 次提交
  23. 13 9月, 2005 1 次提交
  24. 26 6月, 2005 1 次提交
    • I
      [PATCH] sched: voluntary kernel preemption · f8cbd99b
      Ingo Molnar 提交于
      This patch adds a new preemption model: 'Voluntary Kernel Preemption'.  The
      3 models can be selected from a new menu:
      
                  (X) No Forced Preemption (Server)
                  ( ) Voluntary Kernel Preemption (Desktop)
                  ( ) Preemptible Kernel (Low-Latency Desktop)
      
      we still default to the stock (Server) preemption model.
      
      Voluntary preemption works by adding a cond_resched()
      (reschedule-if-needed) call to every might_sleep() check.  It is lighter
      than CONFIG_PREEMPT - at the cost of not having as tight latencies.  It
      represents a different latency/complexity/overhead tradeoff.
      
      It has no runtime impact at all if disabled.  Here are size stats that show
      how the various preemption models impact the kernel's size:
      
          text    data     bss     dec     hex filename
       3618774  547184  179896 4345854  424ffe vmlinux.stock
       3626406  547184  179896 4353486  426dce vmlinux.voluntary   +0.2%
       3748414  548640  179896 4476950  445016 vmlinux.preempt     +3.5%
      
      voluntary-preempt is +0.2% of .text, preempt is +3.5%.
      
      This feature has been tested for many months by lots of people (and it's
      also included in the RHEL4 distribution and earlier variants were in Fedora
      as well), and it's intended for users and distributions who dont want to
      use full-blown CONFIG_PREEMPT for one reason or another.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f8cbd99b
  25. 01 5月, 2005 1 次提交
  26. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4