16 May, 2010

2 commits

  • CONFIG_PERF_EVENT_NMI is something that need to be enabled from the
    arch. This is fine on x86 as PERF_EVENTS is builtin but if other
    archs select it, they will need to handle the PERF_EVENTS dependency.

    Instead, handle the dependency in the generic layer:

    - archs need to tell what they support through HAVE_PERF_EVENTS_NMI
    - Enable magically PERF_EVENTS_NMI if we have PERF_EVENTS and
    HAVE_PERF_EVENTS_NMI.

    Signed-off-by: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Don Zickus
    Cc: Cyrill Gorcunov

    Frederic Weisbecker
     
  • We kept CONFIG_DETECT_SOFTLOCKUP around for compatibility with
    older configs. But it was enabled by default if CONFIG_DEBUG_KERNEL.

    So if we want to enable CONFIG_LOCKUP_DETECTOR on configs that had
    CONFIG_DETECT_SOFTLOCKUP, all we need is to have the same enabling
    by default if CONFIG_DEBUG_KERNEL. We can then remove
    CONFIG_DETECT_SOFTLOCKUP directly.

    So tag CONFIG_LOCKUP_DETECTOR as default y. This is what we want for
    most serious kernel debugging anyway.

    And also forbid the lockup detector in S390 as it was for the
    previous softlockup detector, event though the true reason for that
    is not outlined.

    Signed-off-by: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Don Zickus
    Cc: Peter Zijlstra
    Cc: Cyrill Gorcunov

    Frederic Weisbecker
     

13 May, 2010

12 commits

  • On some configs the following build error triggers:

    arch/x86/kernel/apic/hw_nmi.c:35: error: 'apic' undeclared (first use in this function)
    arch/x86/kernel/apic/hw_nmi.c:35: error: (Each undeclared identifier is reported only once
    arch/x86/kernel/apic/hw_nmi.c:35: error: for each function it appears in.)

    Because asm/apic.h was only included implicitly. Include it explicitly.

    Cc: Frederic Weisbecker
    Cc: Don Zickus
    Cc: Peter Zijlstra
    Cc: Cyrill Gorcunov
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • There are modules that rely on it:

    ERROR: "touch_softlockup_watchdog" [drivers/video/nvidia/nvidiafb.ko] undefined!

    Cc: Frederic Weisbecker
    Cc: Don Zickus
    Cc: Peter Zijlstra
    Cc: Cyrill Gorcunov
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Fix forgotten CONFIG_DETECT_SOFTLOCKUP -> CONFIG_LOCKUP_DETECTOR
    in sched.h

    Fixes:
    arch/x86/built-in.o: In function `touch_nmi_watchdog':
    (.text+0x1bd59): undefined reference to `touch_softlockup_watchdog'
    kernel/built-in.o: In function `show_state_filter':
    (.text+0x10d01): undefined reference to `touch_all_softlockup_watchdogs'
    kernel/built-in.o: In function `sched_clock_idle_wakeup_event':
    (.text+0x362f9): undefined reference to `touch_softlockup_watchdog'
    kernel/built-in.o: In function `timekeeping_resume':
    timekeeping.c:(.text+0x38757): undefined reference to `touch_softlockup_watchdog'
    kernel/built-in.o: In function `tick_nohz_handler':
    tick-sched.c:(.text+0x3e5b9): undefined reference to `touch_softlockup_watchdog'
    kernel/built-in.o: In function `tick_sched_timer':
    tick-sched.c:(.text+0x3e671): undefined reference to `touch_softlockup_watchdog'
    kernel/built-in.o: In function `tick_check_idle':
    (.text+0x3e90b): undefined reference to `touch_softlockup_watchdog'

    Signed-off-by: Frederic Weisbecker
    Cc: Don Zickus
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Cyrill Gorcunov
    Cc: Eric Paris
    Cc: Randy Dunlap

    Frederic Weisbecker
     
  • Panic on softlockups was still depending on the softlockup detector.
    But the latter has been merged into the lockup detector now.

    Let's update this config dependency.

    Signed-off-by: Frederic Weisbecker
    Cc: Don Zickus
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Cyrill Gorcunov
    Cc: Eric Paris
    Cc: Randy Dunlap

    Frederic Weisbecker
     
  • When I combined the nmi_watchdog (hardlockup) and softlockup code, I
    also combined the paths the touch_watchdog and touch_nmi_watchdog took.
    This may not be the best idea as pointed out by Frederic W., that the
    touch_watchdog case probably should not reset the hardlockup count.

    Therefore the patch below falls back to the previous idea of keeping
    the touch_nmi_watchdog a superset of the touch_watchdog case.

    Signed-off-by: Don Zickus
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Cyrill Gorcunov
    Cc: Eric Paris
    Cc: Randy Dunlap
    LKML-Reference:
    Signed-off-by: Frederic Weisbecker

    Don Zickus
     
  • The design of the hardlockup watchdog has changed and cruft was left
    behind in the hw_nmi.c file. Just remove the code that isn't used
    anymore.

    Signed-off-by: Don Zickus
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Cyrill Gorcunov
    Cc: Eric Paris
    Cc: Randy Dunlap
    LKML-Reference:
    Signed-off-by: Frederic Weisbecker

    Don Zickus
     
  • As part of the transition of the nmi watchdog to something more
    generic, the trigger_all_cpu_backtrace code is getting left behind.
    Put it in its own die_notifier so it can still be used.

    V2:
    - use arch_spin_locks

    Signed-off-by: Don Zickus
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Cyrill Gorcunov
    Cc: Eric Paris
    Cc: Randy Dunlap
    LKML-Reference:
    Signed-off-by: Frederic Weisbecker

    Don Zickus
     
  • This file migrated to kernel/watchdog.c and then combined with
    kernel/softlockup.c. As a result kernel/nmi_watchdog.c is no longer
    needed. Just remove it.

    Signed-off-by: Don Zickus
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Cyrill Gorcunov
    Cc: Eric Paris
    Cc: Randy Dunlap
    LKML-Reference:
    Signed-off-by: Frederic Weisbecker

    Don Zickus
     
  • Now that is no longer compiled or used, just remove it.

    Also move some of the code wrapped with DETECT_SOFTLOCKUP to the
    LOCKUP_DETECTOR wrappers because that is the code that uses it now.

    Signed-off-by: Don Zickus
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Cyrill Gorcunov
    Cc: Eric Paris
    Cc: Randy Dunlap
    LKML-Reference:
    Signed-off-by: Frederic Weisbecker

    Don Zickus
     
  • Just some code cleanup to make touch_softlockup clearer and remove the
    softlockup_tick function as it is no longer needed.

    Also remove the /proc softlockup_thres call as it has been changed to
    watchdog_thres.

    Signed-off-by: Don Zickus
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Cyrill Gorcunov
    Cc: Eric Paris
    Cc: Randy Dunlap
    LKML-Reference:
    Signed-off-by: Frederic Weisbecker

    Don Zickus
     
  • The new nmi_watchdog (which uses the perf event subsystem) is very
    similar in structure to the softlockup detector. Using Ingo's
    suggestion, I combined the two functionalities into one file:
    kernel/watchdog.c.

    Now both the nmi_watchdog (or hardlockup detector) and softlockup
    detector sit on top of the perf event subsystem, which is run every
    60 seconds or so to see if there are any lockups.

    To detect hardlockups, cpus not responding to interrupts, I
    implemented an hrtimer that runs 5 times for every perf event
    overflow event. If that stops counting on a cpu, then the cpu is
    most likely in trouble.

    To detect softlockups, tasks not yielding to the scheduler, I used the
    previous kthread idea that now gets kicked every time the hrtimer fires.
    If the kthread isn't being scheduled neither is anyone else and the
    warning is printed to the console.

    I tested this on x86_64 and both the softlockup and hardlockup paths
    work.

    V2:
    - cleaned up the Kconfig and softlockup combination
    - surrounded hardlockup cases with #ifdef CONFIG_PERF_EVENTS_NMI
    - seperated out the softlockup case from perf event subsystem
    - re-arranged the enabling/disabling nmi watchdog from proc space
    - added cpumasks for hardlockup failure cases
    - removed fallback to soft events if no PMU exists for hard events

    V3:
    - comment cleanups
    - drop support for older softlockup code
    - per_cpu cleanups
    - completely remove software clock base hardlockup detector
    - use per_cpu masking on hard/soft lockup detection
    - #ifdef cleanups
    - rename config option NMI_WATCHDOG to LOCKUP_DETECTOR
    - documentation additions

    V4:
    - documentation fixes
    - convert per_cpu to __get_cpu_var
    - powerpc compile fixes

    V5:
    - split apart warn flags for hard and soft lockups

    TODO:
    - figure out how to make an arch-agnostic clock2cycles call
    (if possible) to feed into perf events as a sample period

    [fweisbec: merged conflict patch]

    Signed-off-by: Don Zickus
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Cyrill Gorcunov
    Cc: Eric Paris
    Cc: Randy Dunlap
    LKML-Reference:
    Signed-off-by: Frederic Weisbecker

    Don Zickus
     
  • Merge reason: catch up with latest softlockup detector changes.

    Frederic Weisbecker
     

10 May, 2010

3 commits

  • Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
    [SCSI] Retry commands with UNIT_ATTENTION sense codes to fix ext3/ext4 I/O error
    [SCSI] Enable retries for SYNCRONIZE_CACHE commands to fix I/O error
    [SCSI] scsi_debug: virtual_gb ignores sector_size
    [SCSI] libiscsi: regression: fix header digest errors
    [SCSI] fix locking around blk_abort_request()
    [SCSI] advansys: fix narrow board error path

    Linus Torvalds
     
  • commit 672917dcc78 ("cpuidle: menu governor: reduce latency on exit")
    added an optimization, where the analysis on the past idle period moved
    from the end of idle, to the beginning of the new idle.

    Unfortunately, this optimization had a bug where it zeroed one key
    variable for new use, that is needed for the analysis. The fix is
    simple, zero the variable after doing the work from the previous idle.

    During the audit of the code that found this issue, another issue was
    also found; the ->measured_us data structure member is never set, a
    local variable is always used instead.

    Signed-off-by: Arjan van de Ven
    Cc: Corrado Zoccolo
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

08 May, 2010

9 commits


07 May, 2010

14 commits

  • Some time ago we stopped the clean/active metadata updates
    from being written to a 'spare' device in most cases so that
    it could spin down and say spun down. Device failure/removal
    etc are still recorded on spares.

    However commit 51d5668cb2e3fd1827a55 broke this 50% of the time,
    depending on whether the event count is even or odd.
    The change log entry said:

    This means that the alignment between 'odd/even' and
    'clean/dirty' might take a little longer to attain,

    how ever the code makes no attempt to create that alignment, so it
    could take arbitrarily long.

    So when we find that clean/dirty is not aligned with odd/even,
    force a second metadata-update immediately. There are already cases
    where a second metadata-update is needed immediately (e.g. when a
    device fails during the metadata update). We just piggy-back on that.

    Reported-by: Joe Bryant
    Signed-off-by: NeilBrown
    Cc: stable@kernel.org

    NeilBrown
     
  • Fix: Raid-6 was not trying to correct a read-error when in
    singly-degraded state and was instead dropping one more device, going to
    doubly-degraded state. This patch fixes this behaviour.

    Tested-by: Janos Haar
    Signed-off-by: Gabriele A. Trombetti
    Reported-by: Janos Haar
    Signed-off-by: NeilBrown
    Cc: stable@kernel.org

    Gabriele A. Trombetti
     
  • with CONFIG_PROVE_RCU=y, a warning can be triggered:

    # mount -t cgroup -o blkio xxx /mnt
    # mkdir /mnt/subgroup

    ...
    kernel/cgroup.c:4442 invoked rcu_dereference_check() without protection!
    ...

    To fix this, we avoid caling css_depth() here, which is a bit simpler
    than the original code.

    Signed-off-by: Li Zefan
    Acked-by: Vivek Goyal
    Signed-off-by: Jens Axboe

    Li Zefan
     
  • …5903' and 'misc-2.6.34' into release

    Len Brown
     
  • It's unused and buggy in its current form, since it can place a bo
    in the reserved state without removing it from lru lists.

    Signed-off-by: Thomas Hellstrom
    Signed-off-by: Dave Airlie

    Thomas Hellstrom
     
  • Signed-off-by: Thomas Hellstrom
    Signed-off-by: Dave Airlie

    Thomas Hellstrom
     
  • Bring radeon up to speed with the async event synchronization for
    drmWaitVblank. See c9a9c5e02aedc1a2815877b0268f886d2640b771 for
    more information. Without this patch event never get delivered
    to userspace client.

    Signed-off-by: Jerome Glisse
    Signed-off-by: Dave Airlie

    Jerome Glisse
     
  • Move the fifo reset from pxa_camera_start_capture to pxa_camera_irq direct
    before the dma start after an end of frame interrupt to prevent images from
    shifting because of old data at the begin of the frame.

    Signed-off-by: Stefan Herbrechtsmeier
    Acked-by: Robert Jarzmik
    Tested-by: Antonio Ospite
    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Mauro Carvalho Chehab

    Stefan Herbrechtsmeier
     
  • soc_mbus_bytes_per_line() returns -EINVAL on error but we store it in an
    unsigned int so the test for less than zero doesn't work. I think it
    always returns "small" positive values so we can just cast it to int
    here.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Mauro Carvalho Chehab

    Dan Carpenter
     
  • This fixes a regression of

    7d58289 (mx1: prefix SOC specific defines with MX1_ and deprecate old names)

    Signed-off-by: Uwe Kleine-König
    Acked-by: Sascha Hauer
    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Mauro Carvalho Chehab

    Uwe Kleine-König
     
  • Never call dvb_frontend_detach if we failed to attach a frontend. This fixes
    the following oops, which will be triggered by a missing stv090x module:

    [ 8.172997] DVB: registering new adapter (TT-Budget S2-1600 PCI)
    [ 8.209018] adapter has MAC addr = 00:d0:5c:cc:a7:29
    [ 8.328665] Intel ICH 0000:00:1f.5: PCI INT B -> GSI 17 (level, low) -> IRQ 17
    [ 8.328753] Intel ICH 0000:00:1f.5: setting latency timer to 64
    [ 8.562047] DVB: Unable to find symbol stv090x_attach()
    [ 8.562117] BUG: unable to handle kernel NULL pointer dereference at 000000ac
    [ 8.562239] IP: [] dvb_frontend_detach+0x4/0x67 [dvb_core]

    Ref http://bugs.debian.org/575207

    Signed-off-by: Bjørn Mork
    Cc: stable@kernel.org
    Signed-off-by: Mauro Carvalho Chehab

    Bjørn Mork
     
  • Send one DiSEqC byte to make sure that the pin is set to low level.

    Signed-off-by: Oliver Endriss
    Reviewed-by: Manu Abraham
    Signed-off-by: Mauro Carvalho Chehab

    Oliver Endriss
     
  • An earlier regression fix for the mxb driver (V4L/DVB: saa7146_vv: fix
    regression where v4l2_device was registered too late) caused a new
    regression in the av7110 driver.

    Reverted the old fix and fixed the problem in the mxb driver instead.
    Tested on mxb and budget-av cards.

    The real problem is that the saa7146 framework has separate probe()
    and attach() driver callbacks which should be rolled into one. This
    is now done for the mxb driver, but others should do the same. Lack
    of hardware makes this hard to do, though. I hope to get hold of some
    hexium cards and then I can try to improve the framework to prevent
    this from happening again.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • v4l: fix config dependencies: mxb and saa7191 are V4L2 drivers, not V4L1

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil