26 Jun, 2006

40 commits

  • First of all some necessary notes about UFS by it self: To avoid waste of disk
    space the tail of file consists not from blocks (which is ordinary big enough,
    16K usually), it consists from fragments(which is ordinary 2K). When file is
    growing its tail occupy 1 fragment, 2 fragments... At some stage decision to
    allocate whole block is made and all fragments are moved to one block.

    How this situation was handled before:

    ufs_prepare_write
    ->block_prepare_write
    ->ufs_getfrag_block
    ->...
    ->ufs_new_fragments:

    bh = sb_bread
    bh->b_blocknr = result + i;
    mark_buffer_dirty (bh);

    This is wrong solution, because:

    - it didn't take into consideration that there is another cache: "inode page
    cache"

    - because of sb_getblk uses not b_blocknr, (it uses page->index) to find
    certain block, this breaks sb_getblk.

    How this situation is handled now: we go though all "page inode cache", if
    there are no such page in cache we load it into cache, and change b_blocknr.

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • * After block allocation, we map it on the same "address" as 8 others
    blocks

    * We nullify block several times: once in ufs/block.c and once in
    block_*write_full_page, and use different "caches" for this.

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • Currently, ufs write support have two sets of problems: work with files and
    work with directories.

    This series of patches should solve the first problem.

    This patch is similar to http://lkml.org/lkml/2006/1/17/61 this patch
    complements it.

    The situation the same: in ufs_trunc_(not direct), we read block, check if
    count of links to it is equal to one, if so we finish cycle, if not
    continue. Because of "count of links" always >=2 this operation cause
    infinite cycle and hang up the kernel.

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • We can leak `clink' if drv->probe == 0.

    Signed-off-by: Jesper Juhl
    Cc: Adam Belay
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • Fix of some spelling errors in fs/freevxfs error messages and comments

    Signed-off-by: Cliff Wickman
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Cliff Wickman
     
  • Since raw_notifier chains don't benefit from any centralized locking
    protections, they shouldn't suffer from the associated limitations. Under
    some circumstances it might make sense for a raw_notifier callout routine
    to unregister itself from the notifier chain. This patch (as678) changes
    the notifier core to allow for such things.

    Signed-off-by: Alan Stern
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Stern
     
  • There are several instances of per_cpu(foo, raw_smp_processor_id()), which
    is semantically equivalent to __get_cpu_var(foo) but without the warning
    that smp_processor_id() can give if CONFIG_DEBUG_PREEMPT is enabled. For
    those architectures with optimized per-cpu implementations, namely ia64,
    powerpc, s390, sparc64 and x86_64, per_cpu() turns into more and slower
    code than __get_cpu_var(), so it would be preferable to use __get_cpu_var
    on those platforms.

    This defines a __raw_get_cpu_var(x) macro which turns into per_cpu(x,
    raw_smp_processor_id()) on architectures that use the generic per-cpu
    implementation, and turns into __get_cpu_var(x) on the architectures that
    have an optimized per-cpu implementation.

    Signed-off-by: Paul Mackerras
    Acked-by: David S. Miller
    Acked-by: Ingo Molnar
    Acked-by: Martin Schwidefsky
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mackerras
     
  • The core input layer is already calling add_input_randomness.

    Signed-off-by: Matt Mackall
    Cc: Dmitry Torokhov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Mackall
     
  • Disk devices should use add_disk_randomness rather than SA_SAMPLE_RANDOM

    Signed-off-by: Matt Mackall
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Mackall
     
  • Disk devices should use the add_disk_randomness API rather than
    SA_SAMPLE_RANDOM.

    Signed-off-by: Matt Mackall
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Mackall
     
  • The floppy driver is already calling add_disk_randomness as it should, so this
    was redundant.

    Signed-off-by: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Mackall
     
  • Upgrade scripts/bloat-o-meter to handle the names gcc 4 gives static
    symbols.

    Signed-off-by: Rob Landley
    Signed-off-by: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rob Landley
     
  • If CONFIG_KALLSYMS is defined and if it should happen that is_exported() is
    given a NULL 'mod' and lookup_symbol(name, __start___ksymtab,
    __stop___ksymtab) returns 0, then we'll end up dereferencing a NULL
    pointer.

    Signed-off-by: Jesper Juhl
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • This patch contains a total rewrite of the backlight infrastructure for
    portable Apple computers. Backward compatibility is retained. A sysfs
    interface allows userland to control the brightness with more steps than
    before. Userland is allowed to upload a brightness curve for different
    monitors, similar to Mac OS X.

    [akpm@osdl.org: add needed exports]
    Signed-off-by: Michael Hanselmann
    Acked-by: Benjamin Herrenschmidt
    Cc: Richard Purdie
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Hanselmann
     
  • Became irrelevant when x86_64 unexported ia32_sys_call_table.

    Signed-off-by: Adrian Bunk
    Cc: Andi Kleen
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Convert the generic irq code to use irq controller, this gets rid of the
    machine specific callbacks and gives better control over irq handling without
    duplicating lots of code.

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Introduce irq controller and use it to manage auto vector interrupts.
    Introduce setup_irq() which can be used for irq setup.

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Fix amiga irq numbering, so they are after the generic IRQ_AUTO defines and
    remove the IRQ_AMIGA_AUTO defines.

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Rename IRQ1..IRQ7 to IRQ_AUTO_1..IRQ_AUTO_7 and remove the duplicate
    defintions.

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Use separate entry points for auto and user vector interrupts and cleanup
    naming a little.

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Move some of the prints in die_if_kernel() to show_registers() and call that
    instead of show_stack(), so show_registers() prints now similiar info as other
    archs. Clean up the function a little.

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Additions to dma API with some small cleanups.

    Signed-off-by: Richard Hirst
    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Make flush_icache() an inline function and clean it up a litte.

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Ignore empty pmd entry during iomap (these are the holes between the
    mappings).

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • gcc-3.x has a few problems detecting a constant parameter.

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Add cpu_relax() to infinite loops in crash.c and doublefault.c. This is
    the safest change.

    Signed-off-by: Chuck Ebbert
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Ebbert
     
  • Add cpu_relax() to various smpboot.c init loops. cpu_relax() always implies a
    barrier (according to Arjan), so remove those as well.

    Signed-off-by: Andreas Mohr
    Cc: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andreas Mohr
     
  • Clean up and refactor i386 sub-architecture setup.

    This change moves all the code from the
    asm-i386/mach-*/setup_arch_pre/post.h headers, into
    arch/i386/mach-*/setup.c. mach-*/setup_arch_pre.h is renamed to
    setup_arch.h, and contains only things which should be in header files. It
    is purely code-motion; there should be no functional changes at all.

    Several functions in arch/i386/kernel/setup.c needed to be made non-static
    so that they're visible to the code in mach-*/setup.c. asm-i386/setup.h is
    used to hold the prototypes for these functions.

    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Chris Wright
    Cc: Zachary Amsden
    Cc: Chris Wright
    Cc: Christian Limpach
    Cc: Martin Bligh
    Cc: James Bottomley
    Cc: Andrey Panin
    Cc: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeremy Fitzhardinge
     
  • Hugh clarified the role of VM_LOCKED. So we can now implement page
    migration for mlocked pages.

    Allow the migration of mlocked pages. This means that try_to_unmap must
    unmap mlocked pages in the migration case.

    Signed-off-by: Christoph Lameter
    Acked-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Hooks for calling vma specific migration functions

    With this patch a vma may define a vma->vm_ops->migrate function. That
    function may perform page migration on its own (some vmas may not contain page
    structs and therefore cannot be handled by regular page migration. Pages in a
    vma may require special preparatory treatment before migration is possible
    etc) . Only mmap_sem is held when the migration function is called. The
    migrate() function gets passed two sets of nodemasks describing the source and
    the target of the migration. The flags parameter either contains

    MPOL_MF_MOVE which means that only pages used exclusively by
    the specified mm should be moved

    or

    MPOL_MF_MOVE_ALL which means that pages shared with other processes
    should also be moved.

    The migration function returns 0 on success or an error condition. An error
    condition will prevent regular page migration from occurring.

    On its own this patch cannot be included since there are no users for this
    functionality. But it seems that the uncached allocator will need this
    functionality at some point.

    Signed-off-by: Christoph Lameter
    Cc: Hugh Dickins
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter