From: Andi Kleen <andi@firstfloor.org>
To: Petr Holasek <pholasek@redhat.com>
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: Fri, 12 Jun 2015 17:30:01 +0200 [thread overview]
Message-ID: <20150612153001.GW19417@two.firstfloor.org> (raw)
In-Reply-To: <1434122172-26560-1-git-send-email-pholasek@redhat.com>
> @@ -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.
-Andi
next prev parent reply other threads:[~2015-06-12 15:30 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 [this message]
2015-06-16 14:40 ` Petr Holasek
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=20150612153001.GW19417@two.firstfloor.org \
--to=andi@firstfloor.org \
--cc=cpw@sgi.com \
--cc=filbranden@google.com \
--cc=linux-numa@vger.kernel.org \
--cc=pholasek@redhat.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).