[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACGkJdspTL=tnDOSvY3ub235rr+6eUBU1uBhHFZbqBkegcRvnw@mail.gmail.com>
Date: Fri, 24 Sep 2021 16:18:10 +0200
From: Eugene Syromyatnikov <evgsyr@...il.com>
To: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Steven Rostedt <rostedt@...dmis.org>,
lkml <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
linux-trace-devel@...r.kernel.org
Subject: Re: [PATCH 0/2] tracing: Have trace_pid_list be a sparse array
On Fri, Sep 24, 2021 at 3:35 PM Masami Hiramatsu <mhiramat@...nel.org> wrote:
>
> On Fri, 24 Sep 2021 09:16:27 -0400
> Steven Rostedt <rostedt@...dmis.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@...il.com
xmpp:esyr@...ber.{ru|org}
Powered by blists - more mailing lists