From: Petr Holasek <pholasek@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: linux-numa@vger.kernel.org,
Filipe Brandenburger <filbranden@google.com>,
Cliff Wickman <cpw@sgi.com>
Subject: Re: [PATCH] libnuma: disable caching of node cpusmasks
Date: Tue, 16 Jun 2015 16:40:53 +0200 [thread overview]
Message-ID: <20150616144053.GH3650@localhost.localdomain> (raw)
In-Reply-To: <20150612153001.GW19417@two.firstfloor.org>
On Fri, 12 Jun 2015, Andi Kleen <andi@firstfloor.org> wrote:
> > @@ -1329,25 +1321,12 @@ numa_node_to_cpus_v2(int node, struct bitmask *buffer)
> > size_t len = 0;
> > struct bitmask *mask;
> >
> > - if (!node_cpu_mask_v2)
> > - init_node_cpu_mask_v2();
> > -
> > if (node > nnodes) {
> > errno = ERANGE;
> > return -1;
> > }
> > numa_bitmask_clearall(buffer);
> >
> > - if (node_cpu_mask_v2[node]) {
>
> I was playing around with info (http://fbinfer.com/) earlier, and ran it over
> numactl, and it complained about exactly this line: it can reference NULL
> when the memory allocation above fails. So it's good to remove it.
>
> Would be good to see how much performance difference it makes though.
> Do you have any data? If it's significant may need to do a time out
> or similar.
>
I did simple comparison for 1 million of numa_node_to_cpus() calls
and disabled caching extended time three times (from 10 seconds to 30).
--
Petr Holasek
pholasek@redhat.com
next prev parent reply other threads:[~2015-06-16 14:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 15:16 [PATCH] libnuma: disable caching of node cpusmasks Petr Holasek
2015-06-12 15:30 ` Andi Kleen
2015-06-16 14:40 ` Petr Holasek [this message]
2015-06-16 14:48 ` Andi Kleen
2015-06-18 13:48 ` [PATCH] libnuma: don't cache node cpumasks older than 1 second Petr Holasek
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=20150616144053.GH3650@localhost.localdomain \
--to=pholasek@redhat.com \
--cc=andi@firstfloor.org \
--cc=cpw@sgi.com \
--cc=filbranden@google.com \
--cc=linux-numa@vger.kernel.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
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).