18 Oct, 2007

1 commit

  • * 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block:
    [SCSI] Remove full sg table memset()
    [SCSI] ide-scsi: remove usage of sg_last()
    Fix loop terminating conditions in fill_sg().
    [BLOCK] Clear sg entry before filling in blk_rq_map_sg()
    IA64: iommu uses sg_next with an invalid sg element
    cciss: disable DMA refetch on Smart Array P600
    swiotlb: fix map_sg failure handling
    SPARC64: fix iommu sg chaining
    [SCSI] ide-scsi: use scsi_sg_count() instead of ->use_sg

    Linus Torvalds
     

17 Oct, 2007

23 commits

  • Be explicit about printing hex.

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

    Rene Herman
     
  • Negative shifts are not allowed in C (the result is undefined). Same thing
    with full-width shifts.

    It works on most platforms but not on the VAX with gcc 4.0.1 (it results in an
    "operand reserved" fault).

    Shifting by more than the width of the value on the left is also not
    allowed. I think the extra '>> 1' tacked on at the end in the original
    code was an attempt to work around that. Getting rid of that is an extra
    feature of this patch.

    Here's the chapter and verse, taken from the final draft of the C99
    standard ("6.5.7 Bitwise shift operators", paragraph 3):

    "The integer promotions are performed on each of the operands. The
    type of the result is that of the promoted left operand. If the
    value of the right operand is negative or is greater than or equal
    to the width of the promoted left operand, the behavior is
    undefined."

    Thank you to Jan-Benedict Glaw, Christoph Hellwig, Maciej Rozycki, Pekka
    Enberg, Andreas Schwab, and Christoph Lameter for review. Special thanks
    to Andreas for spotting that my fix only removed half the undefined
    behaviour.

    Signed-off-by: Peter Lund
    Christoph Lameter
    Cc: Christoph Hellwig
    Cc: "Maciej W. Rozycki"
    Cc: Pekka Enberg
    Cc: Andreas Schwab
    Cc: Nick Piggin
    Cc: WU Fengguang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Lund
     
  • Various architectures may call bust_spinlocks() recursively; the function
    itself, however, doesn't appear to be meant to be called in this manner.
    Nevertheless, this doesn't appear to be a problem as long as
    bust_spinlocks(0) doesn't get called twice in a row (otherwise,
    unblank_screen() may enter the scheduler). However, at least on i386 die()
    has been capable of returning (and on other architectures this should
    really be that way, too) when notify_die() returns NOTIFY_STOP.

    Short of getting a reply to a respective query, this patch makes
    bust_spinlocks() increment/decrement oops_in_progress, and wake klogd only
    when the count drops back to zero.

    Signed-off-by: Jan Beulich
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Beulich
     
  • Hello, I fixed and tested a small bug in lib/sort.c file, heap sort
    function.

    The fix avoids unnecessary swap of contents when i is 0 (saves few loads
    and stores), which happens every time sort function is called. I felt the
    fix is worth bringing it to your attention given the importance and
    frequent use of the sort function.

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

    Subbaiah Venkata
     
  • Every file should include the headers containing the prototypes for its global
    functions (in this case ioremap_page_range()).

    Signed-off-by: Adrian Bunk
    Acked-by: Haavard Skinnemoen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • It would be nice if the argv_split library function could gracefully handle
    a NULL pointer in the argcp parameter, so as to allow functions using it
    that did not care about the value of argc to not have to declare a useless
    variable. This patch accomplishes that. Tested by me, with successful
    results.

    Signed-off-by: Neil Horman
    Acked-by: Jeremy Fitzhardinge
    Cc: Satyam Sharma
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Neil Horman
     
  • Slab constructors currently have a flags parameter that is never used. And
    the order of the arguments is opposite to other slab functions. The object
    pointer is placed before the kmem_cache pointer.

    Convert

    ctor(void *object, struct kmem_cache *s, unsigned long flags)

    to

    ctor(struct kmem_cache *s, void *object)

    throughout the kernel

    [akpm@linux-foundation.org: coupla fixes]
    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Given a set of objects, floating proportions aims to efficiently give the
    proportional 'activity' of a single item as compared to the whole set. Where
    'activity' is a measure of a temporal property of the items.

    It is efficient in that it need not inspect any other items of the set
    in order to provide the answer. It is not even needed to know how many
    other items there are.

    It has one parameter, and that is the period of 'time' over which the
    'activity' is measured.

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • provide a way to tell lockdep about percpu_counters that are supposed to be
    used from irq safe contexts.

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • alloc_percpu can fail, propagate that error.

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Provide an accurate version of percpu_counter_read.

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • s/percpu_counter_sum/&_positive/

    Because its consitent with percpu_counter_read*

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Provide a method to set a percpu counter to a specified value.

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • percpu_counter is a s64 counter, make _add consitent.

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Because the current batch setup has an quadric error bound on the counter,
    allow for an alternative setup.

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • s/percpu_counter_mod/percpu_counter_add/

    Because its a better name, _mod implies modulo.

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • sg list elements might not be continuous.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     
  • * 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block: (63 commits)
    Fix memory leak in dm-crypt
    SPARC64: sg chaining support
    SPARC: sg chaining support
    PPC: sg chaining support
    PS3: sg chaining support
    IA64: sg chaining support
    x86-64: enable sg chaining
    x86-64: update pci-gart iommu to sg helpers
    x86-64: update nommu to sg helpers
    x86-64: update calgary iommu to sg helpers
    swiotlb: sg chaining support
    i386: enable sg chaining
    i386 dma_map_sg: convert to using sg helpers
    mmc: need to zero sglist on init
    Panic in blk_rq_map_sg() from CCISS driver
    remove sglist_len
    remove blk_queue_max_phys_segments in libata
    revert sg segment size ifdefs
    Fixup u14-34f ENABLE_SG_CHAINING
    qla1280: enable use_sg_chaining option
    ...

    Linus Torvalds
     
  • This patch marks a number of allocations that are either short-lived such as
    network buffers or are reclaimable such as inode allocations. When something
    like updatedb is called, long-lived and unmovable kernel allocations tend to
    be spread throughout the address space which increases fragmentation.

    This patch groups these allocations together as much as possible by adding a
    new MIGRATE_TYPE. The MIGRATE_RECLAIMABLE type is for allocations that can be
    reclaimed on demand, but not moved. i.e. they can be migrated by deleting
    them and re-reading the information from elsewhere.

    Signed-off-by: Mel Gorman
    Cc: Andy Whitcroft
    Cc: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     
  • A while back, Nick Piggin introduced a patch to reduce the node memory
    usage for small files (commit cfd9b7df4abd3257c9e381b0e445817b26a51c0c):

    -#define RADIX_TREE_MAP_SHIFT 6
    +#define RADIX_TREE_MAP_SHIFT (CONFIG_BASE_SMALL ? 4 : 6)

    Unfortunately, he didn't take into account the fact that the
    calculation of the maximum path was based on an assumption of having
    to round up:

    #define RADIX_TREE_MAX_PATH (RADIX_TREE_INDEX_BITS/RADIX_TREE_MAP_SHIFT + 2)

    So, if CONFIG_BASE_SMALL is set, you will end up with a
    RADIX_TREE_MAX_PATH that is one greater than necessary. The practical
    upshot of this is just a bit of wasted memory (one long in the
    height_to_maxindex array, an extra pre-allocated radix tree node per
    cpu, and extra stack usage in a couple of functions), but it seems
    worth getting right.

    It's also worth noting that I never build with CONFIG_BASE_SMALL.
    What I did to test this was duplicate the code in a small user-space
    program and check the results of the calculations for max path and the
    contents of the height_to_maxindex array.

    Signed-off-by: Jeff Moyer
    Acked-by: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Moyer
     
  • Rather than sign direct radix-tree pointers with a special bit, sign the
    indirect one that hangs off the root. This means that, given a lookup_slot
    operation, the invalid result will be differentiated from the valid
    (previously, valid results could have the bit either set or clear).

    This does not affect slot lookups which occur under lock -- they can never
    return an invalid result. Is needed in future for lockless pagecache.

    Signed-off-by: Nick Piggin
    Acked-by: Peter Zijlstra
    Cc: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Introduce radix_tree_next_hole(root, index, max_scan) to scan radix tree for
    the first hole. It will be used in interleaved readahead.

    The implementation is dumb and obviously correct. It can help debug(and
    document) the possible smart one in future.

    Cc: Nick Piggin
    Signed-off-by: Fengguang Wu
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fengguang Wu
     
  • Optionally add a boot delay after each kernel printk() call, crudely
    measured in milliseconds, with a maximum delay of 10 seconds per printk.

    Enable CONFIG_BOOT_PRINTK_DELAY=y and then add (e.g.):
    "lpj=loops_per_jiffy boot_delay=100"
    to the kernel command line.

    It has been useful in cases like "during boot, my machine just reboots or the
    screen goes black" by slowing down printk, (and adding initcall_debug), we can
    usually see the last thing that happened before the lights went out which is
    usually a valuable clue.

    [akpm@linux-foundation.org: not all architectures implement CONFIG_HZ]
    [akpm@linux-foundation.org: fix lots of stuff]
    [bunk@stusta.de: kernel/printk.c: make 2 variables static]
    [heiko.carstens@de.ibm.com: fix slow down printk on boot compile error]
    Signed-off-by: Randy Dunlap
    Signed-off-by: Dave Jones
    Signed-off-by: Adrian Bunk
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

16 Oct, 2007

1 commit


15 Oct, 2007

1 commit


13 Oct, 2007

13 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (37 commits)
    PCI: merge almost all of pci_32.h and pci_64.h together
    PCI: X86: Introduce and enable PCI domain support
    PCI: Add 'nodomains' boot option, and pci_domains_supported global
    PCI: modify PCI bridge control ISA flag for clarity
    PCI: use _CRS for PCI resource allocation
    PCI: avoid P2P prefetch window for expansion ROMs
    PCI: skip ISA ioresource alignment on some systems
    PCI: remove transparent bridge sizing
    pci: write file size to inode on proc bus file write
    pci: use size stored in proc_dir_entry for proc bus files
    pci: implement "pci=noaer"
    PCI: fix IDE legacy mode resources
    MSI: Use correct data offset for 32-bit MSI in read_msi_msg()
    PCI: Fix incorrect argument order to list_add_tail() in PCI dynamic ID code
    PCI: i386: Compaq EVO N800c needs PCI bus renumbering
    PCI: Remove no longer correct documentation regarding MSI vector assignment
    PCI: re-enable onboard sound on "MSI K8T Neo2-FIR"
    PCI: quirk_vt82c586_acpi: Omit reading PCI revision ID
    PCI: quirk amd_8131_mmrbc: Omit reading pci revision ID
    cpqphp: Use PCI_CLASS_REVISION instead of PCI_REVISION_ID for read
    ...

    Linus Torvalds
     
  • On at least ARM (and I'm told MIPS too) dma_free_coherent() has a newish
    call context requirement: unlike its dma_alloc_coherent() sibling, it may
    not be called with IRQs disabled. (This was new behavior on ARM as of late
    2005, caused by ARM SMP updates.) This little surprise can be annoyingly
    driver-visible.

    Since it looks like that restriction won't be removed, this patch changes
    the definition of the API to include that requirement. Also, to help catch
    nonportable drivers, it updates the x86 and swiotlb versions to include the
    relevant warnings. (I already observed that it trips on the
    bus_reset_tasklet of the new firewire_ohci driver.)

    Signed-off-by: David Brownell
    Cc: David Miller
    Acked-by: Russell King
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     
  • I've been hacking on these files for a while now, might as well make it
    official...

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • There is only one user of it, and it is only a wrapper for kset_init().

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Sysfs file poll implementation is scattered over sysfs and kobject.
    Event numbering is done in sysfs_dirent but wait itself is done on
    kobject. This not only unecessarily bloats both kobject and
    sysfs_dirent but is also buggy - if a sysfs_dirent is removed while
    there still are pollers, the associaton betwen the kobject and
    sysfs_dirent breaks and kobject may be freed with the pollers still
    sleeping on it.

    This patch moves whole poll implementation into sysfs_open_dirent.
    Each time a sysfs_open_dirent is created, event number restarts from 1
    and pollers sleep on sysfs_open_dirent. As event sequence number is
    meaningless without any open file and pollers should have open file
    and thus sysfs_open_dirent, this ephemeral event counting works and is
    a saner implementation.

    This patch fixes the dnagling sleepers bug and reduces the sizes of
    kobject and sysfs_dirent by one pointer.

    Signed-off-by: Tejun Heo
    Acked-by: Cornelia Huck
    Signed-off-by: Greg Kroah-Hartman

    Tejun Heo
     
  • Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • Move uevent specific logic from the core into kobject_uevent.c, which
    does no longer require to link the unused string array if hotplug
    is not compiled in.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • While shadow directories appear to be a good idea, the current scheme
    of controlling their creation and destruction outside of sysfs appears
    to be a locking and maintenance nightmare in the face of sysfs
    directories dynamically coming and going. Which can now occur for
    directories containing network devices when CONFIG_SYSFS_DEPRECATED is
    not set.

    This patch removes everything from the initial shadow directory support
    that allowed the shadow directory creation to be controlled at a higher
    level. So except for a few bits of sysfs_rename_dir everything from
    commit b592fcfe7f06c15ec11774b5be7ce0de3aa86e73 is now gone.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • Due to historical reasons, struct kobject contained a static array for
    the name, and a dynamic pointer in case the name got bigger than the
    array. That's just dumb, as people didn't always know which variable to
    reference, even with the accessor for the kobject name.

    This patch removes the static array, potentially saving a lot of memory
    as the majority of kobjects do not have a very long name.

    Thanks to Kay for the idea to do this.

    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • There are no more subsystems, it's a kset now so remove the function and
    the only two users, which are in the driver core.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • There are no more subsystems, it's a kset now so remove the function and
    the only two users, which are in the driver core.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • The kernel creates a process for every event that is send, even when
    there is no binary it could execute. We are needlessly creating around
    200-300 failing processes during early bootup, until we have the chance
    to disable it from userspace.

    This change allows us to disable /sbin/hotplug entirely, if you want to,
    by setting UEVENT_HELPER_PATH="" in the kernel config.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • This changes the uevent buffer functions to use a struct instead of a
    long list of parameters. It does no longer require the caller to do the
    proper buffer termination and size accounting, which is currently wrong
    in some places. It fixes a known bug where parts of the uevent
    environment are overwritten because of wrong index calculations.

    Many thanks to Mathieu Desnoyers for finding bugs and improving the
    error handling.

    Signed-off-by: Kay Sievers
    Cc: Mathieu Desnoyers
    Cc: Cornelia Huck
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

12 Oct, 2007

1 commit