This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] RE: [PATCH] Xenoprof passive domain support

To: "Santos, Jose Renato G" <joserenato.santos@xxxxxx>
Subject: [Xen-devel] RE: [PATCH] Xenoprof passive domain support
From: "Yang, Xiaowei" <xiaowei.yang@xxxxxxxxx>
Date: Sat, 29 Apr 2006 12:52:19 +0800
Cc: Yoshio Turner <yoshiotu@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, G John Janakiraman <john@xxxxxxxxxxxxxxxxxxx>, John Levon <levon@xxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 28 Apr 2006 21:52:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcZqmZRc5gf3TmvrQzOeq5R5ZWQN8QAdZT7AAApoyYA=
Thread-topic: [PATCH] Xenoprof passive domain support
>First, I think there is a concurrency problem that needs to
>fixed. If dom0 has more than one VCPU, then 2 VCPUs can
>access the same passive buffer at the same time. This
>should not be allowed, since the buffer is not
>protected by any lock. We should make sure that any
>passive domain buffer is accessed by one and only one
>dom0 VCPU. A simple approach would be to have only
>VCPU 0 (in dom0) to handle all the passive domain
>samples. However, this may cause an
>imbalance on the speed that oprofile CPU buffers are filled.
>Probably the cpu buffer for VCPU 0 would fill much
>earlier and cause more frequent flushes to the event buffer,
>increasing the overhead.
>I would prefer if we could distribute the passive
>buffers to all VCPUs in dom0. I will think more about
>this during the weekend and make additional comments,
>earlier next week.
Thanks for pointing this out. This is really a concurrency issue!
We can use a mutex and trylock mechanism. If one LP of dom0 is handling
passive domain buffer, the other can just ignore doing it. Since
different LP may acquires the lock every time, it satisfies your

>Second, I see that you reused most of the code that
>was used in Xen 2.0, when passive domains was supported
>for non SMP guests.
>John Levon (cc'ed on this message) has made some comments
>on that code which I think we should address right now.
>More specifically, he suggested that we change the way
>domain switches are represented in the CPU buffer.
>Please look at his comment below.
Yes, currently the way to handle passive samples is not efficient. I'm
taking the advice into account and doing changes.


Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>