10 Mar, 2011

1 commit

  • Add an "overwrite" trace_option for ftrace to control whether the buffer should
    be overwritten on overflow or not. The default remains to overwrite old events
    when the buffer is full. This patch adds the option to instead discard newest
    events when the buffer is full. This is useful to get a snapshot of traces just
    after enabling traces. Dropping the current event is also a simpler code path.

    Signed-off-by: David Sharp
    LKML-Reference:
    Signed-off-by: Steven Rostedt

    David Sharp
     

09 Mar, 2011

3 commits

  • You can crash the kernel (with root/admin privileges) using kprobe tracer by running:

    echo "p system_call_after_swapgs" > ./kprobe_events
    echo 1 > ./events/kprobes/enable

    The reason is that at the system_call_after_swapgs label, the
    kernel stack is not set up. If optimized kprobes are enabled,
    the user space stack is being used in this case (see optimized
    kprobe template) and this might result in a crash.

    There are several places like this over the entry code
    (entry_$BIT). As it seems there's no any reasonable/maintainable
    way to disable only those places where the stack is not ready, I
    switched off the whole entry code from kprobe optimizing.

    Signed-off-by: Jiri Olsa
    Acked-by: Masami Hiramatsu
    Cc: acme@redhat.com
    Cc: fweisbec@gmail.com
    Cc: ananth@in.ibm.com
    Cc: davem@davemloft.net
    Cc: a.p.zijlstra@chello.nl
    Cc: eric.dumazet@gmail.com
    Cc: 2nddept-manager@sdl.hitachi.co.jp
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Jiri Olsa
     
  • Put x86 entry code into a separate link section: .entry.text.

    Separating the entry text section seems to have performance
    benefits - caused by more efficient instruction cache usage.

    Running hackbench with perf stat --repeat showed that the change
    compresses the icache footprint. The icache load miss rate went
    down by about 15%:

    before patch:
    19417627 L1-icache-load-misses ( +- 0.147% )

    after patch:
    16490788 L1-icache-load-misses ( +- 0.180% )

    The motivation of the patch was to fix a particular kprobes
    bug that relates to the entry text section, the performance
    advantage was discovered accidentally.

    Whole perf output follows:

    - results for current tip tree:

    Performance counter stats for './hackbench/hackbench 10' (500 runs):

    19417627 L1-icache-load-misses ( +- 0.147% )
    2676914223 instructions # 0.497 IPC ( +- 0.079% )
    5389516026 cycles ( +- 0.144% )

    0.206267711 seconds time elapsed ( +- 0.138% )

    - results for current tip tree with the patch applied:

    Performance counter stats for './hackbench/hackbench 10' (500 runs):

    16490788 L1-icache-load-misses ( +- 0.180% )
    2717734941 instructions # 0.502 IPC ( +- 0.079% )
    5414756975 cycles ( +- 0.148% )

    0.206747566 seconds time elapsed ( +- 0.137% )

    Signed-off-by: Jiri Olsa
    Cc: Arnaldo Carvalho de Melo
    Cc: Frederic Weisbecker
    Cc: Peter Zijlstra
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Nick Piggin
    Cc: Eric Dumazet
    Cc: masami.hiramatsu.pt@hitachi.com
    Cc: ananth@in.ibm.com
    Cc: davem@davemloft.net
    Cc: 2nddept-manager@sdl.hitachi.co.jp
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Jiri Olsa
     
  • Merge reason: Merge latest fixes.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

08 Mar, 2011

12 commits

  • Linus Torvalds
     
  • …git/kgene/linux-samsung

    * 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
    ARM: S3C64XX: Update regulator names for debugfs compatiblity on SMDK6410
    ARM: S3C64XX: Fix build with WM1190 disabled and WM1192 enabled on SMDK6410
    ARM: S3C64XX: Reduce output of s3c64xx_dma_init1()
    ARM: S3C64XX: Tone down SDHCI debugging
    ARM: S3C64XX: Add clock for i2c1
    ARM: S3C64XX: Staticise non-exported GPIO to interrupt functions
    ARM: SAMSUNG: Include devs.h in dev-uart.c to prototype devices
    ARM: S3C64XX: Fix keypad setup to configure correct number of rows
    ARM: S3C2440: Fix usage gpio bank j pin definitions on GTA02
    ARM: S5P64X0: Fix number of GPIO lines in Bank F
    ARM: S3C2440: Select missing S3C_DEV_USB_HOST on GTA02

    Linus Torvalds
     
  • * 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm:
    davinci: cpufreq: fix section mismatch warning
    DaVinci: fix compilation warnings in
    davinci: tnetv107x: fix register indexing for GPIOs numbers > 31
    davinci: da8xx/omap-l1x: add platform device for davinci-pcm-audio
    ARM: pxa/tosa: register wm9712 codec device
    ARM: pxa: enable pxa-pcm-audio on pxa210/pxa25x platform
    ARM: pxa/colibri: don't register pxa2xx-pcmcia nodes on non-colibri platforms
    ARM: pxa/tosa: drop setting LED trigger name, as it's unsupported now
    ARM: 6762/1: Update number of VIC for S5P6442 and S5PC100
    ARM: 6761/1: Update number of VIC for S5PV210
    ARM: 6768/1: hw_breakpoint: ensure debug logic is powered up on v7 cores
    ARM: 6767/1: ptrace: fix register indexing in GETHBPREGS request
    ARM: 6765/1: remove obsolete comment from asm/mach/arch.h
    ARM: 6757/1: fix tlb.h induced linux/swap.h build failure

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
    mmc: sdio: Allow sdio operations in other threads during sdio_add_func()

    Linus Torvalds
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm: index i shadowed in 2nd loop
    drm/nv50-nvc0: prevent multiple vm/bar flushes occuring simultanenously
    drm/nouveau: fix regression causing ttm to not be able to evict vram
    drm/i915: Rebind the buffer if its alignment constraints changes with tiling
    drm/i915: Disable GPU semaphores by default
    drm/i915: Do not overflow the MMADDR write FIFO
    Revert "drm/i915: fix corruptions on i8xx due to relaxed fencing"

    Linus Torvalds
     
  • Index i was already used in thhe first loop

    Signed-off-by: Roel Kluin
    Signed-off-by: Dave Airlie

    roel
     
  • This fixes a bug introduced by 807e8e40673d ("mmc: Fix sd/sdio/mmc
    initialization frequency retries") that prevented SDIO drivers from
    performing SDIO commands in their probe routines -- the above patch
    called mmc_claim_host() before sdio_add_func(), which causes a deadlock
    if an external SDIO driver calls sdio_claim_host().

    Fix tested on an OLPC XO-1.75 with libertas on SDIO.

    Signed-off-by: Dmitry Shmidt
    Reviewed-and-Tested-by: Chris Ball
    Signed-off-by: Chris Ball

    Dmitry Shmidt
     
  • * ickle/drm-intel-fixes:
    drm/i915: Rebind the buffer if its alignment constraints changes with tiling
    drm/i915: Disable GPU semaphores by default
    drm/i915: Do not overflow the MMADDR write FIFO
    Revert "drm/i915: fix corruptions on i8xx due to relaxed fencing"

    Dave Airlie
     
  • …/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:
    omap: mailbox: resolve hang issue
    OMAP2+: PM: SmartReflex: fix memory leaks in Smartreflex driver
    arm: mach-omap2: smartreflex: fix another memory leak

    Linus Torvalds
     
  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
    [S390] tape: deadlock on system work queue
    [S390] keyboard: integer underflow bug
    [S390] xpram: remove __initdata attribute from module parameters

    Linus Torvalds
     
  • The per-vm mutex doesn't prevent this completely, a flush coming from the
    BAR VM could potentially happen at the same time as one for the channel
    VM. Not to mention that if/when we get per-client/channel VM, this will
    happen far more frequently.

    Signed-off-by: Ben Skeggs
    Signed-off-by: Dave Airlie

    Ben Skeggs
     
  • TTM assumes an error condition from man->func->get_node() means that
    something went horribly wrong, and causes it to bail.

    The driver is supposed to return 0, and leave mm_node == NULL to
    signal that it couldn't allocate any memory.

    Signed-off-by: Ben Skeggs
    Signed-off-by: Dave Airlie

    Ben Skeggs
     

07 Mar, 2011

8 commits

  • Early gen3 and gen2 chipset do not have the relaxed per-surface tiling
    constraints of the later chipsets, so we need to check that the GTT
    alignment is correct for the new tiling. If it is not, we need to
    rebind.

    Reported-by: Daniel Vetter
    Reviewed-by: Daniel Vetter
    Signed-off-by: Chris Wilson

    Chris Wilson
     
  • Andi Kleen narrowed his GPU hangs on his Sugar Bay (SNB desktop) rev 09
    down to the use of GPU semaphores, and we already know that they appear
    broken up to Huron River (mobile) rev 08. (I'm optimistic that disabling
    GPU semaphores is simply hiding another bug by the latency and
    side-effects of the additional device interaction it introduces...)

    However, use of semaphores is a massive performance improvement... Only
    as long as the system remains stable. Enable at your peril.

    Reported-by: Andi Kleen
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33921
    Signed-off-by: Chris Wilson

    Chris Wilson
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    ALSA: hda - Don't set to D3 in Cirrus errata init verbs
    ALSA: hda - add new Fermi 5xx codec IDs to snd-hda
    ASoC: WM8994: Ensure late enable events are processed for the ADCs
    ASoC: WM8994: Don't disable the AIF[1|2]CLK_ENA unconditionaly
    ASoC: Fix WM9081 platform data initialisation
    ALSA: hda - Fix unable to record issue on ASUS N82JV
    ALSA: HDA: Realtek: Fixup jack detection to input subsystem

    Linus Torvalds
     
  • If a virtio-console device gets unplugged while a port is open, a
    subsequent close() call on the port accesses vqs to free up buffers.
    This can lead to a crash.

    The buffers are already freed up as a result of the call to
    unplug_ports() from virtcons_remove(). The fix is to simply not access
    vq information if port->portdev is NULL.

    Reported-by: juzhang
    CC: stable@kernel.org
    Signed-off-by: Amit Shah
    Signed-off-by: Rusty Russell
    Signed-off-by: Linus Torvalds

    Amit Shah
     
  • When multiple events were used in 'perf record', allow the user to
    choose which one is wanted before showing the per event histograms.

    Annotations will be performed on the chosen event.

    Allow going back and forth from event to event quickly using just the
    arrow keys and enter.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    Cc: William Cohen
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • By creating an perf_evlist out of the attributes in the perf.data file
    header, so that we can use evlists and evsels when reading recorded
    sessions in addition to when we record sessions.

    More work is needed to allow tools to allow the user to select which
    events are wanted when browsing sessions, be it just one or a subset of
    them, aggregated or showed at the same time but with different
    indications on the UI to allow seeing workloads thru different views at
    the same time.

    But the overall goal/trend is to more uniformly use evsels and evlists.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • The previous situation was to receive an fd from where to read the event
    ID.

    Spin off a routine for when we have the ID handy, not having to read it
    from some fd.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

06 Mar, 2011

6 commits

  • Takashi Iwai
     
  • Whilst the GT is powered down (rc6), writes to MMADDR are placed in a
    FIFO by the System Agent. This is a limited resource, only 64 entries, of
    which 20 are reserved for Display and PCH writes, and so we must take
    care not to queue up too many writes. To avoid this, there is counter
    which we can poll to ensure there are sufficient free entries in the
    fifo.

    "Issuing a write to a full FIFO is not supported; at worst it could
    result in corruption or a system hang."

    Reported-and-Tested-by: Matt Turner
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34056
    Signed-off-by: Chris Wilson

    Chris Wilson
     
  • This reverts commit c2e0eb167070a6e9dcb49c84c13c79a30d672431.

    As it turns out, userspace already depends upon being able to enable
    tiling on existing bo which it promises to be large enough for its
    purposes i.e. it will not access beyond the end of the last full-tile
    row.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35016
    Reported-and-tested-by: Kamal Mostafa
    Signed-off-by: Chris Wilson

    Chris Wilson
     
  • To support multiple events we need to do these calcs per 'struct hists'
    instance, and it turns out we already do that at:

    __hists__add_entry
    hists__inc_nr_entries
    hists__calc_col_len

    for all the unfiltered hist_entry instances we stash in the rb tree, so
    trow away the dead code.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • TAB/UNTAB were not hotkeys, so didn't exit hists__browse back to
    hists__tui_browse_tree, allowing just the first event to be browsed.

    Reported-by: William Cohen
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    Cc: William Cohen
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
    ceph: no .snap inside of snapped namespace
    libceph: fix msgr standby handling
    libceph: fix msgr keepalive flag
    libceph: fix msgr backoff
    libceph: retry after authorization failure
    libceph: fix handling of short returns from get_user_pages
    ceph: do not clear I_COMPLETE from d_release
    ceph: do not set I_COMPLETE
    Revert "ceph: keep reference to parent inode on ceph_dentry"

    Linus Torvalds
     

05 Mar, 2011

10 commits

  • Signed-off-by: Lin Ming
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Lin Ming
     
  • Pass down the correct node for a transparent hugepage allocation. Most
    callers continue to use the current node, however the hugepaged daemon
    now uses the previous node of the first to be collapsed page instead.
    This ensures that khugepaged does not mess up local memory for an
    existing process which uses local policy.

    The choice of node is somewhat primitive currently: it just uses the
    node of the first page in the pmd range. An alternative would be to
    look at multiple pages and use the most popular node. I used the
    simplest variant for now which should work well enough for the case of
    all pages being on the same node.

    [akpm@linux-foundation.org: coding-style fixes]
    Acked-by: Andrea Arcangeli
    Signed-off-by: Andi Kleen
    Reviewed-by: KAMEZAWA Hiroyuki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • This makes a difference for LOCAL policy, where the node cannot be
    determined from the policy itself, but has to be gotten from the original
    page.

    Acked-by: Andrea Arcangeli
    Signed-off-by: Andi Kleen
    Reviewed-by: KAMEZAWA Hiroyuki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • Add a alloc_page_vma_node that allows passing the "local" node in. Used
    in a followon patch.

    Acked-by: Andrea Arcangeli
    Signed-off-by: Andi Kleen
    Reviewed-by: KAMEZAWA Hiroyuki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • Currently alloc_pages_vma() always uses the local node as policy node for
    the LOCAL policy. Pass this node down as an argument instead.

    No behaviour change from this patch, but will be needed for followons.

    Acked-by: Andrea Arcangeli
    Signed-off-by: Andi Kleen
    Reviewed-by: KAMEZAWA Hiroyuki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Signed-off-by: Axel Lin
    Cc: Haavard Skinnemoen
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • Add maintainer of Samsung Mobile machine support. Currently, Aquila,
    Goni, Universal (C210), and Nuri board are supported.

    Signed-off-by: Kyungmin Park
    Cc: Joe Perches
    Cc: "David S. Miller"
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kyungmin Park
     
  • This driver causes hard lockups, when the active clock soure is jiffies.

    The reason is that it loops with interrupts disabled waiting for a
    timestamp to be reached by polling getnstimeofday(). Though with a
    jiffies clocksource, when that code runs on the same CPU which is
    responsible for updating jiffies, then we loop in circles for ever
    simply because the timer interrupt cannot update jiffies. So both UP
    and SMP can be affected.

    There is no easy fix for that problem so make it depend on BROKEN for
    now.

    Signed-off-by: Thomas Gleixner
    Cc: Alexander Gordeev
    Cc: Rodolfo Giometti
    Cc: john stultz
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • The device table is required to load modules based on modaliases.

    Signed-off-by: Axel Lin
    Cc: Shubhrajyoti D
    Cc: Christoph Mair
    Cc: Jonathan Cameron
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin