LKML Archive on lore.kernel.org
 help / color / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Andi Kleen <ak@linux.intel.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 2/4] perf record: bind the AIO user space buffers to nodes
Date: Tue, 5 Feb 2019 12:15:26 -0300
Message-ID: <20190205151526.GC10613@kernel.org> (raw)
In-Reply-To: <62d94ac3-45ac-c4e4-0f9e-1084c4a25b83@linux.intel.com>

Em Mon, Feb 04, 2019 at 10:47:03PM +0300, Alexey Budankov escreveu:
> 
> On 04.02.2019 22:29, Arnaldo Carvalho de Melo wrote:
> > Em Tue, Jan 22, 2019 at 08:48:54PM +0300, Alexey Budankov escreveu:
> >>
> >> Allocate and bind AIO user space buffers to the memory nodes
> >> that mmap kernel buffers are bound to.
> > 
> > [root@quaco amazonlinux]# perf test -v python
> > 18: 'import perf' in python                               :
> > --- start ---
> > test child forked, pid 526
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in <module>
> > ImportError: /tmp/build/perf/python/perf.so: undefined symbol: mbind
> 
> Argh. Missed that.
> 
> > test child finished with -1
> > ---- end ----
> > 'import perf' in python: FAILED!
> > [root@quaco amazonlinux]#
> > 
> > 
> > Please always use 'perf test' before pushing upstream, I'll try to fix
> > this one, either by linking libnuma into the python binding or by moving
> > the routines using it to a separate file.
> 
> Will do. Thanks for followup.

this seems to do the trick:

diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py
index d3ffc18424b5..88ffa995b44b 100644
--- a/tools/perf/util/setup.py
+++ b/tools/perf/util/setup.py
@@ -56,6 +56,7 @@ ext_sources = list(map(lambda x: '%s/%s' % (src_perf, x) , ext_sources))
 perf = Extension('perf',
 		  sources = ext_sources,
 		  include_dirs = ['util/include'],
+		  libraries = ['numa'],
 		  extra_compile_args = cflags,
 		  extra_objects = [libtraceevent, libapikfs],
                  )

------------------------------------------------

[root@quaco ~]# ldd /tmp/build/perf/python/perf.cpython-37m-x86_64-linux-gnu.so
	linux-vdso.so.1 (0x00007ffdf53c3000)
	libunwind-x86_64.so.8 => /lib64/libunwind-x86_64.so.8 (0x00007fa538b82000)
	libunwind.so.8 => /lib64/libunwind.so.8 (0x00007fa538b66000)
	liblzma.so.5 => /lib64/liblzma.so.5 (0x00007fa538b3d000)
	libnuma.so.1 => /lib64/libnuma.so.1 (0x00007fa538b2f000)
	libpython3.7m.so.1.0 => /lib64/libpython3.7m.so.1.0 (0x00007fa5387b7000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa538795000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fa5385cd000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fa5385b2000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fa538c1a000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fa5385ac000)
	libutil.so.1 => /lib64/libutil.so.1 (0x00007fa5385a7000)
	libm.so.6 => /lib64/libm.so.6 (0x00007fa538423000)
[root@quaco ~]#

[root@quaco ~]# perf test python
18: 'import perf' in python                               : Ok
[root@quaco ~]#


So I'm ammending that hunk to the patch that introduces that mbind
usage.

Thanks,

- Arnaldo

  reply index

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22 17:45 [PATCH v5 0/4] Reduce NUMA related overhead in perf record profiling on large server systems Alexey Budankov
2019-01-22 17:47 ` [PATCH v5 1/4] perf record: allocate affinity masks Alexey Budankov
2019-02-09 12:45   ` [tip:perf/core] perf record: Allocate " tip-bot for Alexey Budankov
2019-01-22 17:48 ` [PATCH v5 2/4] perf record: bind the AIO user space buffers to nodes Alexey Budankov
2019-02-04 19:29   ` Arnaldo Carvalho de Melo
2019-02-04 19:47     ` Alexey Budankov
2019-02-05 15:15       ` Arnaldo Carvalho de Melo [this message]
2019-02-05 15:34         ` Alexey Budankov
2019-02-09 12:46         ` [tip:perf/core] perf record: Bind " tip-bot for Alexey Budankov
2019-01-22 17:50 ` [PATCH v5 3/4] perf record: apply affinity masks when reading mmap buffers Alexey Budankov
2019-02-09 12:47   ` [tip:perf/core] perf record: Apply " tip-bot for Alexey Budankov
2019-01-22 17:52 ` [PATCH v5 4/4] perf record: implement --affinity=node|cpu option Alexey Budankov
2019-02-15  9:25   ` [tip:perf/core] perf record: Implement " tip-bot for Alexey Budankov
2019-01-28  7:13 ` [PATCH v5 0/4] Reduce NUMA related overhead in perf record profiling on large server systems Alexey Budankov
2019-01-28  8:20   ` Jiri Olsa
2019-01-28  8:39     ` Alexey Budankov
2019-01-28 11:27 ` Jiri Olsa
2019-01-31  9:52   ` Alexey Budankov
2019-02-01 16:31   ` Arnaldo Carvalho de Melo
2019-01-29  9:14 ` Arnaldo Carvalho de Melo
2019-01-29 10:22   ` Alexey Budankov

Reply instructions:

You may reply publically 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=20190205151526.GC10613@kernel.org \
    --to=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=alexey.budankov@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git