14 Mar, 2012

4 commits

  • On ancient systems I get this build failure:

    util/../../../arch/x86/include/asm/unistd.h:67:29: error: asm/unistd_64.h: No such file or directory
    In file included from util/cache.h:7,
    from builtin-test.c:8:
    util/../perf.h: In function ‘sys_perf_event_open’:In file included from util/../perf.h:16
    perf.h:170: error: ‘__NR_perf_event_open’ undeclared (first use in this function)

    The reason is that this old system does not have the split
    unistd.h headers yet, from which to pick up the syscall
    definitions.

    Add the syscall numbers to the already existing i386 and x86_64
    blocks in perf.h, and also provide empty include file stubs.

    With this patch perf builds and works fine on 5 years old
    user-space as well.

    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Link: http://lkml.kernel.org/n/tip-jctwg64le1w47tuaoeyftsg9@git.kernel.org
    Signed-off-by: Ingo Molnar
    Signed-off-by: Arnaldo Carvalho de Melo

    Ingo Molnar
     
  • Several places were expecting that the value returned was the number of
    characters printed, not what would be printed if there was space.

    Fix it by using the scnprintf and vscnprintf variants we inherited from
    the kernel sources.

    Some corner cases where the number of printed characters were not
    accounted were fixed too.

    Reported-by: Anton Blanchard
    Cc: Anton Blanchard
    Cc: Eric B Munson
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Yanmin Zhang
    Cc: stable@kernel.org
    Link: http://lkml.kernel.org/n/tip-kwxo2eh29cxmd8ilixi2005x@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • I have a workload where perf top scribbles over the stack and we SEGV.
    What makes it interesting is that an snprintf is causing this.

    The workload is a c++ gem that has method names over 3000 characters
    long, but snprintf is designed to avoid overrunning buffers. So what
    went wrong?

    The problem is we assume snprintf returns the number of characters
    written:

    ret += repsep_snprintf(bf + ret, size - ret, "[%c] ", self->level);
    ...
    ret += repsep_snprintf(bf + ret, size - ret, "%s", self->ms.sym->name);

    Unfortunately this is not how snprintf works. snprintf returns the
    number of characters that would have been written if there was enough
    space. In the above case, if the first snprintf returns a value larger
    than size, we pass a negative size into the second snprintf and happily
    scribble over the stack. If you have 3000 character c++ methods thats a
    lot of stack to trample.

    This patch fixes repsep_snprintf by clamping the value at size - 1 which
    is the maximum snprintf can write before adding the NULL terminator.

    I get the sinking feeling that there are a lot of other uses of snprintf
    that have this same bug, we should audit them all.

    Cc: David Ahern
    Cc: Eric B Munson
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Yanmin Zhang
    Cc: stable@kernel.org
    Link: http://lkml.kernel.org/r/20120307114249.44275ca3@kryten
    Signed-off-by: Anton Blanchard
    Signed-off-by: Arnaldo Carvalho de Melo

    Anton Blanchard
     
  • This patch fixes a buffer overrun bug in
    tracepoint_id_to_path(). The bug manisfested itself as a memory
    error reported by perf record. I ran into it with perf sched:

    $ perf sched rec noploop 2 noploop for 2 seconds
    [ perf record: Woken up 14 times to write data ]
    [ perf record: Captured and wrote 42.701 MB perf.data (~1865622 samples) ]
    Fatal: No memory to alloc tracepoints list

    It turned out that tracepoint_id_to_path() was reading the
    tracepoint id using read() but the buffer was not large enough
    to include the \n terminator for id with 4 digits or more.

    The patch fixes the problem by extending the buffer to a more
    reasonable size covering all possible id length include \n
    terminator. Note that atoll() stops at the first non digit
    character, thus it is not necessary to clear the buffer between
    each read.

    Signed-off-by: Stephane Eranian
    Acked-by: Arnaldo Carvalho de Melo
    Acked-by: Peter Zijlstra
    Cc: fweisbec@gmail.com
    Cc: dsahern@gmail.com
    Link: http://lkml.kernel.org/r/20120313155102.GA6465@quad
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     

06 Mar, 2012

1 commit


03 Mar, 2012

4 commits

  • Just fall back to resetting those fields, if set, warning the user that
    that feature is not available.

    If guest samples appear they will just be discarded because no struct
    machine will be found and thus the event will be accounted as not
    handled and dropped, see 0c09571.

    Reported-by: Namhyung Kim
    Tested-by: Joerg Roedel
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Joerg Roedel
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-vuwxig36mzprl5n7nzvnxxsh@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Setting perf_guest to true by default makes no sense because the perf
    subcommands can not setup guest symbol information and thus not process
    and guest samples. The only exception is perf-kvm which changes the
    perf_guest value on its own. So change the default for perf_guest back
    to false.

    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jason Wang
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1328893505-4115-3-git-send-email-joerg.roedel@amd.com
    Signed-off-by: Joerg Roedel
    Signed-off-by: Arnaldo Carvalho de Melo

    Joerg Roedel
     
  • A recent refactoring of perf-record introduced the following:

    perf record -a -B
    Couldn't generating buildids. Use --no-buildid to profile anyway.
    sleep: Terminated

    I believe the triple negative was meant to be only a double negative.
    :-) While I'm there, fixed the grammar on the error message.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1328567272-13190-1-git-send-email-dsahern@gmail.com
    Signed-off-by: David Ahern
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     
  • …t-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

    Pulling latest branches from Ingo:

    * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    memblock: Fix size aligning of memblock_alloc_base_nid()

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf probe: Ensure offset provided is not greater than function length without DWARF info too
    perf tools: Ensure comm string is properly terminated
    perf probe: Ensure offset provided is not greater than function length
    perf evlist: Return first evsel for non-sample event on old kernel
    perf/hwbp: Fix a possible memory leak

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    CPU hotplug, cpusets, suspend: Don't touch cpusets during suspend/resume

    Linus Torvalds
     

01 Mar, 2012

4 commits

  • The 'perf probe' command allows kprobe to be inserted at any offset from
    a function start, which results in adding kprobes to unintended
    location. (example: perf probe do_fork+10000 is allowed even though
    size of do_fork is ~904).

    My previous patch https://lkml.org/lkml/2012/2/24/42 addressed the case
    where DWARF info was available for the kernel. This patch fixes the
    case where perf probe is used on a kernel without debuginfo available.

    Acked-by: Masami Hiramatsu
    Cc: Ananth N Mavinakayanahalli
    Cc: Jason Baron
    Cc: Masami Hiramatsu
    Cc: Srikar Dronamraju
    Cc: Steven Rostedt
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/4F4C544D.1010909@linux.vnet.ibm.com
    Signed-off-by: Prashanth Nageshappa
    Signed-off-by: Arnaldo Carvalho de Melo

    Prashanth Nageshappa
     
  • If threads in a multi-threaded process have names shorter than the main
    thread the comm for the named threads is not properly terminated.

    E.g., for the process 'namedthreads' where each thread is named noploop%d
    where %d is the thread number:

    Before:
    perf script -f comm,tid,ip,sym,dso
    noploop:4ads 21616 400a49 noploop (/tmp/namedthreads)
    The 'ads' in the thread comm bleeds over from the process name.

    After:
    perf script -f comm,tid,ip,sym,dso
    noploop:4 21616 400a49 noploop (/tmp/namedthreads)

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1330111898-68071-1-git-send-email-dsahern@gmail.com
    Signed-off-by: David Ahern
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     
  • The perf probe command allows kprobe to be inserted at any offset from a
    function start, which results in adding kprobes to unintended location.

    Example: perf probe do_fork+10000 is allowed even though size of do_fork
    is ~904.

    This patch will ensure probe addition fails when the offset specified is
    greater than size of the function.

    Acked-by: Masami Hiramatsu
    Cc: Ananth N Mavinakayanahalli
    Cc: Srikar Dronamraju
    Cc: Steven Rostedt
    Cc: Andrew Morton
    Cc: Jason Baron
    Cc: Masami Hiramatsu
    Link: http://lkml.kernel.org/r/4F473F33.4060409@linux.vnet.ibm.com
    Signed-off-by: Prashanth Nageshappa
    Signed-off-by: Arnaldo Carvalho de Melo

    Prashanth Nageshappa
     
  • On old kernels that don't support sample_id_all feature,
    perf_evlist__id2evsel() returns NULL for non-sampling events.

    This breaks perf top when multiple events are given on command line. Fix
    it by using first evsel in the evlist. This will also prevent getting
    the same (potential) problem in such new tool/ old kernel combo.

    Suggested-by: Arnaldo Carvalho de Melo
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1329702447-25045-1-git-send-email-namhyung.kim@lge.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

28 Feb, 2012

2 commits

  • …/scm/linux/kernel/git/rostedt/linux-ktest

    While demoing ktest at ELC in 2012, it was embarrassing that the
    make_min_config test failed to work because the snowball board I was
    testing it against had a config that would not build. But the
    make_min_config only tested the testing part and ignored build failures.
    The end result was a config file that would not boot.

    This time, for real.

    * tag 'ktest-fix-make-min-failed-build-for-real' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
    ktest: Fix make_min_config test when build fails

    Linus Torvalds
     
  • The make_min_config does not take into account when the build fails,
    resulting in a invalid MIN_CONFIG .config file. When the build fails,
    it is ignored and the boot test is executed, using the previous built
    kernel. The configs that should be tested are not tested and they may
    be added or removed depending on the result of the last kernel that
    succeeded to be built.

    If the build fails, mark the current config as a failure and the
    configs that were disabled may still be needed.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

07 Feb, 2012

3 commits

  • This patch fixes an issue where perf report shows nan% for certain
    perf.data files. The below is from a report for a do_fork probe:

    -nan% sshd [kernel.kallsyms] [k] do_fork
    -nan% packagekitd [kernel.kallsyms] [k] do_fork
    -nan% dbus-daemon [kernel.kallsyms] [k] do_fork
    -nan% bash [kernel.kallsyms] [k] do_fork

    A git bisect shows commit f3bda2c as the cause. However, looking back
    through the git history, I saw commit 640c03c which seems to have
    removed the required initialization for perf_sample->period. The problem
    only started showing after commit f3bda2c. The below patch re-introduces
    the initialization and it fixes the problem for me.

    With the below patch, for the same perf.data:

    73.08% bash [kernel.kallsyms] [k] do_fork
    8.97% 11-dhclient [kernel.kallsyms] [k] do_fork
    6.41% sshd [kernel.kallsyms] [k] do_fork
    3.85% 20-chrony [kernel.kallsyms] [k] do_fork
    2.56% sendmail [kernel.kallsyms] [k] do_fork

    This patch applies over current linux-tip commit 9949284.

    Problem introduced in:

    $ git describe 640c03c
    v2.6.37-rc3-83-g640c03c

    Cc: Ananth N Mavinakayanahalli
    Cc: Ingo Molnar
    Cc: Robert Richter
    Cc: Srikar Dronamraju
    Cc: stable@kernel.org
    Link: http://lkml.kernel.org/r/20120203170113.5190.25558.stgit@localhost6.localdomain6
    Signed-off-by: Naveen N. Rao
    Signed-off-by: Arnaldo Carvalho de Melo

    Naveen N. Rao
     
  • In some perf ancient versions we used '[kernel.kallsyms._text]' as the
    name for the kernel map.

    This got changed with commit:
    perf: 'perf kvm' tool for monitoring guest performance from host
    commit a1645ce12adb6c9cc9e19d7695466204e3f017fe
    Author: Zhang, Yanmin

    and we started to use following name '[kernel.kallsyms]_text'.

    This name change is important for the report code dealing with ancient
    perf data. When processing the kernel map event, we need to recognize
    the old naming (dont match the last ']') and initialize the kernel map
    correctly.

    The subsequent call to maps__set_kallsyms_ref_reloc_sym deals with the
    superfluous ']' to get correct symbol name.

    Cc: Corey Ashford
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1328461865-6127-1-git-send-email-jolsa@redhat.com
    Signed-off-by: Jiri Olsa
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • By adding following objects:
    bench/mem-memcpy-x86-64-asm.o
    the x86_64 perf binary ended up with executable stack.

    The reason was that above object are assembler sourced and is missing the
    GNU-stack note section. In such case the linker assumes that the final binary
    should not be restricted at all and mark the stack as RWX.

    Adding section ".note.GNU-stack" definition to mentioned object, with all
    flags disabled, thus omiting this object from linker stack flags decision.

    Problem introduced in:

    $ git describe ea7872b
    v2.6.37-rc2-19-gea7872b

    Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=783570
    Reported-by: Clark Williams
    Acked-by: Eric Dumazet
    Cc: Corey Ashford
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: stable@kernel.org
    Link: http://lkml.kernel.org/r/1328100848-5630-1-git-send-email-jolsa@redhat.com
    Signed-off-by: Jiri Olsa
    [ committer note: Backported fix to perf/urgent (3.3-rc2+) ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

31 Jan, 2012

3 commits

  • In recent versions of perf top, pressing the 'e' key to change the
    number of displayed samples had no effect.

    The number of samples was still dictated by the size of the terminal
    (stdio mode). That was quite annoying because typically only the first
    dozen samples really matter.

    This patch fixes this.

    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20120130105037.GA5160@quad
    Signed-off-by: Stephane Eranian
    Signed-off-by: Arnaldo Carvalho de Melo

    Stephane Eranian
     
  • The event_type record has a max length for the event name.

    It's called MAX_EVENT_NAME.

    The name may be truncated to fit the max length. But the header.size still
    reflects the original name length. If that length is > MAX_EVENT_NAME, then the
    header.size field is bogus. Fix this by using the length of the name after the
    potential truncation.

    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20120120094912.GA4882@quad
    Signed-off-by: Stephane Eranian
    Signed-off-by: Arnaldo Carvalho de Melo

    Stephane Eranian
     
  • When building on my Debian/mips system, util/util.c fails to build
    because commit 1aed2671738785e8f5aea663a6fda91aa7ef59b5 (perf kvm: Do
    guest-only counting by default) indirectly includes stdio.h before the
    feature selection in util.h is done. This prevents _GNU_SOURCE in
    util.h from enabling the declaration of getline(), from now second
    inclusion of stdio.h, and the build is broken.

    There is another breakage in util/evsel.c caused by include ordering,
    but I didn't fully track down the commit that caused it.

    The root cause of all this is an inconsistent definition of _GNU_SOURCE,
    so I move the definition into the Makefile so that it is passed to all
    invocations of the compiler and used uniformly for all system header
    files. All other #define and #undef of _GNU_SOURCE are removed as they
    cause conflicts with the definition passed to the compiler.

    All the features.h definitions (_LARGEFILE64_SOURCE _FILE_OFFSET_BITS=64
    and _GNU_SOURCE) are needed by the python glue code too, so they are
    moved to BASIC_CFLAGS, and the misleading comments about BASIC_CFLAGS
    are removed.

    This gives me a clean build on x86_64 (fc12) and mips (Debian).

    Cc: David Daney
    Cc: Ingo Molnar
    Cc: Joerg Roedel
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1326836461-11952-1-git-send-email-ddaney.cavm@gmail.com
    Signed-off-by: David Daney
    Signed-off-by: Arnaldo Carvalho de Melo

    David Daney
     

19 Jan, 2012

1 commit

  • This includes initial support for the recently published ACPI 5.0 spec.
    In particular, support for the "hardware-reduced" bit that eliminates
    the dependency on legacy hardware.

    APEI has patches resulting from testing on real hardware.

    Plus other random fixes.

    * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (52 commits)
    acpi/apei/einj: Add extensions to EINJ from rev 5.0 of acpi spec
    intel_idle: Split up and provide per CPU initialization func
    ACPI processor: Remove unneeded variable passed by acpi_processor_hotadd_init V2
    ACPI processor: Remove unneeded cpuidle_unregister_driver call
    intel idle: Make idle driver more robust
    intel_idle: Fix a cast to pointer from integer of different size warning in intel_idle
    ACPI: kernel-parameters.txt : Add intel_idle.max_cstate
    intel_idle: remove redundant local_irq_disable() call
    ACPI processor: Fix error path, also remove sysdev link
    ACPI: processor: fix acpi_get_cpuid for UP processor
    intel_idle: fix API misuse
    ACPI APEI: Convert atomicio routines
    ACPI: Export interfaces for ioremapping/iounmapping ACPI registers
    ACPI: Fix possible alignment issues with GAS 'address' references
    ACPI, ia64: Use SRAT table rev to use 8bit or 16/32bit PXM fields (ia64)
    ACPI, x86: Use SRAT table rev to use 8bit or 32bit PXM fields (x86/x86-64)
    ACPI: Store SRAT table revision
    ACPI, APEI, Resolve false conflict between ACPI NVS and APEI
    ACPI, Record ACPI NVS regions
    ACPI, APEI, EINJ, Refine the fix of resource conflict
    ...

    Linus Torvalds
     

18 Jan, 2012

1 commit


17 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
    ktest: Add INGORE_ERRORS to ignore warnings in boot up
    ktest: Still do reboot even for REBOOT_TYPE = script
    ktest: Fix compare script to test if options are not documented
    ktest: Detect typos in option names
    ktest: Have all values be set by defaults
    ktest: Change initialization of defaults hash to perl format
    ktest: Add options SWITCH_TO_GOOD and SWITCH_TO_TEST
    ktest: Allow overriding bisect test results
    ktest: Evaluate options before processing them
    ktest: Evaluate $KERNEL_VERSION in both install and post install
    ktest: Only ask options needed for install
    ktest: When creating a new config, ask for BUILD_OPTIONS
    ktest: Do not ask for some options if the only test is build
    ktest: Ask for type of test when creating a new config
    ktest: Allow bisect test to restart where it left off
    ktest: When creating new config, allow the use of ${THIS_DIR}
    ktest: Add default for ssh-user, build-target and target-image
    ktest: Allow success logs to be stored
    ktest: Save test output

    Linus Torvalds
     

16 Jan, 2012

1 commit

  • * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (39 commits)
    perf tools: Fix compile error on x86_64 Ubuntu
    perf report: Fix --stdio output alignment when --showcpuutilization used
    perf annotate: Get rid of field_sep check
    perf annotate: Fix usage string
    perf kmem: Fix a memory leak
    perf kmem: Add missing closedir() calls
    perf top: Add error message for EMFILE
    perf test: Change type of '-v' option to INCR
    perf script: Add missing closedir() calls
    tracing: Fix compile error when static ftrace is enabled
    recordmcount: Fix handling of elf64 big-endian objects.
    perf tools: Add const.h to MANIFEST to make perf-tar-src-pkg work again
    perf tools: Add support for guest/host-only profiling
    perf kvm: Do guest-only counting by default
    perf top: Don't update total_period on process_sample
    perf hists: Stop using 'self' for struct hist_entry
    perf hists: Rename total_session to total_period
    x86: Add counter when debug stack is used with interrupts enabled
    x86: Allow NMIs to hit breakpoints in i386
    x86: Keep current stack in NMI breakpoints
    ...

    Linus Torvalds
     

15 Jan, 2012

1 commit

  • * 'for-3.3' of git://linux-nfs.org/~bfields/linux: (31 commits)
    nfsd4: nfsd4_create_clid_dir return value is unused
    NFSD: Change name of extended attribute containing junction
    svcrpc: don't revert to SVC_POOL_DEFAULT on nfsd shutdown
    svcrpc: fix double-free on shutdown of nfsd after changing pool mode
    nfsd4: be forgiving in the absence of the recovery directory
    nfsd4: fix spurious 4.1 post-reboot failures
    NFSD: forget_delegations should use list_for_each_entry_safe
    NFSD: Only reinitilize the recall_lru list under the recall lock
    nfsd4: initialize special stateid's at compile time
    NFSd: use network-namespace-aware cache registering routines
    SUNRPC: create svc_xprt in proper network namespace
    svcrpc: update outdated BKL comment
    nfsd41: allow non-reclaim open-by-fh's in 4.1
    svcrpc: avoid memory-corruption on pool shutdown
    svcrpc: destroy server sockets all at once
    svcrpc: make svc_delete_xprt static
    nfsd: Fix oops when parsing a 0 length export
    nfsd4: Use kmemdup rather than duplicating its implementation
    nfsd4: add a separate (lockowner, inode) lookup
    nfsd4: fix CONFIG_NFSD_FAULT_INJECTION compile error
    ...

    Linus Torvalds
     

13 Jan, 2012

3 commits

  • Andrew explains:

    - various misc stuff

    - Most of the rest of MM: memcg, threaded hugepages, others.

    - cpumask

    - kexec

    - kdump

    - some direct-io performance tweaking

    - radix-tree optimisations

    - new selftests code

    A note on this: often people will develop a new userspace-visible
    feature and will develop userspace code to exercise/test that
    feature. Then they merge the patch and the selftest code dies.
    Sometimes we paste it into the changelog. Sometimes the code gets
    thrown into Documentation/(!).

    This saddens me. So this patch creates a bare-bones framework which
    will henceforth allow me to ask people to include their test apps in
    the kernel tree so we can keep them alive. Then when people enhance
    or fix the feature, I can ask them to update the test app too.

    The infrastruture is terribly trivial at present - let's see how it
    evolves.

    - checkpoint/restart feature work.

    A note on this: this is a project by various mad Russians to perform
    c/r mainly from userspace, with various oddball helper code added
    into the kernel where the need is demonstrated.

    So rather than some large central lump of code, what we have is
    little bits and pieces popping up in various places which either
    expose something new or which permit something which is normally
    kernel-private to be modified.

    The overall project is an ongoing thing. I've judged that the size
    and scope of the thing means that we're more likely to be successful
    with it if we integrate the support into mainline piecemeal rather
    than allowing it all to develop out-of-tree.

    However I'm less confident than the developers that it will all
    eventually work! So what I'm asking them to do is to wrap each piece
    of new code inside CONFIG_CHECKPOINT_RESTORE. So if it all
    eventually comes to tears and the project as a whole fails, it should
    be a simple matter to go through and delete all trace of it.

    This lot pretty much wraps up the -rc1 merge for me.

    * akpm: (96 commits)
    unlzo: fix input buffer free
    ramoops: update parameters only after successful init
    ramoops: fix use of rounddown_pow_of_two()
    c/r: prctl: add PR_SET_MM codes to set up mm_struct entries
    c/r: procfs: add start_data, end_data, start_brk members to /proc/$pid/stat v4
    c/r: introduce CHECKPOINT_RESTORE symbol
    selftests: new x86 breakpoints selftest
    selftests: new very basic kernel selftests directory
    radix_tree: take radix_tree_path off stack
    radix_tree: remove radix_tree_indirect_to_ptr()
    dio: optimize cache misses in the submission path
    vfs: cache request_queue in struct block_device
    fs/direct-io.c: calculate fs_count correctly in get_more_blocks()
    drivers/parport/parport_pc.c: fix warnings
    panic: don't print redundant backtraces on oops
    sysctl: add the kernel.ns_last_pid control
    kdump: add udev events for memory online/offline
    include/linux/crash_dump.h needs elf.h
    kdump: fix crash_kexec()/smp_send_stop() race in panic()
    kdump: crashk_res init check for /sys/kernel/kexec_crash_size
    ...

    Linus Torvalds
     
  • Bring a first selftest in the relevant directory. This tests several
    combinations of breakpoints and watchpoints in x86, as well as icebp traps
    and int3 traps. Given the amount of breakpoint regressions we raised
    after we merged the generic breakpoint infrastructure, such selftest
    became necessary and can still serve today as a basis for new patches that
    touch the do_debug() path.

    Signed-off-by: Frederic Weisbecker
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: H. Peter Anvin
    Cc: Jason Wessel
    Cc: Will Deacon
    Cc: Michal Marek
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Frederic Weisbecker
     
  • Bring a new kernel selftests directory in tools/testing/selftests. To
    add a new selftest, create a subdirectory with the sources and a
    makefile that creates a target named "run_test" then add the
    subdirectory name to the TARGET var in tools/testing/selftests/Makefile
    and tools/testing/selftests/run_tests script.

    This can help centralizing and maintaining any useful selftest that
    developers usually tend to let rust in peace on some random server.

    Suggested-by: Andrew Morton
    Signed-off-by: Frederic Weisbecker
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Jason Wessel
    Cc: Will Deacon
    Cc: Steven Rostedt
    Cc: Michal Marek
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Frederic Weisbecker
     

12 Jan, 2012

3 commits

  • This is a better location instead of having it in Documentation.

    Signed-off-by: Davidlohr Bueso
    Signed-off-by: Rusty Russell (fixed compile)

    Davidlohr Bueso
     
  • Remove wrapper functions. This makes the allocation type explicit in
    all callers; I used GPF_KERNEL where it seemed obvious, left it at
    GFP_ATOMIC otherwise.

    Signed-off-by: Rusty Russell
    Reviewed-by: Christoph Hellwig

    Rusty Russell
     
  • We were cheating with our barriers; using the smp ones rather than the
    real device ones. That was fine, until rpmsg came along, which is
    used to talk to a real device (a non-SMP CPU).

    Unfortunately, just putting back the real barriers (reverting
    d57ed95d) causes a performance regression on virtio-pci. In
    particular, Amos reports netbench's TCP_RR over virtio_net CPU
    utilization increased up to 35% while throughput went down by up to
    14%.

    By comparison, this branch is in the noise.

    Reference: https://lkml.org/lkml/2011/12/11/22

    Signed-off-by: Rusty Russell

    Rusty Russell
     

11 Jan, 2012

1 commit


09 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (53 commits)
    Kconfig: acpi: Fix typo in comment.
    misc latin1 to utf8 conversions
    devres: Fix a typo in devm_kfree comment
    btrfs: free-space-cache.c: remove extra semicolon.
    fat: Spelling s/obsolate/obsolete/g
    SCSI, pmcraid: Fix spelling error in a pmcraid_err() call
    tools/power turbostat: update fields in manpage
    mac80211: drop spelling fix
    types.h: fix comment spelling for 'architectures'
    typo fixes: aera -> area, exntension -> extension
    devices.txt: Fix typo of 'VMware'.
    sis900: Fix enum typo 'sis900_rx_bufer_status'
    decompress_bunzip2: remove invalid vi modeline
    treewide: Fix comment and string typo 'bufer'
    hyper-v: Update MAINTAINERS
    treewide: Fix typos in various parts of the kernel, and fix some comments.
    clockevents: drop unknown Kconfig symbol GENERIC_CLOCKEVENTS_MIGR
    gpio: Kconfig: drop unknown symbol 'CS5535_GPIO'
    leds: Kconfig: Fix typo 'D2NET_V2'
    sound: Kconfig: drop unknown symbol ARCH_CLPS7500
    ...

    Fix up trivial conflicts in arch/powerpc/platforms/40x/Kconfig (some new
    kconfig additions, close to removed commented-out old ones)

    Linus Torvalds
     

08 Jan, 2012

6 commits

  • The ctype.h include is not needed here and it breaks build on some systems (at
    least 64bit Ubuntu 10.04) like below. Just get rid of it.

    CC util/trace-event-info.o
    cc1: warnings being treated as errors
    util/trace-event-info.c: In function ‘record_file’:
    util/trace-event-info.c:192: error: implicit declaration of function ‘pwrite’
    util/trace-event-info.c:192: error: nested extern declaration of ‘pwrite’
    make: *** [util/trace-event-info.o] Error 1

    Cc: Ingo Molnar
    Cc: Joerg Roedel
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1326035430-7621-1-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Current perf report output is broken if --showcpuutilization is used.
    Combination with -n and/or --show-total-period make things worse.
    This patch fixes it as follows:

    before:
    48.25% 48.25% 0.00% sleep [kernel.kallsyms] [k] trace_hardirqs_off
    34.99% 34.99% 0.00% sleep [kernel.kallsyms] [k] __find_get_block_slow
    15.99% 15.99% 0.00% sleep [kernel.kallsyms] [k] lock_release_holdtime
    0.77% 0.77% 0.00% sleep [kernel.kallsyms] [k] native_write_msr_safe

    after:
    48.25% 48.25% 0.00% sleep [kernel.kallsyms] [k] trace_hardirqs_off
    34.99% 34.99% 0.00% sleep [kernel.kallsyms] [k] __find_get_block_slow
    15.99% 15.99% 0.00% sleep [kernel.kallsyms] [k] lock_release_holdtime
    0.77% 0.77% 0.00% sleep [kernel.kallsyms] [k] native_write_msr_safe

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1325957132-10600-8-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • The 'field_sep' variable is not set anywhere. Just remove the
    conditional.

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1325957132-10600-7-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • The annotate command doesn't take non-option arguments.

    In fact, it can take last argument as a symbol filter though, but that's
    a special case and, IMHO, it should be discouraged in favor of the -s
    option.

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1325957132-10600-6-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • The 'str' should be freed when sort_dimension__add() failed too.

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1325957132-10600-5-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • The setup_cpunode_map() calls opendir() but misses corresponding
    closedir(). Add them.

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1325957132-10600-4-git-send-email-namhyung@gmail.com
    Signed-off-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim