Hi Renato, I''d like to talk with you about Xenoprof. 2 obvious changes in Xenoprof 2.0 is 1) alloc/handle buffer per vcpu 2) remove passive damain machenism I''m not sure why you remove passive domain (for clear implemetation?), but it''s essential for tuning VMX domain. Since buffer allocation is changed, for now I can think of 2 ways to handle passive domain samples: 1) add passive samples in primary domain''s buffer and let it handle it in Xenoprof 1.1 way, or 2) alloc another dedicated buffer for passive domains and let primary domain do extra work to handle it. After that, our enhancement to map passive domain samples to xen/kernel/application can work again. What do you think of it? -Xiaowei _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Santos, Jose Renato G
2006-Feb-09 19:58 UTC
[Xen-devel] RE: Passive domain support in Xenoprof 2.0
Xiaowei, The passive domain support implementation for Xen 2.0 had some race conditions and that was the reason it was removed from the patches for the Xen 3.0 implementation. The buffers that are used to store PC samples do not use any locks since they need to be accessed in NMI context. In the previous implementation, samples of passive domains were stored in dom0''s buffer. This created the possibility of a race condition if dom0 and a passive domain were running on 2 different CPUs and accessing the buffer simultaneously. Adding support for passive domains in Xen 3.0 is on my todo list, but I am not sure how long it will take until I have time for working on it. If you have urgency you may want to work on this yourself. I will be happy to review any patches that you might create. If you decide to work on this you will have to use approach 2. Approach 1 would have the same race condition issues of the previous xenoprof implementation. Basically, we need to use one buffer for each VCPU of domains being profiled (including active and passive domains). Dom0 would then have to read samples from all passive domain buffers (in addition to its own buffers) and copy them to correspondent oprofile CPU buffers (also one per VCPU, matching xen buffers 1 to 1). Then we would need to change oprofile kernel module (in dom0) to also read samples from the passive domain CPU buffers when combining them into the oprofile event buffer. Thanks Renato>> -----Original Message----- >> From: Yang, Xiaowei [mailto:xiaowei.yang@intel.com] >> Sent: Thursday, February 09, 2006 12:46 AM >> To: Santos, Jose Renato G >> Cc: Dong, Eddie; Zhai, Edwin; xen-devel@lists.xensource.com >> Subject: Passive domain support in Xenoprof 2.0 >> >> >> Hi Renato, >> I''d like to talk with you about Xenoprof. 2 obvious changes >> in Xenoprof 2.0 is >> 1) alloc/handle buffer per vcpu >> 2) remove passive damain machenism >> I''m not sure why you remove passive domain (for clear >> implemetation?), but it''s essential for tuning VMX domain. >> Since buffer allocation is changed, for now I can think of 2 >> ways to handle passive domain samples: >> 1) add passive samples in primary domain''s buffer and let it >> handle it in Xenoprof 1.1 way, or >> 2) alloc another dedicated buffer for passive domains and >> let primary domain do extra work to handle it. After that, >> our enhancement to map passive domain samples to >> xen/kernel/application can work again. >> >> What do you think of it? >> >> -Xiaowei >>_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Yang, Xiaowei
2006-Feb-13 09:32 UTC
[Xen-devel] RE: Passive domain support in Xenoprof 2.0
Santos, Jose Renato G wrote:> Xiaowei, > > The passive domain support implementation for Xen 2.0 had > some race conditions and that was the reason it was removed > from the patches for the Xen 3.0 implementation. The buffers > that are used to store PC samples do not use any > locks since they need to be accessed in NMI context. > In the previous implementation, samples of passive domains > were stored in dom0''s buffer. This created the possibility > of a race condition if dom0 and a passive domain were > running on 2 different CPUs and accessing the buffer > simultaneously. >Hi Renato, Now I know your concern. Yes, I can work on passive domain support. Thanks! -Xiaowei _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel