|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] RE: [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.
>
Renato,
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
requirement:)
>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.
Thanks,
Xiaowei
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|