All of lore.kernel.org
 help / color / mirror / Atom feed
From: William Cohen <wcohen@redhat.com>
To: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: Re: Proposal for Xen support of performance monitoring anddebug hardware
Date: Fri, 22 Apr 2005 17:48:48 -0400	[thread overview]
Message-ID: <42697140.5060503@redhat.com> (raw)
In-Reply-To: <A95E2296287EAD4EB592B5DEEFCE0E9D1E3D07@liverpoolst.ad.cl.cam.ac.uk>

Ian Pratt wrote:
>>Rik van Riel pointed me at the Santos's patch for oprofile support. 
>>There are some differences between the two approaches. The 
>>Xen oprofile 
>>support by HP pretty much just supports oprofile and was 
>>designed to get 
>>some information about what was going on in the Xen hypervisor. It 
>>doesn't provide access to the other performance monitoring (or 
>>debugging) hardware.
> 
> 
> The extended xen-oprofile is a useful tool for getting a global view of
> what's going on in the whole machine. 
> 
> I think what you're proposing is for enabling a guest to get a better
> idea of what's going on while it is running, which is also useful.
> 
> You can't really mix the two modes of operation on the same system, at
> least not in the general case.

Right, mixing the different modes at the same time is not going to work, 
but it would be nice to make the mechanism flexible enough so that the 
same mechanism can be both for local and system-wide profiling.

>>>I can certainly see some merit in having fine grained access control
>>>over MSRs, though for the case of perf counter registers I wander
>>>whether we'd be better off with some higher-level interface?
>>
>>I was aiming for minimal support low-level, trying to follow the 
>>existing Xen approach of not coding too much knowledge about 
>>the system 
>>in Xen. Make the MSR registers visible and make sure that a guest OS 
>>cannot clobber other guest OSs. The guests OS decide how to use the 
>>performance monitoring hw.  The hypervisor needs a list of which 
>>registers are in which class, but the hypervisor doesn't need to know 
>>the details of what the registers do.
> 
> 
> It seems sensible to incorporate a simple mechanism for enabling
> fine-grained access control to msr's, and also code to save/restore msr
> values that have been changed when context switching between guests. 
> 
> One issue for guests that are using this mechanism is that I don't
> believe it's possible to selectively count events in ring 1 vs ring 0.
> Hence it will also count events in Xen during hypercalls and interrupt
> handling. In some cases this will be what's wanted, in others, not. I
> guess we could slectively save/restore counter values when
> entering/leaving Xen, but that's slow and ugly.

Yes, the selectivity is ring != 0 or ring ==0. There isn't the finer 
grain to separate the guest OS from the normal user space.

A place that things might get odd if the domain-0 handles things on the 
behalf of guest domain. The sampling in local mode would not cross 
domains. Thus, a user guest domain might not know that it is having a 
lot of overhead in domain-0. However, in these cases people are probably 
better off doing system-wide sampling.

-Will

  reply	other threads:[~2005-04-22 21:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-22 21:27 Proposal for Xen support of performance monitoring anddebug hardware Ian Pratt
2005-04-22 21:48 ` William Cohen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-04-22 19:29 Ian Pratt
2005-04-22 21:02 ` William Cohen

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=42697140.5060503@redhat.com \
    --to=wcohen@redhat.com \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.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.