linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vineeth Pillai <vineethrp@google.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-trace-devel@vger.kernel.org,
	Joel Fernandes <joel@joelfernandes.org>
Subject: Re: [PATCH] trace-cmd: rework of the pid detection of vcpus
Date: Tue, 12 Jul 2022 10:17:17 -0400	[thread overview]
Message-ID: <CA+HDTgTUDhvywfNvzbFbiOTnAifPSZksu_9RnCeFvWb3Hzd61w@mail.gmail.com> (raw)
In-Reply-To: <20220711151655.5a4f4cc0@gandalf.local.home>

Hi Steven,

On Mon, Jul 11, 2022 at 3:16 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> If you haven't noticed I have patches that are a workaround that fixes this
> issue if the conditions are "right". (I Cc'd you) [1]
I was on vacation and just combing through the mails :-). I shall have a look
at the patch soon..

>
> The work around is to not depend on the number in debugfs/kvm/vcpuX to
> match the CPU of the guest, but instead to match the ordering of the CPUs
> of the guest. It also requires that the guest's CPUs are consecutive and
> non sparse. That is, if you have vcpu0, vcpu1, vcpu8 and vcpu9 on the
> host, then the guest needs to have CPU 0-3 with the mapping of:
>
>  vcpu0 -> CPU 0
>  vcpu1 -> CPU 1
>  vcpu8 -> CPU 2
>  vcpu9 -> CPU 3
>
> and then it works. Of course if this is not true, then it breaks again and
> will require some more communication between the host and the guest.
This makes sense.

I vaguely remember seeing non-increasing patterns in some server machines,
but that's really rare I guess. When the debugfs changes for exposing pid are
widely available, we can have that also as an option.

Thanks for the patches. I shall have a look at the patches soon.

~Vineeth

      reply	other threads:[~2022-07-12 14:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04  1:02 [PATCH] trace-cmd: rework of the pid detection of vcpus Vineeth Pillai
2022-05-20 20:08 ` Steven Rostedt
2022-05-23 13:39   ` Vineeth Pillai
2022-05-23 13:47     ` Steven Rostedt
2022-05-24 15:35       ` Vineeth Pillai
2022-05-24 15:53         ` Steven Rostedt
2022-07-11 19:16 ` Steven Rostedt
2022-07-12 14:17   ` Vineeth Pillai [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=CA+HDTgTUDhvywfNvzbFbiOTnAifPSZksu_9RnCeFvWb3Hzd61w@mail.gmail.com \
    --to=vineethrp@google.com \
    --cc=joel@joelfernandes.org \
    --cc=linux-trace-devel@vger.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).