From: Steven Rostedt <rostedt@goodmis.org>
To: changbin.du@intel.com
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] tracing: Allocate mask_str buffer dynamically
Date: Thu, 26 Oct 2017 07:15:51 -0400 [thread overview]
Message-ID: <20171026071551.07b1228a@vmware.local.home> (raw)
In-Reply-To: <1508948428-4969-1-git-send-email-changbin.du@intel.com>
On Thu, 26 Oct 2017 00:20:28 +0800
changbin.du@intel.com wrote:
> From: Changbin Du <changbin.du@intel.com>
>
> The default NR_CPUS can be very large, but actual possible nr_cpu_ids
> usually is very small. For my x86 distribution, the NR_CPUS is 8192 and
> nr_cpu_ids is 4. About 2 pages are wasted.
>
> Most machines don't have so many CPUs, so define a array with NR_CPUS
> just wastes memory. So let's allocate the buffer dynamically when need.
>
> The exact buffer size should be:
> DIV_ROUND_UP(nr_cpu_ids, 4) + nr_cpu_ids/32 + 2;
>
> Example output:
> ff,ffffffff
>
> Signed-off-by: Changbin Du <changbin.du@intel.com>
>
Thanks for sending this. I'm currently traveling for conferences, and
may miss looking at this when I get back. Please send me a friendly
ping reply to this email next week, if you don't hear from me sooner.
-- Steve
next prev parent reply other threads:[~2017-10-26 11:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-25 16:20 changbin.du
2017-10-26 11:15 ` Steven Rostedt [this message]
2017-10-31 16:19 ` Steven Rostedt
2017-11-01 2:56 ` Du, Changbin
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=20171026071551.07b1228a@vmware.local.home \
--to=rostedt@goodmis.org \
--cc=changbin.du@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@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
Powered by JetHome