1. 13 10月, 2009 3 次提交
    • H
      perf_event, x86, mce: Use TRACE_EVENT() for MCE logging · 8968f9d3
      Hidetoshi Seto 提交于
      This approach is the first baby step towards solving many of the
      structural problems the x86 MCE logging code is having today:
      
       - It has a private ring-buffer implementation that has a number
         of limitations and has been historically fragile and buggy.
      
       - It is using a quirky /dev/mcelog ioctl driven ABI that is MCE
         specific. /dev/mcelog is not part of any larger logging
         framework and hence has remained on the fringes for many years.
      
       - The MCE logging code is still very unclean partly due to its ABI
         limitations. Fields are being reused for multiple purposes, and
         the whole message structure is limited and x86 specific to begin
         with.
      
      All in one, the x86 tree would like to move away from this private
      implementation of an event logging facility to a broader framework.
      
      By using perf events we gain the following advantages:
      
       - Multiple user-space agents can access MCE events. We can have an
         mcelog daemon running but also a system-wide tracer capturing
         important events in flight-recorder mode.
      
       - Sampling support: the kernel and the user-space call-chain of MCE
         events can be stored and analyzed as well. This way actual patterns
         of bad behavior can be matched to precisely what kind of activity
         happened in the kernel (and/or in the app) around that moment in
         time.
      
       - Coupling with other hardware and software events: the PMU can track a
         number of other anomalies - monitoring software might chose to
         monitor those plus the MCE events as well - in one coherent stream of
         events.
      
       - Discovery of MCE sources - tracepoints are enumerated and tools can
         act upon the existence (or non-existence) of various channels of MCE
         information.
      
       - Filtering support: we just subscribe to and act upon the events we
         are interested in. Then even on a per event source basis there's
         in-kernel filter expressions available that can restrict the amount
         of data that hits the event channel.
      
       - Arbitrary deep per cpu buffering of events - we can buffer 32
         entries or we can buffer as much as we want, as long as we have
         the RAM.
      
       - An NMI-safe ring-buffer implementation - mappable to user-space.
      
       - Built-in support for timestamping of events, PID markers, CPU
         markers, etc.
      
       - A rich ABI accessible over system call interface. Per cpu, per task
         and per workload monitoring of MCE events can be done this way. The
         ABI itself has a nice, meaningful structure.
      
       - Extensible ABI: new fields can be added without breaking tooling.
         New tracepoints can be added as the hardware side evolves. There's
         various parsers that can be used.
      
       - Lots of scheduling/buffering/batching modes of operandi for MCE
         events. poll() support. mmap() support. read() support. You name it.
      
       - Rich tooling support: even without any MCE specific extensions added
         the 'perf' tool today offers various views of MCE data: perf report,
         perf stat, perf trace can all be used to view logged MCE events and
         perhaps correlate them to certain user-space usage patterns. But it
         can be used directly as well, for user-space agents and policy action
         in mcelog, etc.
      
      With this we hope to achieve significant code cleanup and feature
      improvements in the MCE code, and we hope to be able to drop the
      /dev/mcelog facility in the end.
      
      This patch is just a plain dumb dump of mce_log() records to
      the tracepoints / perf events framework - a first proof of
      concept step.
      Signed-off-by: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Cc: Huang Ying <ying.huang@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      LKML-Reference: <4AD42A0D.7050104@jp.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8968f9d3
    • I
      Merge commit 'v2.6.32-rc4' into perf/core · 9dbdd6c4
      Ingo Molnar 提交于
      Merge reason: we were on an -rc1 base, merge up to -rc4.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9dbdd6c4
    • I
      perf_events, x86: Fix event constraints code · 7a693d3f
      Ingo Molnar 提交于
      There was namespace overlap due to a rename i did - this caused
      the following build warning, reported by Stephen Rothwell against
      linux-next x86_64 allmodconfig:
      
        arch/x86/kernel/cpu/perf_event.c: In function 'intel_get_event_idx':
        arch/x86/kernel/cpu/perf_event.c:1445: warning: 'event_constraint' is used uninitialized in this function
      
      This is a real bug not just a warning: fix it by renaming the
      global event-constraints table pointer to 'event_constraints'.
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Cc: Stephane Eranian <eranian@gmail.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091013144223.369d616d.sfr@canb.auug.org.au>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7a693d3f
  2. 12 10月, 2009 12 次提交
    • M
      perf sched: Add -C option to measure on a specific CPU · 55ffb7a6
      Mike Galbraith 提交于
      To refresh, trying to sched record only one CPU results in bogus
      latencies as below.
      
      I fixed^Wmade it stop doing the bad thing today, by
      following task migration events properly.
      
      Before:
      
        marge:/root/tmp # taskset -c 1 perf sched record -C 0 -- sleep 10
        marge:/root/tmp # perf sched lat
         -----------------------------------------------------------------------------------------
          Task                  |   Runtime ms  | Switches | Average delay ms | Maximum delay ms |
         -----------------------------------------------------------------------------------------
          Xorg:4943             |      1.290 ms |        1 | avg: 1670.132 ms | max: 1670.132 ms |
          hald-addon-stor:3569  |      0.091 ms |        3 | avg:  658.609 ms | max: 1975.797 ms |
          hald-addon-stor:3573  |      0.209 ms |        4 | avg:  499.138 ms | max: 1990.565 ms |
          audispd:4270          |      0.012 ms |        1 | avg:    0.015 ms | max:    0.015 ms |
        ....
      
        marge:/root/tmp # perf sched trace|grep 'Xorg:4943'
                 swapper-0     [000]   401.184013288: sched_stat_runtime: task: Xorg:4943 runtime: 1233188 [ns], vruntime: 19105169779 [ns]
         rt2870TimerQHan-4947  [000]   402.854140127: sched_stat_wait: task: Xorg:4943 wait: 580073 [ns]
         rt2870TimerQHan-4947  [000]   402.854141770: sched_migrate_task: task Xorg:4943 [140] from: 1  to: 0
         rt2870TimerQHan-4947  [000]   402.854143854: sched_stat_wait: task: Xorg:4943 wait: 0 [ns]
         rt2870TimerQHan-4947  [000]   402.854145397: sched_switch: task rt2870TimerQHan:4947 [140] (D) ==> Xorg:4943 [140]
                    Xorg-4943  [000]   402.854193133: sched_stat_runtime: task: Xorg:4943 runtime: 56546 [ns], vruntime: 11766332500 [ns]
                    Xorg-4943  [000]   402.854196842: sched_switch: task Xorg:4943 [140] (S) ==> swapper:0 [140]
      
      After:
      
        marge:/root/tmp # taskset -c 1 perf sched record -C 0 -- sleep 10
        marge:/root/tmp # perf sched lat
         -----------------------------------------------------------------------------------------
          Task                  |   Runtime ms  | Switches | Average delay ms | Maximum delay ms |
         -----------------------------------------------------------------------------------------
          amarokapp:11150       |    271.297 ms |      878 | avg:    0.130 ms | max:    1.057 ms |
          konsole:5965          |      1.370 ms |       12 | avg:    0.092 ms | max:    0.855 ms |
          Xorg:4943             |    179.980 ms |     1109 | avg:    0.087 ms | max:    1.206 ms |
          hald-addon-stor:3574  |      0.212 ms |        9 | avg:    0.040 ms | max:    0.169 ms |
          hald-addon-stor:3570  |      0.223 ms |        9 | avg:    0.037 ms | max:    0.223 ms |
          klauncher:5864        |      0.550 ms |        8 | avg:    0.032 ms | max:    0.048 ms |
      
      The 'Maximum delay ms' results are now sane.
      Signed-off-by: NMike Galbraith <efault@gmx.de>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      55ffb7a6
    • M
      perf tools: Fix counter sample frequency breakage · 7e4ff9e3
      Mike Galbraith 提交于
      Commit 42e59d7d switched to a default sample frequency of
      1KHz, which overrides any user supplied count, causing sched, top
      and timechart to miss events due to their discrete events
      being flagged PERF_SAMPLE_PERIOD.
      
      Override default sample frequency when the user profides a
      period count, and make both record and top honor that user
      supplied option.
      Signed-off-by: NMike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arjan van de Ven <arjan@infradead.org>
      LKML-Reference: <1255326963.15107.2.camel@marge.simson.net>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7e4ff9e3
    • L
      Linux 2.6.32-rc4 · 16129139
      Linus Torvalds 提交于
      16129139
    • Y
      pci: increase alignment to make more space for hidden code · 15b812f1
      Yinghai Lu 提交于
      As reported in
      
      	http://bugzilla.kernel.org/show_bug.cgi?id=13940
      
      on some system when acpi are enabled, acpi clears some BAR for some
      devices without reason, and kernel will need to allocate devices for
      them.  It then apparently hits some undocumented resource conflict,
      resulting in non-working devices.
      
      Try to increase alignment to get more safe range for unassigned devices.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      15b812f1
    • L
      Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6 · f144c78e
      Linus Torvalds 提交于
      * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (21 commits)
        [S390] dasd: fix race condition in resume code
        [S390] Add EX_TABLE for addressing exception in usercopy functions.
        [S390] 64-bit register support for 31-bit processes
        [S390] hibernate: Use correct place for CPU address in lowcore
        [S390] pm: ignore time spend in suspended state
        [S390] zcrypt: Improve some comments
        [S390] zcrypt: Fix sparse warning.
        [S390] perf_counter: fix vdso detection
        [S390] ftrace: drop nmi protection
        [S390] compat: fix truncate system call wrapper
        [S390] Provide arch specific mdelay implementation.
        [S390] Fix enabled udelay for short delays.
        [S390] cio: allow setting boxed devices offline
        [S390] cio: make not operational handling consistent
        [S390] cio: make disconnected handling consistent
        [S390] Fix memory leak in /proc/cio_ignore
        [S390] cio: channel path memory leak
        [S390] module: fix memory leak in s390 module loader
        [S390] Enable kmemleak on s390.
        [S390] 3270 console build fix
        ...
      f144c78e
    • B
      ROMFS: fix length used with romfs_dev_strnlen() function · ef1f7a7e
      Bernd Schmidt 提交于
      An interestingly corrupted romfs file system exposed a problem with the
      romfs_dev_strnlen function: it's passing the wrong value to its helpers.
      Rather than limit the string to the length passed in by the callers, it
      uses the size of the device as the limit.
      Signed-off-by: NBernd Schmidt <bernds_cb1@t-online.de>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ef1f7a7e
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 · c6c59927
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (32 commits)
        USB: serial: no unnecessary GFP_ATOMIC in oti6858
        USB: serial: fix race between unthrottle and completion handler in visor
        USB: serial: fix assumption that throttle/unthrottle cannot sleep
        USB: serial: fix race between unthrottle and completion handler in symbolserial
        USB: serial: fix race between unthrottle and completion handler in opticon
        USB: ehci: Fix isoc scheduling boundary checking.
        USB: storage: When a device returns no sense data, call it a Hardware Error
        USB: small fix in error case of suspend in generic usbserial code
        USB: visor: fix trivial accounting bug in visor driver
        USB: Fix throttling in generic usbserial driver
        USB: cp210x: Add support for the DW700 UART
        USB: ipaq: fix oops when device is plugged in
        USB: isp1362: fix build warnings on 64-bit systems
        USB: gadget: imx_udc: Use resource size
        USB: storage: iRiver P7 UNUSUAL_DEV patch
        USB: musb: make HAVE_CLK support optional
        USB: xhci: Fix dropping endpoints from the xHC schedule.
        USB: xhci: Don't wait for a disable slot cmd when HC dies.
        USB: xhci: Handle canceled URBs when HC dies.
        USB: xhci: Stop debugging polling loop when HC dies.
        ...
      c6c59927
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 · ff945afb
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
        Staging: comedi: fix build on arches that don't want comedi drivers
        Staging: comedi: pcmcia irq fixes
        Staging: comedi: ni_pcimio: Added device id for pxi-6225.
        Staging: comedi: ni_65xx.c: fix output inversion problem.
        Staging: comedi: ni_65xx.c: fix insn_bits shift calculation.
        Staging: comedi: s526: fixes for pulse generator
        Staging: comedi: s526: Take account of arch's byte order.
        Staging: comedi: s526: Get rid of global variable 'cmReg'.
        Staging: comedi: s526: Fix number of channels on DIO subdevice
        Staging: comedi: cb_pcidio: fix "section mismatch" error
        Staging: comedi: jr3_pci: Initialize transf variable fully in jr3_pci_poll_subdevice().
        Staging: comedi: Corrected type of a printk argument in resize_async_buffer().
        Staging: p9auth: a few fixes
        Staging: rtl8192e: Add #include <linux/vmalloc.h>
        Staging: iio: Don't build on s390
        Staging: winbond: implement prepare_multicast and fix API usage
        Staging: w35und: Fix ->beacon_int breakage
        Staging: remove cowloop driver
        Staging: remove agnx driver
        Staging: comedi: serial2002: fix include build issue
      ff945afb
    • L
      Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging · 4c274fff
      Linus Torvalds 提交于
      * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
        hwmon: (s3c-hwmon) Disable build for S3C64xx
        MAINTAINERS: Fix Riku Voipio's address
        hwmon: (asus_atk0110) Enable the EC
        hwmon: (asus_atk0110) Refactor the code
        hwmon: (sht15) Fix spurious section mismatch warning
      4c274fff
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable · 474a503d
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
        Btrfs: fix file clone ioctl for bookend extents
        Btrfs: fix uninit compiler warning in cow_file_range_nocow
        Btrfs: constify dentry_operations
        Btrfs: optimize back reference update during btrfs_drop_snapshot
        Btrfs: remove negative dentry when deleting subvolumne
        Btrfs: optimize fsync for the single writer case
        Btrfs: async delalloc flushing under space pressure
        Btrfs: release delalloc reservations on extent item insertion
        Btrfs: delay clearing EXTENT_DELALLOC for compressed extents
        Btrfs: cleanup extent_clear_unlock_delalloc flags
        Btrfs: fix possible softlockup in the allocator
        Btrfs: fix deadlock on async thread startup
      474a503d
    • A
      headers: remove sched.h from interrupt.h · d43c36dc
      Alexey Dobriyan 提交于
      After m68k's task_thread_info() doesn't refer to current,
      it's possible to remove sched.h from interrupt.h and not break m68k!
      Many thanks to Heiko Carstens for allowing this.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      d43c36dc
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 · 69585dd6
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (34 commits)
        [SCSI] qla2xxx: Fix NULL ptr deref bug in fail path during queue create
        [SCSI] st: fix possible memory use after free after MTSETBLK ioctl
        [SCSI] be2iscsi: Moving to pci_pools v3
        [SCSI] libiscsi: iscsi_session_setup to allow for private space
        [SCSI] be2iscsi: add 10Gbps iSCSI - BladeEngine 2 driver
        [SCSI] zfcp: Fix hang when offlining device with offline chpid
        [SCSI] zfcp: Fix lockdep warning when offlining device with offline chpid
        [SCSI] zfcp: Fix oops during shutdown of offline device
        [SCSI] zfcp: Fix initial device and cfdc for delayed adapter allocation
        [SCSI] zfcp: correctly initialize unchained requests
        [SCSI] mpt2sas: Bump version 02.100.03.00
        [SCSI] mpt2sas: Support dev remove when phy status is MPI2_EVENT_SAS_TOPO_PHYSTATUS_VACANT
        [SCSI] mpt2sas: Timeout occurred within the HANDSHAKE logic while waiting on firmware to ACK.
        [SCSI] mpt2sas: Call init_completion on a per request basis.
        [SCSI] mpt2sas: Target Reset will be issued from Interrupt context.
        [SCSI] mpt2sas: Added SCSIIO, Internal and high priority memory pools to support multiple TM
        [SCSI] mpt2sas: Copyright change to 2009.
        [SCSI] mpt2sas: Added mpi2_history.txt for MPI2 headers.
        [SCSI] mpt2sas: Update driver to MPI2 REV K headers.
        [SCSI] bfa: Brocade BFA FC SCSI driver
        ...
      69585dd6
  3. 10 10月, 2009 25 次提交