1. 09 5月, 2007 1 次提交
  2. 08 5月, 2007 4 次提交
    • R
      freezer: remove PF_NOFREEZE from handle_initrd · 726162b5
      Rafael J. Wysocki 提交于
      Make handle_initrd() call try_to_freeze() in a suitable place instead of setting
      PF_NOFREEZE for the current task.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NNigel Cunningham <nigel@nigel.suspend2.net>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      726162b5
    • B
      blackfin architecture · 1394f032
      Bryan Wu 提交于
      This adds support for the Analog Devices Blackfin processor architecture, and
      currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
      (Dual Core) devices, with a variety of development platforms including those
      avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
      BF561-EZKIT), and Bluetechnix!  Tinyboards.
      
      The Blackfin architecture was jointly developed by Intel and Analog Devices
      Inc.  (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
      December of 2000.  Since then ADI has put this core into its Blackfin
      processor family of devices.  The Blackfin core has the advantages of a clean,
      orthogonal,RISC-like microprocessor instruction set.  It combines a dual-MAC
      (Multiply/Accumulate), state-of-the-art signal processing engine and
      single-instruction, multiple-data (SIMD) multimedia capabilities into a single
      instruction-set architecture.
      
      The Blackfin architecture, including the instruction set, is described by the
      ADSP-BF53x/BF56x Blackfin Processor Programming Reference
      http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf
      
      The Blackfin processor is already supported by major releases of gcc, and
      there are binary and source rpms/tarballs for many architectures at:
      http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
      documentation, including "getting started" guides available at:
      http://docs.blackfin.uclinux.org/ which provides links to the sources and
      patches you will need in order to set up a cross-compiling environment for
      bfin-linux-uclibc
      
      This patch, as well as the other patches (toolchain, distribution,
      uClibc) are actively supported by Analog Devices Inc, at:
      http://blackfin.uclinux.org/
      
      We have tested this on LTP, and our test plan (including pass/fails) can
      be found at:
      http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel
      
      [m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
      Signed-off-by: NBryan Wu <bryan.wu@analog.com>
      Signed-off-by: NMariusz Kozlowski <m.kozlowski@tuxland.pl>
      Signed-off-by: NAubrey Li <aubrey.li@analog.com>
      Signed-off-by: NJie Zhang <jie.zhang@analog.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1394f032
    • C
      SLUB core · 81819f0f
      Christoph Lameter 提交于
      This is a new slab allocator which was motivated by the complexity of the
      existing code in mm/slab.c. It attempts to address a variety of concerns
      with the existing implementation.
      
      A. Management of object queues
      
         A particular concern was the complex management of the numerous object
         queues in SLAB. SLUB has no such queues. Instead we dedicate a slab for
         each allocating CPU and use objects from a slab directly instead of
         queueing them up.
      
      B. Storage overhead of object queues
      
         SLAB Object queues exist per node, per CPU. The alien cache queue even
         has a queue array that contain a queue for each processor on each
         node. For very large systems the number of queues and the number of
         objects that may be caught in those queues grows exponentially. On our
         systems with 1k nodes / processors we have several gigabytes just tied up
         for storing references to objects for those queues  This does not include
         the objects that could be on those queues. One fears that the whole
         memory of the machine could one day be consumed by those queues.
      
      C. SLAB meta data overhead
      
         SLAB has overhead at the beginning of each slab. This means that data
         cannot be naturally aligned at the beginning of a slab block. SLUB keeps
         all meta data in the corresponding page_struct. Objects can be naturally
         aligned in the slab. F.e. a 128 byte object will be aligned at 128 byte
         boundaries and can fit tightly into a 4k page with no bytes left over.
         SLAB cannot do this.
      
      D. SLAB has a complex cache reaper
      
         SLUB does not need a cache reaper for UP systems. On SMP systems
         the per CPU slab may be pushed back into partial list but that
         operation is simple and does not require an iteration over a list
         of objects. SLAB expires per CPU, shared and alien object queues
         during cache reaping which may cause strange hold offs.
      
      E. SLAB has complex NUMA policy layer support
      
         SLUB pushes NUMA policy handling into the page allocator. This means that
         allocation is coarser (SLUB does interleave on a page level) but that
         situation was also present before 2.6.13. SLABs application of
         policies to individual slab objects allocated in SLAB is
         certainly a performance concern due to the frequent references to
         memory policies which may lead a sequence of objects to come from
         one node after another. SLUB will get a slab full of objects
         from one node and then will switch to the next.
      
      F. Reduction of the size of partial slab lists
      
         SLAB has per node partial lists. This means that over time a large
         number of partial slabs may accumulate on those lists. These can
         only be reused if allocator occur on specific nodes. SLUB has a global
         pool of partial slabs and will consume slabs from that pool to
         decrease fragmentation.
      
      G. Tunables
      
         SLAB has sophisticated tuning abilities for each slab cache. One can
         manipulate the queue sizes in detail. However, filling the queues still
         requires the uses of the spin lock to check out slabs. SLUB has a global
         parameter (min_slab_order) for tuning. Increasing the minimum slab
         order can decrease the locking overhead. The bigger the slab order the
         less motions of pages between per CPU and partial lists occur and the
         better SLUB will be scaling.
      
      G. Slab merging
      
         We often have slab caches with similar parameters. SLUB detects those
         on boot up and merges them into the corresponding general caches. This
         leads to more effective memory use. About 50% of all caches can
         be eliminated through slab merging. This will also decrease
         slab fragmentation because partial allocated slabs can be filled
         up again. Slab merging can be switched off by specifying
         slub_nomerge on boot up.
      
         Note that merging can expose heretofore unknown bugs in the kernel
         because corrupted objects may now be placed differently and corrupt
         differing neighboring objects. Enable sanity checks to find those.
      
      H. Diagnostics
      
         The current slab diagnostics are difficult to use and require a
         recompilation of the kernel. SLUB contains debugging code that
         is always available (but is kept out of the hot code paths).
         SLUB diagnostics can be enabled via the "slab_debug" option.
         Parameters can be specified to select a single or a group of
         slab caches for diagnostics. This means that the system is running
         with the usual performance and it is much more likely that
         race conditions can be reproduced.
      
      I. Resiliency
      
         If basic sanity checks are on then SLUB is capable of detecting
         common error conditions and recover as best as possible to allow the
         system to continue.
      
      J. Tracing
      
         Tracing can be enabled via the slab_debug=T,<slabcache> option
         during boot. SLUB will then protocol all actions on that slabcache
         and dump the object contents on free.
      
      K. On demand DMA cache creation.
      
         Generally DMA caches are not needed. If a kmalloc is used with
         __GFP_DMA then just create this single slabcache that is needed.
         For systems that have no ZONE_DMA requirement the support is
         completely eliminated.
      
      L. Performance increase
      
         Some benchmarks have shown speed improvements on kernbench in the
         range of 5-10%. The locking overhead of slub is based on the
         underlying base allocation size. If we can reliably allocate
         larger order pages then it is possible to increase slub
         performance much further. The anti-fragmentation patches may
         enable further performance increases.
      
      Tested on:
      i386 UP + SMP, x86_64 UP + SMP + NUMA emulation, IA64 NUMA + Simulator
      
      SLUB Boot options
      
      slub_nomerge		Disable merging of slabs
      slub_min_order=x	Require a minimum order for slab caches. This
      			increases the managed chunk size and therefore
      			reduces meta data and locking overhead.
      slub_min_objects=x	Mininum objects per slab. Default is 8.
      slub_max_order=x	Avoid generating slabs larger than order specified.
      slub_debug		Enable all diagnostics for all caches
      slub_debug=<options>	Enable selective options for all caches
      slub_debug=<o>,<cache>	Enable selective options for a certain set of
      			caches
      
      Available Debug options
      F		Double Free checking, sanity and resiliency
      R		Red zoning
      P		Object / padding poisoning
      U		Track last free / alloc
      T		Trace all allocs / frees (only use for individual slabs).
      
      To use SLUB: Apply this patch and then select SLUB as the default slab
      allocator.
      
      [hugh@veritas.com: fix an oops-causing locking error]
      [akpm@linux-foundation.org: various stupid cleanups and small fixes]
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      81819f0f
    • C
      Safer nr_node_ids and nr_node_ids determination and initial values · 476f3534
      Christoph Lameter 提交于
      The nr_cpu_ids value is currently only calculated in smp_init.  However, it
      may be needed before (SLUB needs it on kmem_cache_init!) and other kernel
      components may also want to allocate dynamically sized per cpu array before
      smp_init.  So move the determination of possible cpus into sched_init()
      where we already loop over all possible cpus early in boot.
      
      Also initialize both nr_node_ids and nr_cpu_ids with the highest value they
      could take.  If we have accidental users before these values are determined
      then the current valud of 0 may cause too small per cpu and per node arrays
      to be allocated.  If it is set to the maximum possible then we only waste
      some memory for early boot users.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      476f3534
  3. 03 5月, 2007 3 次提交
  4. 07 3月, 2007 1 次提交
  5. 21 2月, 2007 1 次提交
  6. 20 2月, 2007 1 次提交
    • A
      [PATCH] Declare init_irq_proc before we use it. · 6168a702
      Andrew Morton 提交于
      powerpc gets:
      
      init/main.c: In function `do_basic_setup':
      init/main.c:714: warning: implicit declaration of function `init_irq_proc'
      
      but we cannot include linux/irq.h in generic code.
      
      Fix it by moving the declaration into linux/interrupt.h instead.
      
      And make sure all code that defines init_irq_proc() is including
      linux/interrupt.h.
      
      And nuke an ifdef-in-C
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6168a702
  7. 17 2月, 2007 1 次提交
  8. 15 2月, 2007 4 次提交
  9. 13 2月, 2007 2 次提交
    • V
      [PATCH] generic: Break init() in two parts to avoid MODPOST warnings · ee5bfa64
      Vivek Goyal 提交于
      o init() is a non __init function in .text section but it calls many
        functions which are in .init.text section. Hence MODPOST generates lots
        of cross reference warnings on i386 if compiled with CONFIG_RELOCATABLE=y
      
      WARNING: vmlinux - Section mismatch: reference to .init.text:smp_prepare_cpus from .text between 'init' (at offset 0xc0101049) and 'rest_init'
      WARNING: vmlinux - Section mismatch: reference to .init.text:migration_init from .text between 'init' (at offset 0xc010104e) and 'rest_init'
      WARNING: vmlinux - Section mismatch: reference to .init.text:spawn_ksoftirqd from .text between 'init' (at offset 0xc0101053) and 'rest_init'
      
      o This patch breaks down init() in two parts. One part which can go
        in .init.text section and can be freed and other part which has to
        be non __init(init_post()). Now init() calls init_post() and init_post()
        does not call any functions present in .init sections. Hence getting
        rid of warnings.
      Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      ee5bfa64
    • A
      [PATCH] Dynamic kernel command-line: common · 30d7e0d4
      Alon Bar-Lev 提交于
      Current implementation stores a static command-line buffer allocated to
      COMMAND_LINE_SIZE size.  Most architectures stores two copies of this buffer,
      one for future reference and one for parameter parsing.
      
      Current kernel command-line size for most architecture is much too small for
      module parameters, video settings, initramfs paramters and much more.  The
      problem is that setting COMMAND_LINE_SIZE to a grater value, allocates static
      buffers.
      
      In order to allow a greater command-line size, these buffers should be
      dynamically allocated or marked as init disposable buffers, so unused memory
      can be released.
      
      This patch renames the static saved_command_line variable into
      boot_command_line adding __initdata attribute, so that it can be disposed
      after initialization.  This rename is required so applications that use
      saved_command_line will not be affected by this change.
      
      It reintroduces saved_command_line as dynamically allocated buffer to match
      the data in boot_command_line.
      
      It also mark secondary command-line buffer as __initdata, and copies it to
      dynamically allocated static_command_line buffer components may hold reference
      to it after initialization.
      
      This patch is for linux-2.6.20-rc4-mm1 and is divided to target each
      architecture.  I could not check this in any architecture so please forgive me
      if I got it wrong.
      
      The per-architecture modification is very simple, use boot_command_line in
      place of saved_command_line.  The common code is the change into dynamic
      command-line.
      
      This patch:
      
      1. Rename saved_command_line into boot_command_line, mark as init
         disposable.
      
      2. Add dynamic allocated saved_command_line.
      
      3. Add dynamic allocated static_command_line.
      
      4. During startup copy: boot_command_line into saved_command_line.  arch
         command_line into static_command_line.
      
      5. Parse static_command_line and not arch command_line, so arch
         command_line may be freed.
      Signed-off-by: NAlon Bar-Lev <alon.barlev@gmail.com>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Ian Molton <spyro@f2s.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
      Cc: Richard Curnow <rc@rc0.org.uk>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      30d7e0d4
  10. 12 2月, 2007 4 次提交
  11. 12 1月, 2007 1 次提交
    • L
      Don't put "linux_banner" in the .init section · c71551ad
      Linus Torvalds 提交于
      It might save a few bytes after bootup, but it causes the string to be
      linked in at the end of the final vmlinux image, which defeats the whole
      point of doing all this, namely allowing some broken user-space binaries
      to search for the kernel version string in the kernel binary.
      
      So just remove the __init specifier.
      
      Cc: Olaf Hering <olaf@aepfle.de>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Andrey Borzenkov <arvidjaar@mail.ru>
      Cc: Andrew Morton <akpm@osdl.org>
      Acked-by: NAndy Whitcroft <apw@shadowen.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c71551ad
  12. 11 1月, 2007 2 次提交
  13. 06 1月, 2007 1 次提交
  14. 23 12月, 2006 3 次提交
  15. 21 12月, 2006 1 次提交
  16. 13 12月, 2006 1 次提交
  17. 12 12月, 2006 2 次提交
    • L
      Make sure we populate the initroot filesystem late enough · 8d610dd5
      Linus Torvalds 提交于
      We should not initialize rootfs before all the core initializers have
      run.  So do it as a separate stage just before starting the regular
      driver initializers.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8d610dd5
    • L
      Make SLES9 "get_kernel_version" work on the kernel binary again · 8993780a
      Linus Torvalds 提交于
      As reported by Andy Whitcroft, at least the SLES9 initrd build process
      depends on getting the kernel version from the kernel binary.  It does
      that by simply trawling the binary and looking for the signature of the
      "linux_banner" string (the string "Linux version " to be exact. Which
      is really broken in itself, but whatever..)
      
      That got broken when the string was changed to allow /proc/version to
      change the UTS release information dynamically, and "get_kernel_version"
      thus returned "%s" (see commit a2ee8649:
      "[PATCH] Fix linux banner utsname information").
      
      This just restores "linux_banner" as a static string, which should fix
      the version finding.  And /proc/version simply uses a different string.
      
      To avoid wasting even that miniscule amount of memory, the early boot
      string should really be marked __initdata, but that just causes the same
      bug in SLES9 to re-appear, since it will then find other occurrences of
      "Linux version " first.
      
      Cc: Andy Whitcroft <apw@shadowen.org>
      Acked-by: NHerbert Poetzl <herbert@13thfloor.at>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Andrew Morton <akpm@osdl.org>
      Cc: Steve Fox <drfickle@us.ibm.com>
      Acked-by: NOlaf Hering <olaf@aepfle.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8993780a
  18. 11 12月, 2006 1 次提交
    • A
      [PATCH] io-accounting: core statistics · 7c3ab738
      Andrew Morton 提交于
      The present per-task IO accounting isn't very useful.  It simply counts the
      number of bytes passed into read() and write().  So if a process reads 1MB
      from an already-cached file, it is accused of having performed 1MB of I/O,
      which is wrong.
      
      (David Wright had some comments on the applicability of the present logical IO accounting:
      
        For billing purposes it is useless but for workload analysis it is very
        useful
      
        read_bytes/read_calls  average read request size
        write_bytes/write_calls average write request size
      
        read_bytes/read_blocks ie logical/physical can indicate hit rate or thrashing
        write_bytes/write_blocks  ie logical/physical  guess since pdflush writes can
                                                      be missed
      
        I often look for logical larger than physical to see filesystem cache
        problems.  And the bytes/cpusec can help find applications that are
        dominating the cache and causing slow interactive response from page cache
        contention.
      
        I want to find the IO intensive applications and make sure they are doing
        efficient IO.  Thus the acctcms(sysV) or csacms command would give the high
        IO commands).
      
      This patchset adds new accounting which tries to be more accurate.  We account
      for three things:
      
      reads:
      
        attempt to count the number of bytes which this process really did cause
        to be fetched from the storage layer.  Done at the submit_bio() level, so it
        is accurate for block-backed filesystems.  I also attempt to wire up NFS and
        CIFS.
      
      writes:
      
        attempt to count the number of bytes which this process caused to be sent
        to the storage layer.  This is done at page-dirtying time.
      
        The big inaccuracy here is truncate.  If a process writes 1MB to a file
        and then deletes the file, it will in fact perform no writeout.  But it will
        have been accounted as having caused 1MB of write.
      
        So...
      
      cancelled_writes:
      
        account the number of bytes which this process caused to not happen, by
        truncating pagecache.
      
        We _could_ just subtract this from the process's `write' accounting.  But
        that means that some processes would be reported to have done negative
        amounts of write IO, which is silly.
      
        So we just report the raw number and punt this decision up to userspace.
      
      Now, we _could_ account for writes at the physical I/O level.  But
      
      - This would require that we track memory-dirtying tasks at the per-page
        level (would require a new pointer in struct page).
      
      - It would mean that IO statistics for a process are usually only available
        long after that process has exitted.  Which means that we probably cannot
        communicate this info via taskstats.
      
      This patch:
      
      Wire up the kernel-private data structures and the accessor functions to
      manipulate them.
      
      Cc: Jay Lan <jlan@sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Chris Sturtivant <csturtiv@sgi.com>
      Cc: Tony Ernst <tee@sgi.com>
      Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
      Cc: David Wright <daw@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7c3ab738
  19. 09 12月, 2006 2 次提交
  20. 08 12月, 2006 3 次提交
  21. 07 12月, 2006 1 次提交