1. 10 8月, 2009 23 次提交
  2. 09 8月, 2009 9 次提交
    • F
      perf_counter: Fix/complete ftrace event records sampling · f413cdb8
      Frederic Weisbecker 提交于
      This patch implements the kernel side support for ftrace event
      record sampling.
      
      A new counter sampling attribute is added:
      
         PERF_SAMPLE_TP_RECORD
      
      which requests ftrace events record sampling. In this case
      if a PERF_TYPE_TRACEPOINT counter is active and a tracepoint
      fires, we emit the tracepoint binary record to the
      perfcounter event buffer, as a sample.
      
      Result, after setting PERF_SAMPLE_TP_RECORD attribute from perf
      record:
      
       perf record -f -F 1 -a -e workqueue:workqueue_execution
       perf report -D
      
       0x21e18 [0x48]: event: 9
       .
       . ... raw event: size 72 bytes
       .  0000:  09 00 00 00 01 00 48 00 d0 c7 00 81 ff ff ff ff  ......H........
       .  0010:  0a 00 00 00 0a 00 00 00 21 00 00 00 00 00 00 00  ........!......
       .  0020:  2b 00 01 02 0a 00 00 00 0a 00 00 00 65 76 65 6e  +...........eve
       .  0030:  74 73 2f 31 00 00 00 00 00 00 00 00 0a 00 00 00  ts/1...........
       .  0040:  e0 b1 31 81 ff ff ff ff                          .......
      .
      0x21e18 [0x48]: PERF_EVENT_SAMPLE (IP, 1): 10: 0xffffffff8100c7d0 period: 33
      
      The raw ftrace binary record starts at offset 0020.
      
      Translation:
      
       struct trace_entry {
      	type		= 0x2b = 43;
      	flags		= 1;
      	preempt_count	= 2;
      	pid		= 0xa = 10;
      	tgid		= 0xa = 10;
       }
      
       thread_comm = "events/1"
       thread_pid  = 0xa = 10;
       func	    = 0xffffffff8131b1e0 = flush_to_ldisc()
      
      What will come next?
      
       - Userspace support ('perf trace'), 'flight data recorder' mode
         for perf trace, etc.
      
       - The unconditional copy from the profiling callback brings
         some costs however if someone wants no such sampling to
         occur, and needs to be fixed in the future. For that we need
         to have an instant access to the perf counter attribute.
         This is a matter of a flag to add in the struct ftrace_event.
      
       - Take care of the events recursivity! Don't ever try to record
         a lock event for example, it seems some locking is used in
         the profiling fast path and lead to a tracing recursivity.
         That will be fixed using raw spinlock or recursivity
         protection.
      
       - [...]
      
       - Profit! :-)
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Cc: Gabriel Munteanu <eduard.munteanu@linux360.ro>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f413cdb8
    • P
      perf_counter, ftrace: Fix perf_counter integration · 3a659305
      Peter Zijlstra 提交于
      Adds possible second part to the assign argument of TP_EVENT().
      
        TP_perf_assign(
      	__perf_count(foo);
      	__perf_addr(bar);
        )
      
      Which, when specified make the swcounter increment with @foo instead
      of the usual 1, and report @bar for PERF_SAMPLE_ADDR (data address
      associated with the event) when this triggers a counter overflow.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3a659305
    • I
      Merge branch 'linus' into tracing/urgent · e3560336
      Ingo Molnar 提交于
      Merge reason: Merge up to almost-rc6 to pick up latest perfcounters
                    (on which we'll queue up a dependent fix)
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e3560336
    • G
      KVM: Avoid redelivery of edge interrupt before next edge · b4a2f5e7
      Gleb Natapov 提交于
      The check for an edge is broken in current ioapic code. ioapic->irr is
      cleared on each edge interrupt by ioapic_service() and this makes
      old_irr != ioapic->irr condition in kvm_ioapic_set_irq() to be always
      true. The patch fixes the code to properly recognise edge.
      
      Some HW emulation calls set_irq() without level change. If each such
      call is propagated to an OS it may confuse a device driver. This is the
      case with keyboard device emulation and Windows XP x64  installer on SMP VM.
      Each keystroke produce two interrupts (down/up) one interrupt is
      submitted to CPU0 and another to CPU1. This confuses Windows somehow
      and it ignores keystrokes.
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      b4a2f5e7
    • R
      x86: fix buffer overflow in efi_init() · fdb8a427
      Roel Kluin 提交于
      If the vendor name (from c16) can be longer than 100 bytes (or missing a
      terminating null), then the null is written past the end of vendor[].
      
      Found with Parfait, http://research.sun.com/projects/parfait/Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: Huang Ying <ying.huang@intel.com>
      fdb8a427
    • F
      drm/i915: silence vblank warnings · 6cb504c2
      Frans Pop 提交于
      these errors are pretty pointless
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      6cb504c2
    • P
      drm: silence pointless vblank warning. · 8d3457ec
      Paul Rolland 提交于
      Some applications/hardware combinations are triggering the message "failed to
      acquire vblank counter" to be issued up to 20 times a second, which makes it
      both useless and dangerous, as this may hide other important messages.
      This changes makes it only appear when people are debugging.
      Signed-off-by: NPaul Rolland <rol@as2917.net>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Lost-twice-by: NDave Airlie <airlied@redhat.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      8d3457ec
    • K
      drm: When adding probed modes, preserve duplicate mode types · 38d5487d
      Keith Packard 提交于
      The code which takes probed modes and adds them to a connector eliminates
      duplicate modes by comparing them using drm_mode_equal. That function
      doesn't consider the type bits, which means that any modes which differ only
      in the type field will be lost.
      
      One of the bits in the mode->type field is the DRM_MODE_TYPE_PREFERRED bit.
      If the mode with that bit is lost, then higher level code will not know
      which mode to select, causing a random mode to be used instead.
      
      This patch simply merges the two mode type bits together; that seems
      reasonable to me, but perhaps only a subset of the bits should be used? None
      of these can be user defined as they all come from looking at just the
      hardware.
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      38d5487d
    • S
      posix_cpu_timers_exit_group(): Do not use thread_group_cputimer() · 17d42c1c
      Stanislaw Gruszka 提交于
      When the process exits we don't have to run new cputimer nor
      use running one (as it not accounts when tsk->exit_state != 0)
      to get process CPU times.  As there is only one thread we can
      just use CPU times fields from task and signal structs.
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Vitaly Mayatskikh <vmayatsk@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      17d42c1c
  3. 08 8月, 2009 8 次提交
    • T
      tracing/filters: Always free pred on filter_add_subsystem_pred() failure · 26528e77
      Tom Zanussi 提交于
      If filter_add_subsystem_pred() fails due to ENOSPC or ENOMEM,
      the pred doesn't get freed, while as a side effect it does for
      other errors. Make it so the caller always frees the pred for
      any error.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      LKML-Reference: <1249746593.6453.32.camel@tropicana>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      26528e77
    • T
      tracing/filters: Don't use pred on alloc failure · 96b2de31
      Tom Zanussi 提交于
      Dan Carpenter sent me a fix to prevent pred from being used if
      it couldn't be allocated.  I noticed the same problem also
      existed for the create_pred() case and added a fix for that.
      Reported-by: NDan Carpenter <error27@gmail.com>
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      LKML-Reference: <1249746549.6453.29.camel@tropicana>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      96b2de31
    • O
      x86: Add quirk to make Apple MacBookPro5,1 use reboot=pci · 498cdbfb
      Ozan Çağlayan 提交于
      MacBookPro5,1 is not able to reboot unless reboot=pci is set.
      This patch forces it through a DMI quirk specific to this
      device.
      Signed-off-by: NOzan Çağlayan <ozan@pardus.org.tr>
      LKML-Reference: <1249403971-6543-1-git-send-email-ozan@pardus.org.tr>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      498cdbfb
    • Y
      x86: Fix MSI-X initialization by using online_mask for x2apic target_cpus · 087d7e56
      Yinghai Lu 提交于
      found a system where x2apic reports an MSI-X irq initialization
      failure:
      
      [  302.859446] igbvf 0000:81:10.4: enabling device (0000 -> 0002)
      [  302.874369] igbvf 0000:81:10.4: using 64bit DMA mask
      [  302.879023] igbvf 0000:81:10.4: using 64bit consistent DMA mask
      [  302.894386] igbvf 0000:81:10.4: enabling bus mastering
      [  302.898171] igbvf 0000:81:10.4: setting latency timer to 64
      [  302.914050] reserve_memtype added 0xefb08000-0xefb0c000, track uncached-minus, req uncached-minus, ret uncached-minus
      [  302.933839] reserve_memtype added 0xefb28000-0xefb29000, track uncached-minus, req uncached-minus, ret uncached-minus
      [  302.940367]   alloc irq_desc for 265 on node 4
      [  302.956874]   alloc kstat_irqs on node 4
      [  302.959452] alloc irq_2_iommu on node 0
      [  302.974328] igbvf 0000:81:10.4: irq 265 for MSI/MSI-X
      [  302.977778]   alloc irq_desc for 266 on node 4
      [  302.980347]   alloc kstat_irqs on node 4
      [  302.995312] free_memtype request 0xefb28000-0xefb29000
      [  302.998816] igbvf 0000:81:10.4: Failed to initialize MSI-X interrupts.
      
      ... it turns out that when trying to enable MSI-X,
      __assign_irq_vector(new, cfg_new, apic->target_cpus()) can not
      get vector because for x2apic target-cpus returns cpumask_of(0)
      
      Update that to online_mask like xapic.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Acked-by: NSuresh Siddha <suresh.b.siddha@intel.com>
      LKML-Reference: <4A785AFF.3050902@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      087d7e56
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 · 7b2aa037
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
        USB: fix oops on disconnect in cdc-acm
        USB: storage: include Prolific Technology USB drive in unusual_devs list
        USB: ftdi_sio: add product_id for Marvell OpenRD Base, Client
        USB: ftdi_sio: add vendor and product id for Bayer glucose meter serial converter cable
        USB: EHCI: fix counting of transaction error retries
        USB: EHCI: fix two new bugs related to Clear-TT-Buffer
        USB: usbfs: fix -ENOENT error code to be -ENODEV
        USB: musb: fix the nop registration for OMAP3EVM
        USB: devio: Properly do access_ok() checks
        USB: pl2303: New vendor and product id
      7b2aa037
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 · 710ad849
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
        Staging: rspiusb: Fix buffer overflow
        staging: add dependencies on PCI for drivers that require it
        Staging: rtl8192su: fix build error
        Staging: rt2870: Revert d44ca7 Removal of kernel_thread() API
        Staging: rt2870: Add USB ID for Linksys, Planex Communications, Belkin
      710ad849
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel · b32b8e64
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel: (22 commits)
        drm/i915: Fix read outside array bounds in restoring the SWF10 range.
        drm/i915: Use our own workqueue to avoid wedging the system along with the GPU.
        drm/i915: Add support for dual-channel LVDS on 8xx.
        drm/i915: Return disconnected for SDVO DVI when there's no digital EDID.
        drm/i915: Choose real sdvo output according to result from detection
        drm/i915: Set preferred mode for integrated TV according to TV format
        drm/i915: fix 845G FIFO size & burst length
        drm/i915: fix VGA detect on IGDNG
        drm/i915: Add eDP support on IGDNG mobile chip
        drm/i915: enable DisplayPort support on IGDNG
        drm/i915: Fix channel ending action for DP aux transaction
        drm/i915: fix issue in display pipe setup on IGDNG
        drm/i915: disable VGA plane reliably
        drm/I915: Fix offset to DVO timings in LVDS data
        drm/i915: hdmi detection according by reading edid
        drm/i915: correct self-refresh calculation in "everything off" case
        drm/i915: handle FIFO oversubsription correctly
        drm/i915: FIFO watermark calculation fixes
        drm/i915: ignore lvds on AOpen Mini PC MP-915
        drm/i915: Allow frame buffers up to 4096x4096 on 915/945 class hardware
        ...
      b32b8e64
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable · d6a0967c
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
        Btrfs: fix balancing oops when invalidate_inode_pages2 returns EBUSY
        Btrfs: correct error-handling zlib error handling
        Btrfs: remove superfluous NULL pointer check in btrfs_rename()
        Btrfs: make sure the async caching thread advances the key
        Btrfs: fix btrfs_remove_from_free_space corner case
      d6a0967c