linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eugene Syromyatnikov <evgsyr@gmail.com>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH 0/2] tracing: Have trace_pid_list be a sparse array
Date: Fri, 24 Sep 2021 16:18:10 +0200	[thread overview]
Message-ID: <CACGkJdspTL=tnDOSvY3ub235rr+6eUBU1uBhHFZbqBkegcRvnw@mail.gmail.com> (raw)
In-Reply-To: <20210924223549.c41a89befe11534dfd56f01c@kernel.org>

On Fri, Sep 24, 2021 at 3:35 PM Masami Hiramatsu <mhiramat@kernel.org> wrote:
>
> On Fri, 24 Sep 2021 09:16:27 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
> > I'm optimizing the top tiers for size, because they are likely to be empty.
> > Why add memory for something that will never be used, and can't be removed.
> > Note, the middle and lower tiers can be reused when they go empty, which is
> > a likely use case (at least when I test this using hackbench).

Makes sense;  I was thinking about worse case scenarios—tracing
thousands+ processes, but those probably not as common and important.

> > I looked into xarray and it appears to be optimized for storing something,
> > where as I'm just interested in a sparse bitmask.
>
> I guess he suggested that store the bitmask in xarray. Anyway, both are
> OK to me. This is needed for reducing the memory.

Yes, the idea was to store pointers to bitset leaves in XArray and
leverage its radix tree implementation, at cost of somewhat lesser
efficiency (since XArray indices are longs and thus it employs more
intermediate levels on 64-bit architectures).

-- 
Eugene Syromyatnikov
mailto:evgsyr@gmail.com
xmpp:esyr@jabber.{ru|org}

      reply	other threads:[~2021-09-24 14:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24  3:35 [PATCH 0/2] tracing: Have trace_pid_list be a sparse array Steven Rostedt
2021-09-24  3:35 ` [PATCH 1/2] tracing: Place trace_pid_list logic into abstract functions Steven Rostedt
2021-09-24  3:35 ` [PATCH 2/2] tracing: Create a sparse bitmask for pid filtering Steven Rostedt
2021-09-24  4:07 ` [PATCH 0/2] tracing: Have trace_pid_list be a sparse array Steven Rostedt
2021-09-24 10:51   ` Eugene Syromyatnikov
2021-09-24 13:16     ` Steven Rostedt
2021-09-24 13:35       ` Masami Hiramatsu
2021-09-24 14:18         ` Eugene Syromyatnikov [this message]

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='CACGkJdspTL=tnDOSvY3ub235rr+6eUBU1uBhHFZbqBkegcRvnw@mail.gmail.com' \
    --to=evgsyr@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.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).