02 Sep, 2006

9 commits

  • 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

7 commits


31 Aug, 2006

24 commits

  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
    [POWERPC] Fix return value from memcpy
    [POWERPC] iseries: Define insw et al. so libata/ide will compile
    [POWERPC] Fix irq enable/disable in smp_generic_take_timebase
    [POWERPC] Fix problem with time not advancing on 32-bit platforms
    [POWERPC] Restore copyright notice in arch/powerpc/kernel/fpu.S
    [POWERPC] Fix up ibm_architecture_vec definition
    [POWERPC] Make OF irq map code detect more error cases
    [POWERPC] Support for "weird" MPICs and fixup mpc7448_hpc2
    [POWERPC] Fix MPIC sense codes in documentation
    [POWERPC] Fix performance regression in IRQ radix tree locking
    [POWERPC] Add mpc7448hpc2 device tree source file
    [POWERPC] Add MPC8349E MDS device tree source file to arch/powerpc/boot/dts
    [POWERPC] modify mpc83xx platforms to use new IRQ layer
    [POWERPC] Adapt ipic driver to new host_ops interface, add set_irq_type to set IRQ sense
    [POWERPC] back up old school ipic.[hc] to arch/ppc
    [POWERPC] Use mpc8641hpcn PIC base address from dev tree.
    [POWERPC] Allow MPC8641 HPCN to build with CONFIG_PCI disabled too.
    [POWERPC] Fix powerpc 44x_mmu build
    [POWERPC] Remove flush_dcache_all export

    Linus Torvalds
     
  • This fixes a hang on ppc32.

    The problem was that I was comparing a 32-bit quantity with a 64-bit
    quantity, and consequently time wasn't advancing. This makes us use a
    64-bit quantity on all platforms, which ends up simplifying the code
    since we can now get rid of the tb_last_stamp variable (which actually
    fixes another bug that Ben H and I noticed while going carefully through
    the code).

    This works fine on my G4 tibook. Let me know how it goes on your
    machines.

    Acked-by: Olaf Hering
    Acked-by: Mikael Pettersson
    Signed-off-by: Linus Torvalds

    Paul Mackerras
     
  • The backlight changes that went in had a bug where they could cause the
    kernel to access an unitialized pointer when blanking if there is no
    backlight control on a machine.

    The bug affects atyfb, aty128fb, nvidiafb and rivafb. radeonfb seems to
    be ok. This fixes it.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     
  • As pointed out by Herbert Xu , our
    memcpy implementation didn't return the destination pointer as its
    return value, and there is code in the kernel that expects that.
    This fixes it.

    Signed-off-by: Paul Mackerras

    Paul Mackerras
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
    [IA64] Increase default nodes shift to 10, nr_cpus to 1024
    [IA64] remove redundant local_irq_save() calls from sn_sal.h
    [IA64] panic if topology_init kzalloc fails
    [IA64-SGI] Silent data corruption caused by XPC V2.

    Linus Torvalds
     
  • The radeon requires a VAP state flush when enabling/disabling
    vertex programs on the r200 cards.

    Signed-off-by: Dave Airlie
    Signed-off-by: Linus Torvalds

    Roland Scheidegger
     
  • The following change from -mm is important to 2.6.18 (actually to 2.6.17
    but its too late for that). This was contributed over three months ago
    by VIA to Bartlomiej and nothing happened. As a result the new chipset
    is now out and Linux won't run on it. By the time 2.6.18 is finalised
    this will be the defacto standard VIA chipset so support would be a good
    plan.

    Tested in -mm for a while, its essentially a PCI ident update but for
    the bridge chip because VIA do things in weird ways.

    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • It's possible to get an invalid page fault in kernel mode when we try to
    write out segments from vsyscall32 when dumping core for a 32bit process if
    the vsyscall32 DSO is not mapped in its address space (which can happen if,
    for example, ulimit -v 100 is run).

    Signed-off-by: Suleiman Souhlal
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Suleiman Souhlal
     
  • The values in init_tss.ist[] can change when an IST event occurs. Save
    the original IST values for checking stack addresses when debugging or
    doing stack traces.

    Signed-off-by: Keith Owens
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Keith Owens
     
  • After all their only point is having them in user space.

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • There was a bogus hunk from the genirq merge that essentially
    broke stack switching for hard interrupts. Remove it since it isn't
    needed.

    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • After all their only point is having them in user space. On x86-64
    they don't even work in kernel space.

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • As a replacement for the earlier removal of the e820 MCFG check
    we blacklist the Intel SDV with the original BIOS bug that
    motivated that check. On those machines don't use MMCONFIG.

    This also adds a new pci=mmconf parameter to override the blacklist.

    Cc: Greg KH
    Cc: Arjan van de Ven
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • The .fill causes miscompilations with some binutils version.

    Instead just patch the lock prefix in the lock constructs. That is the
    majority of the cost and should be good enough.

    Cc: Gerd Hoffmann
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • The .fill causes miscompilations with some binutils version.

    Instead just patch the lock prefix in the lock constructs. That is the
    majority of the cost and should be good enough.

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • Noticed by Jan Beulich.

    When the kernel was moved from 1MB to 2MB in 2.6.17 the kernel reservation
    code wasn't adjusted and it still reserved starting with 1MB. This means 1MB always
    were lost.

    This patch fixes this by reserving only starting with _text.

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • The unwinder fallback logic still had potential for falling through to
    the legacy stack trace code without printing an indication (at once
    serving as a separator) of this.

    Further, the stack pointer retrieval for the fallback should be as
    restrictive as possible (in order to avoid having the legacy stack
    tracer try to access invalid memory). The patch tightens that, but
    this could certainly be further improved.

    Also making the call_trace command line option now conditional upon
    CONFIG_STACK_UNWIND (as it's meaningless otherwise).

    Signed-off-by: Jan Beulich
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Jan Beulich
     
  • By hard-coding the cpuid keys for alternative_smp() rather than using
    the symbolic constant it turned out that incorrect values were used on
    both i386 (0x68 instead of 0x69) and x86-64 (0x66 instead of 0x68).

    Signed-off-by: Jan Beulich
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Jan Beulich
     
  • One open question: Should this added push perhaps be made conditional
    upon CONFIG_STACK_UNWIND or CONFIG_UNWIND_INFO?
    [AK: not needed, these are all very slow paths]

    Signed-off-by: Jan Beulich
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • One open question: Should these added pushes perhaps be made
    conditional upon CONFIG_STACK_UNWIND or CONFIG_UNWIND_INFO?
    [AK: Not needed -- these are all very slow paths]

    Signed-off-by: Jan Beulich
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • The check for the MCFG table being reserved in the e820 map was originally
    added to detect a broken BIOS in a preproduction Intel SDV. However it also
    breaks the Apple x86 Macs, which can't supply this properly, but need
    a working MCFG. With this patch they wouldn't use the MCFG and not work.

    After some discussion I think it's best to remove the heuristic again.
    It also failed on some other boxes (although it didn't cause much
    problems there because old style port access for PCI config space
    still works as fallback), but the preproduction SDVs can just use
    pci=nommcfg. Supporting production machines properly is more
    important.

    Edgar Hucek did all the debugging work.

    Cc: Arjan van de Ven
    Cc: Edgar Hucek
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
    [SUNLANCE]: Fix probing problem.
    [SPARC64]: Fix X server hangs due to large pages.

    Linus Torvalds
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
    [STRIP]: Fix neighbour table refcount leak.
    [IPV6]: ipv6_add_addr should install dstentry earlier
    [NETLINK]: Call panic if nl_table allocation fails
    [TCP]: Two RFC3465 Appropriate Byte Count fixes.
    [IPV6]: SNMPv2 "ipv6IfStatsInAddrErrors" counter error
    [E100]: Add module option to ignore bad EEPROM checksums.
    [SCTP]: Fix sctp_primitive_ABORT() call in sctp_close().

    Linus Torvalds