10 Sep, 2006

4 commits


07 Sep, 2006

5 commits


04 Sep, 2006

2 commits


03 Sep, 2006

4 commits

  • * master.kernel.org:/home/rmk/linux-2.6-serial:
    [SERIAL] 8250: constify some serial structs
    [SERIAL] Make uart_match_port() work with all memory mapped UARTs

    Linus Torvalds
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    [ARM] 3762/1: Fix ptrace cache coherency bug for ARM1136 VIPT nonaliasing Harvard caches
    [ARM] 3765/1: S3C24XX: cleanup include/asm-arm/arch-s3c2410/dma.h
    [ARM] 3764/1: S3C24XX: change type naming to kernel style
    [ARM] 3763/1: add both rtcs to csb337 defconfig
    [ARM] Fix ARM __raw_read_trylock() implementation
    [ARM] 3750/3: Fix double VFP emulation for EABI kernels

    Linus Torvalds
     
  • It is not possible to find a sub-thread in ->children/->ptrace_children
    lists, ptrace_attach() does not allow to attach to sub-threads.

    Even if it was possible to ptrace the task from the same thread group,
    we can't allow to release ->group_leader while there are others (ptracer)
    threads in the same group.

    Signed-off-by: Oleg Nesterov
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Patch from George G. Davis

    Resolve ARM1136 VIPT non-aliasing cache coherency issues observed when
    using ptrace to set breakpoints and cleanup copy_{to,from}_user_page()
    while we're here as requested by Russell King because "it's also far
    too heavy on non-v6 CPUs".

    NOTES:

    1. Only access_process_vm() calls copy_{to,from}_user_page().
    2. access_process_vm() calls get_user_pages() to pin down the "page".
    3. get_user_pages() calls flush_dcache_page(page) which ensures cache
    coherency between kernel and userspace mappings of "page". However
    flush_dcache_page(page) may not invalidate I-Cache over this range
    for all cases, specifically, I-Cache is not invalidated for the VIPT
    non-aliasing case. So memory is consistent between kernel and user
    space mappings of "page" but I-Cache may still be hot over this
    range. IOW, we don't have to worry about flush_cache_page() before
    memcpy().
    4. Now, for the copy_to_user_page() case, after memcpy(), we must flush
    the caches so memory is consistent with kernel cache entries and
    invalidate the I-Cache if this mm region is executable. We don't
    need to do anything after memcpy() for the copy_from_user_page()
    case since kernel cache entries will be invalidated via the same
    process above if we access "page" again. The flush_ptrace_access()
    function (borrowed from SPARC64 implementation) is added to handle
    cache flushing after memcpy() for the copy_to_user_page() case.

    Signed-off-by: George G. Davis
    Signed-off-by: Russell King

    George G. Davis
     

02 Sep, 2006

22 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6:
    uhci-hcd: fix list access bug
    USB: Support for ELECOM LD-USB20 in pegasus
    USB: Add VIA quirk fixup for VT8235 usb2
    USB: rtl8150_disconnect() needs tasklet_kill()
    USB Storage: unusual_devs.h for Sony Ericsson M600i
    USB Storage: Remove the finecam3 unusual_devs entry
    UHCI: don't stop at an Iso error
    usb gadget: g_ether spinlock recursion fix
    USB: add all wacom device to hid-core.c blacklist
    hid-core.c: Adds all GTCO CalComp Digitizers and InterWrite School Products to blacklist
    USB floppy drive SAMSUNG SFD-321U/EP detected 8 times

    Linus Torvalds
     
  • Fix some more problems (inverted use of semaphores in some places). He
    also moved my checks into within the protected section which is better.

    Signed-off-by: Michael Hanselmann
    Signed-off-by: Benjamin Herrenschmidt
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     
  • Missed a place where I forgot to convert kfree() to kmem_cache_free() as
    part of jbd-manage-its-own-slab changes.

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

    Badari Pulavarty
     
  • Since vma->vm_pgoff is in units of smallpages, VMAs for huge pages have the
    lower HPAGE_SHIFT - PAGE_SHIFT bits always cleared, which results in badd
    offsets to the interleave functions. Take this difference from small pages
    into account when calculating the offset. This does add a 0-bit shift into
    the small-page path (via alloc_page_vma()), but I think that is negligible.
    Also add a BUG_ON to prevent the offset from growing due to a negative
    right-shift, which probably shouldn't be allowed anyways.

    Tested on an 8-memory node ppc64 NUMA box and got the interleaving I
    expected.

    Signed-off-by: Nishanth Aravamudan
    Signed-off-by: Adam Litke
    Cc: Andi Kleen
    Acked-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nishanth Aravamudan
     
  • Fix some bugs in the patch that converted the IOC4 driver from port IO ops to
    memio ops.

    http://marc.theaimsgroup.com/?l=linux-ide&m=114895892231438&w=2

    Problems fixed are:
    - Call to default_hwif_mmiops() was not being done until _after_
    first IO operation, resulting in the first IO operation being
    done as a port IO op, instead of memio.
    - request_region() calls needed to be request_mem_region()
    - Incomplete error case handling.
    - Non-usage of ioremap() and __iomem.

    Signed-off-by: John Keller
    Signed-off-by: Jeremy Higdon
    Cc: Alan Cox
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    John Keller
     
  • Revert the mixer element names of some Mic controls to the state of
    2.6.17. This should fix the name mismatch in alsactl.

    Signed-off-by: Takashi Iwai
    Cc: Jaroslav Kysela
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Takashi Iwai
     
  • The port to genirq & the new powerpc interrupt model in 2.6.18 introduced a
    bug in the legacy PowerMac PIC code (used on older machines) because of a
    typo potentially causing hangs due to interrupt storms. This fixes it,
    along with a performance issue causing us to do spurrious retriggers after
    masking an interrupt.

    Signed-off-by: Benjamin Herrenschmidt
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     
  • The via-pmu backlight code (introduced in 2.6.18) has various design issues
    causing crashes on machines using it like the old Wallstreet powerbook
    (Michael, the author, never managed to test on these and I just got my hand
    on one of those old beasts).

    This fixes them by no longer trying to hijack the backlight device of the
    frontmost framebuffer (causing that framebuffer to crash) but having it's
    own local bits instead. Might look weird but it's better that way on those
    old machines, at least as a last-minute fix for 2.6.18. We might rework
    the whole thing later. This patch also changes the way it gets notified of
    sleep and wakeup in order to properly shut the backlight down on sleep and
    bring it back on wakeup.

    Signed-off-by: Benjamin Herrenschmidt
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     
  • This patch works around a complex dm-related deadlock/livelock down in the
    mempool allocator.

    Alasdair said:

    Several dm targets suffer from this.

    Mempools are not yet used correctly everywhere in device-mapper: they can
    get shared when devices are stacked, and some targets share them across
    multiple instances. I made fixing this one of the prerequisites for this
    patch:

    md-dm-reduce-stack-usage-with-stacked-block-devices.patch

    which in some cases makes people more likely to hit the problem.

    There's been some progress on this recently with (unfinished) dm-crypt
    patches at:

    http://www.kernel.org/pub/linux/kernel/people/agk/patches/2.6/editing/
    (dm-crypt-move-io-to-workqueue.patch plus dependencies)

    and:

    I've no problems with a temporary workaround like that, but Milan Broz (a
    new Redhat developer in the Czech Republic) has started reviewing all the
    mempool usage in device-mapper so I'm expecting we'll soon have a proper fix
    for this associated problems. [He's back from holiday at the start of next
    week.]

    For now, this sad-but-safe little patch will allow the machine to recover.

    [akpm@osdl.org: rewrote changelog]
    Cc: Alasdair G Kergon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Mironchik
     
  • This patch schedules obsolete OSS drivers (with ALSA drivers that support
    the same hardware) for removal.

    A rationale of the patch is in
    http://lkml.org/lkml/2006/7/11/186

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

    Adrian Bunk
     
  • Olaf Kirch of SuSE tracked down a problem where module unloads of the IPMI
    driver would occasionally result in Oopses. He tracked that down to a
    variable that wasn't always initialized properly in some situations. This
    patch initializes that variable. Olaf sent a patch that kzalloc-ed the
    data, but this structure is large enough that I would perfer to not do
    that. Thanks Olaf!

    Signed-off-by: Corey Minyard
    Cc: Olaf Kirch
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Corey Minyard
     
  • Adds the description of the parameters from handle_bad_irq().

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

    Henrik Kretzschmar
     
  • The last argument of module_param is permissions, not default value.

    Acked-by: Wim Van Sebroeck
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian E. Morgan
     
  • modprobe -v floppy on a Apple G5 writes incorrect stuff to dmesg:

    Floppy drive(s): fd0 is 2.88M

    The reason is that the legacy io check happens very late,
    when part of the floppy stuff is already initialized.
    check_legacy_ioport() returns either -ENODEV right away, or it walks
    the device-tree looking for a floppy node.

    Signed-off-by: Olaf Hering
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Olaf Hering
     
  • Vitezslav Samel reports that an HP DL380 g4 fails using the
    default arch due to the ISA bus having an ID of 32.

    It would have worked OK with the generic arch - for some reason the default
    arch doesn't support as many busses.

    So bump that up to support 256 busses, but leave it at 32 if we're building a
    tiny system to save a bit of memory.

    Cc: Vitezslav Samel
    Acked-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • We're testing the wrong task_struct field.

    Acked-by: Chris Zankel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bill Huey (hui
     
  • Cleanup allocation and freeing of tsk->delays used by delay accounting.
    This solves two problems reported for delay accounting:

    1. oops in __delayacct_blkio_ticks
    http://www.uwsg.indiana.edu/hypermail/linux/kernel/0608.2/1844.html

    Currently tsk->delays is getting freed too early in task exit which can
    cause a NULL tsk->delays to get accessed via reading of /proc//stats.
    The patch fixes this problem by freeing tsk->delays closer to when
    task_struct itself is freed up. As a result, it also eliminates the use of
    tsk->delays_lock which was only being used (inadequately) to safeguard
    access to tsk->delays while a task was exiting.

    2. Possible memory leak in kernel/delayacct.c
    http://www.uwsg.indiana.edu/hypermail/linux/kernel/0608.2/1389.html

    The patch cleans up tsk->delays allocations after a bad fork which was
    missing earlier.

    The patch has been tested to fix the problems listed above and stress
    tested with rapid calls to delay accounting's taskstats command interface
    (which is the other path that can access the same data, besides the /proc
    interface causing the oops above).

    Signed-off-by: Shailabh Nagar
    Cc: Balbir Singh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shailabh Nagar
     
  • Apparently some systems export valid HPET addresses, but hpet_enable()
    fails. Then when the HPET clocksource starts up, it only checks for a
    valid HPET address, and the result is a system where time does not advance.

    See http://bugme.osdl.org/show_bug.cgi?id=7062 for details.

    This patch just makes sure we better check that the HPET is functional
    before registering the HPET clocksource.

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

    john stultz
     
  • Fix receive tty error handling in synclink_gt driver. Adrian reported
    compiler warning for incorrect bit test against char variable. I
    determined these and other device specific error bits were incorrectly
    defined.

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

    Paul Fulghum
     
  • We need to be careful when referencing mirrors[i].rdev. It can disappear
    under us at various times.

    So:
    fix a couple of problem places.
    comment a couple of non-problem places
    move an 'atomic_add' which deferences rdev down a little
    way to some where where it is sure to not be NULL.

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

    NeilBrown
     
  • The ZVC counter update threshold is currently set to a fixed value of 32.
    This patch sets up the threshold depending on the number of processors and
    the sizes of the zones in the system.

    With the current threshold of 32, I was able to observe slight contention
    when more than 130-140 processors concurrently updated the counters. The
    contention vanished when I either increased the threshold to 64 or used
    Andrew's idea of overstepping the interval (see ZVC overstep patch).

    However, we saw contention again at 220-230 processors. So we need higher
    values for larger systems.

    But the current default is already a bit of an overkill for smaller
    systems. Some systems have tiny zones where precision matters. For
    example i386 and x86_64 have 16M DMA zones and either 900M ZONE_NORMAL or
    ZONE_DMA32. These are even present on SMP and NUMA systems.

    The patch here sets up a threshold based on the number of processors in the
    system and the size of the zone that these counters are used for. The
    threshold should grow logarithmically, so we use fls() as an easy
    approximation.

    Results of tests on a system with 1024 processors (4TB RAM)

    The following output is from a test allocating 1GB of memory concurrently
    on each processor (Forking the process. So contention on mmap_sem and the
    pte locks is not a factor):

    X MIN
    TYPE: CPUS WALL WALL SYS USER TOTCPU
    fork 1 0.552 0.552 0.540 0.012 0.552
    fork 4 0.552 0.548 2.164 0.036 2.200
    fork 16 0.564 0.548 8.812 0.164 8.976
    fork 128 0.580 0.572 72.204 1.208 73.412
    fork 256 1.300 0.660 310.400 2.160 312.560
    fork 512 3.512 0.696 1526.836 4.816 1531.652
    fork 1020 20.024 0.700 17243.176 6.688 17249.863

    So a threshold of 32 is fine up to 128 processors. At 256 processors contention
    becomes a factor.

    Overstepping the counter (earlier patch) improves the numbers a bit:

    fork 4 0.552 0.548 2.164 0.040 2.204
    fork 16 0.552 0.548 8.640 0.148 8.788
    fork 128 0.556 0.548 69.676 0.956 70.632
    fork 256 0.876 0.636 212.468 2.108 214.576
    fork 512 2.276 0.672 997.324 4.260 1001.584
    fork 1020 13.564 0.680 11586.436 6.088 11592.523

    Still contention at 512 and 1020. Contention at 1020 is down by a third.
    256 still has a slight bit of contention.

    After this patch the counter threshold will be set to 125 which reduces
    contention significantly:

    fork 128 0.560 0.548 69.776 0.932 70.708
    fork 256 0.636 0.556 143.460 2.036 145.496
    fork 512 0.640 0.548 284.244 4.236 288.480
    fork 1020 1.500 0.588 1326.152 8.892 1335.044

    [akpm@osdl.org: !SMP build fix]
    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Increments and decrements are usually grouped rather than mixed. We can
    optimize the inc and dec functions for that case.

    Increment and decrement the counters by 50% more than the threshold in
    those cases and set the differential accordingly. This decreases the need
    to update the atomic counters.

    The idea came originally from Andrew Morton. The overstepping alone was
    sufficient to address the contention issue found when updating the global
    and the per zone counters from 160 processors.

    Also remove some code in dec_zone_page_state.

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

    Christoph Lameter
     

01 Sep, 2006

3 commits