All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tzvetomir Stoyanov <tz.stoyanov@gmail.com>
To: Joel Fernandes <joel@joelfernandes.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Linux Trace Devel <linux-trace-devel@vger.kernel.org>,
	rostedt@google.com, vineethrp@google.com
Subject: Re: [PATCH] trace-cmd: Try alternate path for message cache
Date: Mon, 4 Apr 2022 08:02:46 +0300	[thread overview]
Message-ID: <CAPpZLN7LXehf7==O6bi2CDfs0HvAexAvQ1qv92MT5DYVgW7iGQ@mail.gmail.com> (raw)
In-Reply-To: <CAPpZLN44k=2j7AsrNz72_74JkXQZvJH2sh61o2-ZRib=b4nyKA@mail.gmail.com>

On Mon, Apr 4, 2022 at 7:41 AM Tzvetomir Stoyanov <tz.stoyanov@gmail.com> wrote:
>
> On Sun, Apr 3, 2022 at 5:56 PM Joel Fernandes <joel@joelfernandes.org> wrote:
> >
> > On Fri, Apr 01, 2022 at 07:06:29PM -0400, Steven Rostedt wrote:
> > > On Fri, 1 Apr 2022 15:50:10 -0400
> > > Joel Fernandes <joel@joelfernandes.org> wrote:
> > >
> > > > export TRACECMD_TEMPDIR="/data"
> > > >
> > > > That’s fair. What about using memfd for this, do you feel that’s
> > > > reasonable? I have not yet measured how big this file gets but if it’s
> > > > small enough that might work too.
> > >
> > > Is this a separate question? That is, do you mean using the above
> > > environment variable *and* then use memfd?
> > >
> > > I believe that the cache is used for passing the compressed data from the
> > > guest to the host. I don't think it will be more than one compressed chunk.
> > >
> > > But Tzvetomir would know better.
> >
> > Hey Steve,
> > No its the same question. Instead of temp file, I was proposing in-memory
> > file using memfd_create(2), that way no hassle as long as the file is not too
> > huge.
> >
>
> Hi  Joel,
> That cache file is used for constructing the trace meta-data on the
> guest, before sending it to the host. Usually it is compressed, but it
> could be uncompressed in some cases (depending on the configuration) -
> and in that case it can grow up to a few megabytes. Using memfd is ok
> in most cases, but I'm wondering in the worst case - these few
> megabytes could be a problem, especially if the guest runs with a
> minimum amount of memory.
>

Can you check that file size on your Android setup with that command,
it will force to not use compression on the guest trace file:
   trace-cmd <host trace options> -A <guest> <guest trace options>
--file-version 7 --compression none

Thanks!

> > Also looks like my patch is incomplete anyway, I need to change
> > tracecmd_msg_handle_cache() as well.
> >
> > I'll try to write up a patch with memfd unless you guys disagree.
> >
> > Thanks,
> >
> > - Joel
> >
>
>
> --
> Tzvetomir (Ceco) Stoyanov
> VMware Open Source Technology Center



-- 
Tzvetomir (Ceco) Stoyanov
VMware Open Source Technology Center

  reply	other threads:[~2022-04-04  5:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-29 19:18 [PATCH] trace-cmd: Try alternate path for message cache Joel Fernandes
2022-04-01 19:37 ` Steven Rostedt
     [not found]   ` <CAEXW_YQxPgaKOMhDy8kVdaT9esvY8ctP1Mfw3RZXwkJkTYhh0w@mail.gmail.com>
2022-04-01 23:06     ` Steven Rostedt
2022-04-03 14:56       ` Joel Fernandes
2022-04-03 15:24         ` Joel Fernandes
2022-04-03 17:35           ` Steven Rostedt
2022-04-04  4:41         ` Tzvetomir Stoyanov
2022-04-04  5:02           ` Tzvetomir Stoyanov [this message]
2022-04-04 13:21             ` Joel Fernandes
2022-04-04 13:48               ` Tzvetomir Stoyanov
2022-04-04 14:11                 ` Joel Fernandes
2022-04-04 14:35                 ` Steven Rostedt
2022-04-04 14:48                   ` Tzvetomir Stoyanov
2022-04-04 15:04                     ` Steven Rostedt
2022-04-04 15:15                       ` Tzvetomir Stoyanov
2022-04-04 15:27                         ` Steven Rostedt
2022-04-04 15:32                           ` Steven Rostedt
2022-04-04 15:40                             ` Joel Fernandes
2022-04-04 15:41                               ` Joel Fernandes
2022-04-04 15:47                                 ` Steven Rostedt
2022-04-04 17:20                                   ` Joel Fernandes

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='CAPpZLN7LXehf7==O6bi2CDfs0HvAexAvQ1qv92MT5DYVgW7iGQ@mail.gmail.com' \
    --to=tz.stoyanov@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=rostedt@google.com \
    --cc=vineethrp@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.