linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: zhangzhiqiang <zhangzhiqiang.zhang@huawei.com>
To: <gregkh@linuxfoundation.org>, <lizefan@huawei.com>,
	<wangnan0@huawei.com>, <stable@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: [request for stable inclusion] perf kmem: Make it work again on non NUMA machines
Date: Fri, 26 Sep 2014 15:04:20 +0800	[thread overview]
Message-ID: <54250FF4.1030400@huawei.com> (raw)

hi all,

Now on non NUMA machines with 3.10 stable,perf kmem command does not work well. For instance,
when exec perf kmem record sleep 2, we can get the perf.data file correctly. but when we exec
perf kmem stat there is nothing return.
In upstream the bug has been fixed and perf kmem work well on non NUMA machines.

Can we cherry-pick it to stable repo.

The commit id is 4921e320244e099bdf237fd10428594ce5f5b87d,the detail as follows:

commit 4921e320244e099bdf237fd10428594ce5f5b87d
Author: Jiri Olsa <jolsa@redhat.com>
Date:   Thu Sep 12 18:39:36 2013 +0200

    perf kmem: Make it work again on non NUMA machines

    The commit '2814eb0 perf kmem: Remove die() calls' disabled 'perf kmem'
    command for machines without numa support. It made the command fail if
    '/sys/devices/system/node' dir wasn't found.

    Skipping the numa based initialization in case the directory is not
    found and continue execution.

    Signed-off-by: Jiri Olsa <jolsa@redhat.com>
    Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/1379003976-5839-5-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index c2dff9c..9b5f077 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -101,7 +101,7 @@ static int setup_cpunode_map(void)

        dir1 = opendir(PATH_SYS_NODE);
        if (!dir1)
-           return -1;
+         return 0;

        while ((dent1 = readdir(dir1)) != NULL) {
                if (dent1->d_type != DT_DIR ||




                 reply	other threads:[~2014-09-26  7:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54250FF4.1030400@huawei.com \
    --to=zhangzhiqiang.zhang@huawei.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=stable@vger.kernel.org \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).