15 Oct, 2009

3 commits

  • For the short term, map synchronize_rcu_expedited() to
    synchronize_rcu() for TREE_PREEMPT_RCU and to
    synchronize_sched_expedited() for TREE_RCU.

    Longer term, there needs to be a real expedited grace period for
    TREE_PREEMPT_RCU, but candidate patches to date are considerably
    more complex and intrusive.

    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    Cc: npiggin@suse.de
    Cc: jens.axboe@oracle.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • As the number of callbacks on a given CPU rises, invoke
    force_quiescent_state() only every blimit number of callbacks
    (defaults to 10,000), and even then only if no other CPU has
    invoked force_quiescent_state() in the meantime.

    This should fix the performance regression reported by Nick.

    Reported-by: Nick Piggin
    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    Cc: jens.axboe@oracle.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • If userspace tries to perform a requeue_pi on a non-requeue_pi waiter,
    it will find the futex_q->requeue_pi_key to be NULL and OOPS.

    Check for NULL in match_futex() instead of doing explicit NULL pointer
    checks on all call sites. While match_futex(NULL, NULL) returning
    false is a little odd, it's still correct as we expect valid key
    references.

    Signed-off-by: Darren Hart
    Cc: Peter Zijlstra
    Cc: Ingo Molnar
    CC: Eric Dumazet
    CC: Dinakar Guniguntala
    CC: John Stultz
    Cc: stable@kernel.org
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Darren Hart
     

14 Oct, 2009

1 commit

  • The futex code does not handle spurious wake up in futex_wait and
    futex_wait_requeue_pi.

    The code assumes that any wake up which was not caused by futex_wake /
    requeue or by a timeout was caused by a signal wake up and returns one
    of the syscall restart error codes.

    In case of a spurious wake up the signal delivery code which deals
    with the restart error codes is not invoked and we return that error
    code to user space. That causes applications which actually check the
    return codes to fail. Blaise reported that on preempt-rt a python test
    program run into a exception trap. -rt exposed that due to a built in
    spurious wake up accelerator :)

    Solve this by checking signal_pending(current) in the wake up path and
    handle the spurious wake up case w/o returning to user space.

    Reported-by: Blaise Gassend
    Debugged-by: Darren Hart
    Signed-off-by: Thomas Gleixner
    Cc: Peter Zijlstra
    Cc: stable@kernel.org
    LKML-Reference:

    Thomas Gleixner
     

13 Oct, 2009

1 commit


10 Oct, 2009

2 commits

  • A race shouldn't happen since all workqueues or handlers are canceled
    or flushed before the event buffer is freed. A warning is triggered
    now if the buffer is freed too early.

    Also, this patch adds some comments about event buffer protection,
    reworks some code and adds code to clear buffer_pos during alloc and
    free of the event buffer.

    Cc: David Rientjes
    Cc: Stephane Eranian
    Signed-off-by: Robert Richter

    Robert Richter
     
  • Looking at the 2.6.31-rc9 code, it appears there is a race condition
    in the event_buffer cleanup code path (shutdown). This could lead to
    kernel panic as some CPUs may be operating on the event buffer AFTER
    it has been freed. The attached patch solves the problem and makes
    sure CPUs check if the buffer is not NULL before they access it as
    some may have been spinning on the mutex while the buffer was being
    freed.

    The race may happen if the buffer is freed during pending reads. But
    it is not clear why there are races in add_event_entry() since all
    workqueues or handlers are canceled or flushed before the event buffer
    is freed.

    Signed-off-by: David Rientjes
    Signed-off-by: Stephane Eranian
    Signed-off-by: Robert Richter

    David Rientjes
     

09 Oct, 2009

15 commits

  • Some tracepoint magic (TRACE_EVENT(lock_acquired)) relies on
    the fact that lock hold times are positive and uses div64 on
    that. That triggered a build warning on MIPS, and probably
    causes bad output in certain circumstances as well.

    Make it truly positive.

    Reported-by: Andrew Morton
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    pata_atp867x: add Power Management support
    pata_atp867x: PIO support fixes
    pata_atp867x: clarifications in timings calculations and cable detection
    pata_atp867x: fix it to not claim MWDMA support
    libata: fix incorrect link online check during probe
    ahci: filter FPDMA non-zero offset enable for Aspire 3810T
    libata: make gtf_filter per-dev
    libata: implement more acpi filtering options
    libata: cosmetic updates
    ahci: display all AHCI 1.3 HBA capability flags (v2)
    pata_ali: trivial fix of a very frequent spelling mistake
    ahci: disable 64bit DMA by default on SB600s

    Linus Torvalds
     
  • …/git/tip/linux-2.6-tip

    * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    futex: fix requeue_pi key imbalance
    futex: Fix typo in FUTEX_WAIT/WAKE_BITSET_PRIVATE definitions
    rcu: Place root rcu_node structure in separate lockdep class
    rcu: Make hot-unplugged CPU relinquish its own RCU callbacks
    rcu: Move rcu_barrier() to rcutree
    futex: Move exit_pi_state() call to release_mm()
    futex: Nullify robust lists after cleanup
    futex: Fix locking imbalance
    panic: Fix panic message visibility by calling bust_spinlocks(0) before dying
    rcu: Replace the rcu_barrier enum with pointer to call_rcu*() function
    rcu: Clean up code based on review feedback from Josh Triplett, part 4
    rcu: Clean up code based on review feedback from Josh Triplett, part 3
    rcu: Fix rcu_lock_map build failure on CONFIG_PROVE_LOCKING=y
    rcu: Clean up code to address Ingo's checkpatch feedback
    rcu: Clean up code based on review feedback from Josh Triplett, part 2
    rcu: Clean up code based on review feedback from Josh Triplett

    Linus Torvalds
     
  • …l/git/tip/linux-2.6-tip

    * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sched: Set correct normal_prio and prio values in sched_fork()

    Linus Torvalds
     
  • …git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, pci: Correct spelling in a comment
    x86: Simplify bound checks in the MTRR code
    x86: EDAC: carve out AMD MCE decoding logic
    initcalls: Add early_initcall() for modules
    x86: EDAC: MCE: Fix MCE decoding callback logic

    Linus Torvalds
     
  • …nel/git/tip/linux-2.6-tip

    * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    tracing: user local buffer variable for trace branch tracer
    tracing: fix warning on kernel/trace/trace_branch.c andtrace_hw_branches.c
    ftrace: check for failure for all conversions
    tracing: correct module boundaries for ftrace_release
    tracing: fix transposed numbers of lock_depth and preempt_count
    trace: Fix missing assignment in trace_ctxwake_*
    tracing: Use free_percpu instead of kfree
    tracing: Check total refcount before releasing bufs in profile_enable failure

    Linus Torvalds
     
  • …/linux/kernel/git/tip/linux-2.6-tip

    * 'sparc-perf-events-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    mm, perf_event: Make vmalloc_user() align base kernel virtual address to SHMLBA
    perf_event: Provide vmalloc() based mmap() backing

    Linus Torvalds
     
  • …el/git/tip/linux-2.6-tip

    * 'perf-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    perf_events: Make ABI definitions available to userspace
    perf tools: elf_sym__is_function() should accept "zero" sized functions
    tracing/syscalls: Use long for syscall ret format and field definitions
    perf trace: Update eval_flag() flags array to match interrupt.h
    perf trace: Remove unused code in builtin-trace.c
    perf: Propagate term signal to child

    Linus Torvalds
     
  • …el/git/tip/linux-2.6-tip

    * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, timers: Check for pending timers after (device) interrupts
    NOHZ: update idle state also when NOHZ is inactive

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    ALSA: ice1724: increase SPDIF and independent stereo buffer sizes
    ALSA: opl3: circular locking in the snd_opl3_note_on() and snd_opl3_note_off()
    ALSA: ICE1712/24 - Change the Multi Track Peak control (level meters) from MIXER to PCM type
    ALSA: hda - Fix yet another auto-mic bug in ALC268
    ASoC: WM8350 capture PGA mutes are inverted
    ASoC: Remove absent SYNC and TDM DAI format options from i.MX SSI
    sound: via82xx: move DXS volume controls to PCM interface
    ALSA: hda - Don't pick up invalid HP pins in alc_subsystem_id()
    ALSA: hda - Add a workaround for ASUS A7K
    ALSA: hda - Fix invalid initializations for ALC861 auto mode
    ASoC: wm8940: Fix check on error code form snd_soc_codec_set_cache_io
    ASoC: Fix SND_SOC_DAPM_LINE handling

    Linus Torvalds
     
  • * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (24 commits)
    drm/radeon/kms: fix vline register for second head.
    drm/r600: avoid assigning vb twice in blit code
    drm/radeon: use list_for_each_entry instead of list_for_each
    drm/radeon/kms: Fix AGP support for R600/RV770 family (v2)
    drm/radeon/kms: Fallback to non AGP when acceleration fails to initialize (v2)
    drm/radeon/kms: Fix RS600/RV515/R520/RS690 IRQ
    drm/radeon: Fix setting of bits
    drm/ttm: fix refcounting in ttm global code.
    drm/fb: add more correct 8/16/24/32 bpp fb support.
    drm/fb: add setcmap and fix 8-bit support.
    drm/radeon/kms: respect single crtc cards, only create one crtc. (v2)
    drm: Delete the DRM_DEBUG_KMS in drm_mode_cursor_ioctl
    drm/radeon/kms: add support for "Surround View"
    drm/radeon/kms: Fix irq handling on AVIVO hw
    drm/radeon/kms: R600/RV770 remove dead code and print message for wrong BIOS
    drm/radeon/kms: Fix R600/RV770 disable acceleration path
    drm/radeon/kms: Fix R600/RV770 startup path & reset
    drm/radeon/kms: Fix R600 write back buffer
    drm/radeon/kms: Remove old init path as no hw use it anymore
    drm/radeon/kms: Convert RS600 to new init path
    ...

    Linus Torvalds
     
  • …/git/tmlind/linux-omap-2.6

    * 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
    omapfb: Blizzard: constify register address tables
    omapfb: Blizzard: fix pointer to be const
    omapfb: Condition mutex acquisition
    omap: iovmm: Add missing mutex_unlock
    omap: iovmm: Fix incorrect spelling
    omap: SRAM: flush the right address after memcpy in omap_sram_push
    omap: Lock DPLL5 at boot
    omap: Fix incorrect 730 vs 850 detection
    OMAP3: PM: introduce a new powerdomain walk helper
    OMAP3: PM: Enable GPIO module-level wakeups
    OMAP3: PM: USBHOST: clear wakeup events on both hosts
    OMAP3: PM: PRCM interrupt: only handle selected PRCM interrupts
    OMAP3: PM: PRCM interrupt: check MPUGRPSEL register
    OMAP3: PM: Prevent hang in prcm_interrupt_handler

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
    amd64_edac: beef up DRAM error injection
    amd64_edac: fix DRAM base and limit extraction
    amd64_edac: fix chip select handling
    amd64_edac: simple fix to allow reporting of CECC errors
    amd64_edac: fix K8 intlv_sel check
    amd64_edac: fix interleave enable tests
    amd64_edac: fix DRAM base and limit address extraction
    amd64_edac: fix driver instance lookup table allocation

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (40 commits)
    ethoc: limit the number of buffers to 128
    ethoc: use system memory as buffer
    ethoc: align received packet to make IP header at word boundary
    ethoc: fix buffer address mapping
    ethoc: fix typo to compute number of tx descriptors
    au1000_eth: Duplicate test of RX_OVERLEN bit in update_rx_stats()
    netxen: Fix Unlikely(x) > y
    pasemi_mac: ethtool get settings fix
    add maintainer for network drop monitor kernel service
    tg3: Fix phylib locking strategy
    rndis_host: support ETHTOOL_GPERMADDR
    ipv4: arp_notify address list bug
    gigaset: add kerneldoc comments
    gigaset: correct debugging output selection
    gigaset: improve error recovery
    gigaset: fix device ERROR response handling
    gigaset: announce if built with debugging
    gigaset: handle isoc frame errors more gracefully
    gigaset: linearize skb
    gigaset: fix reject/hangup handling
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
    Revert "Revert "ide: try to use PIO Mode 0 during probe if possible""
    sis5513: fix PIO setup for ATAPI devices

    Linus Torvalds
     

08 Oct, 2009

18 commits

  • Now that range timers and deferred timers are common, I found a
    problem with these using the "perf timechart" tool. Frans Pop also
    reported high scheduler latencies via LatencyTop, when using
    iwlagn.

    It turns out that on x86, these two 'opportunistic' timers only get
    checked when another "real" timer happens. These opportunistic
    timers have the objective to save power by hitchhiking on other
    wakeups, as to avoid CPU wakeups by themselves as much as possible.

    The change in this patch runs this check not only at timer
    interrupts, but at all (device) interrupts. The effect is that:

    1) the deferred timers/range timers get delayed less

    2) the range timers cause less wakeups by themselves because
    the percentage of hitchhiking on existing wakeup events goes up.

    I've verified the working of the patch using "perf timechart", the
    original exposed bug is gone with this patch. Frans also reported
    success - the latencies are now down in the expected ~10 msec
    range.

    Signed-off-by: Arjan van de Ven
    Tested-by: Frans Pop
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Mike Galbraith
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Arjan van de Ven
     
  • When a vmalloc'd area is mmap'd into userspace, some kind of
    co-ordination is necessary for this to work on platforms with cpu
    D-caches which can have aliases.

    Otherwise kernel side writes won't be seen properly in userspace
    and vice versa.

    If the kernel side mapping and the user side one have the same
    alignment, modulo SHMLBA, this can work as long as VM_SHARED is
    shared of VMA and for all current users this is true. VM_SHARED
    will force SHMLBA alignment of the user side mmap on platforms with
    D-cache aliasing matters.

    The bulk of this patch is just making it so that a specific
    alignment can be passed down into __get_vm_area_node(). All
    existing callers pass in '1' which preserves existing behavior.
    vmalloc_user() gives SHMLBA for the alignment.

    As a side effect this should get the video media drivers and other
    vmalloc_user() users into more working shape on such systems.

    Signed-off-by: David S. Miller
    Acked-by: Peter Zijlstra
    Cc: Jens Axboe
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    David Miller
     
  • * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
    agp: parisc-agp.c - use correct page_mask function
    parisc: Fix linker script breakage.
    parisc: convert to asm-generic/hardirq.h
    parisc: Make THREAD_SIZE available to assembly files and linker scripts.
    parisc: correct use of SHF_ALLOC
    parisc: rename parisc's vmalloc_start to parisc_vmalloc_start
    parisc: add me to Maintainers
    parisc: includecheck fix: signal.c
    parisc: HAVE_ARCH_TRACEHOOK
    parisc: add skeleton syscall.h
    parisc: stop using task->ptrace for {single,block}step flags
    parisc: split syscall_trace into two halves
    parisc: add missing TI_TASK macro in syscall.S
    parisc: tracehook_signal_handler
    parisc: tracehook_report_syscall

    Linus Torvalds
     
  • In module unload, lis3lv02d core driver sysfs clean up was not called.

    Signed-off-by: Samu Onkalo
    Acked-by: Daniel Mack
    Cc: Éric Piel
    Cc: "Trisal, Kalhan"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo
     
  • The PC Card 8.0 specification (vol. 4, section 3.2.10) says the
    TPLLV1_INFO field of the CISTPL_VERS_1 tuple must contain 4 strings. Some
    cards don't have all 4 so just parse as many as we can.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: David Vrabel
    Tested-by: Jonathan Cameron
    Tested-by: Bing Zhao
    Cc: Roel Kluin
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Vrabel
     
  • For hwpoison stress testing. The debugfs mount point is assumed to be
    /debug/.

    Signed-off-by: Wu Fengguang
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wu Fengguang
     
  • Signed-off-by: Wu Fengguang
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wu Fengguang
     
  • Signed-off-by: Wu Fengguang
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wu Fengguang
     
  • Refactor the code to be more modular and easier to reuse.

    Signed-off-by: Wu Fengguang
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wu Fengguang
     
  • This helps merge duplicate code (now and future) and outstand the main
    logic.

    Signed-off-by: Wu Fengguang
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wu Fengguang
     
  • Signed-off-by: Wu Fengguang
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wu Fengguang
     
  • It indicates to the system admin that processes mapping such pages may be
    eating less physical memory than the reported numbers by legacy tools.

    Signed-off-by: Wu Fengguang
    Cc: Hugh Dickins
    Cc: Izik Eidus
    Acked-by: Chris Wright
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wu Fengguang
     
  • This flag indicates a hardware detected memory corruption on the page.
    Any future access of the page data may bring down the machine.

    Signed-off-by: Wu Fengguang
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wu Fengguang
     
  • Update documentation of cgroups tasks and procs files

    Document the cgroup.procs file.

    Clarify the semantics of the cgroup.procs and tasks files. Although the
    current cgroup.procs interface returns a sorted and uniqified list of
    pids, potential future performance enhancements could result in those
    properties being removed - explicitly document this aspect of the API.

    There are no existing users of cgroup.procs, so compatibility isn't an
    issue. There are users of the "tasks" file, but none that would appear to
    break in the event of the sorted property being broken. The standard
    "libcpuset" explicitly sorts the results of reading from the tasks file,
    and "libcg" and other users don't appear to care about ordering.

    Signed-off-by: Paul Menage
    Reviewed-by: Li Zefan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Menage
     
  • fix the following 'make includecheck' warning:

    drivers/video/da8xx-fb.c: linux/device.h is included more than once.

    Signed-off-by: Jaswinder Singh Rajput
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jaswinder Singh Rajput
     
  • fix the following 'make includecheck' warning:

    drivers/video/msm/mddi.c: linux/delay.h is included more than once.

    Signed-off-by: Jaswinder Singh Rajput
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jaswinder Singh Rajput
     
  • fix the following 'make includecheck' warning:

    fs/proc/kcore.c: linux/mm.h is included more than once.

    Signed-off-by: Jaswinder Singh Rajput
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jaswinder Singh Rajput
     
  • fix the following 'make includecheck' warning:

    mm/vmalloc.c: linux/highmem.h is included more than once.

    Signed-off-by: Jaswinder Singh Rajput
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jaswinder Singh Rajput