George Dunlap
2009-Sep-11 10:40 UTC
[Xen-devel] [PATCH] PoD: Check p2m assumption in debug builds
The PoD code assumes that if: * A page is in a domain''s p2m table * And it''s owned by the domain * And it''s not a xenheap page then: * It''s on the domain''s page list. This patch adds a check for this assumption when debug=y. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kouya Shimura
2009-Sep-17 01:26 UTC
Re: [Xen-devel] [PATCH] PoD: Check p2m assumption in debug builds
Hi, c/s 20194:582970a2d2dc overloads the system. [BEFORE] $ time xm create hvm.cfg memory=1024 Using config file "./hvm.cfg". Started domain hvm (id=3) real 0m2.343s user 0m0.040s sys 0m0.030s [AFTER] $ time xm create hvm.cfg memory=1024 Using config file "./hvm.cfg". Started domain hvm (id=2) real 2m25.741s user 0m0.090s sys 0m0.020s I''m about to lose my patience with it. :-) Can you control it by a boot parameter? (ex. "pod_debug=nnn") Thanks, Kouya George Dunlap writes:> The PoD code assumes that if: > * A page is in a domain''s p2m table > * And it''s owned by the domain > * And it''s not a xenheap page > then: > * It''s on the domain''s page list. > > This patch adds a check for this assumption when debug=y. > > Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Sep-17 06:14 UTC
Re: [Xen-devel] [PATCH] PoD: Check p2m assumption in debug builds
On 17/09/2009 02:26, "Kouya Shimura" <kouya@jp.fujitsu.com> wrote:> real 0m2.343s > user 0m0.040s > sys 0m0.030s > > real 2m25.741s > user 0m0.090s > sys 0m0.020s > > I''m about to lose my patience with it. :-) > Can you control it by a boot parameter? (ex. "pod_debug=nnn")Yeah, that''s too slow for our normal debug build. I think we''ll revert the patch -- noone would ever enable it, unless maybe if helping George track down a PoD bug. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
George Dunlap
2009-Sep-17 09:43 UTC
Re: [Xen-devel] [PATCH] PoD: Check p2m assumption in debug builds
Keir Fraser wrote:> On 17/09/2009 02:26, "Kouya Shimura" <kouya@jp.fujitsu.com> wrote: > > >> real 0m2.343s >> user 0m0.040s >> sys 0m0.030s >> >> real 2m25.741s >> user 0m0.090s >> sys 0m0.020s >> >> I''m about to lose my patience with it. :-) >> Can you control it by a boot parameter? (ex. "pod_debug=nnn") >> > > Yeah, that''s too slow for our normal debug build. I think we''ll revert the > patch -- noone would ever enable it, unless maybe if helping George track > down a PoD bug. >Hmm... my only concern is that the assumption seems like something which might easily change, with no one realizing that they''d broken the assumption, and the codepath not being tested since most OSS users probably won''t be using PoD. Hmm, perhaps we could wrap it with an if() statement checking if there are any outstanding PoD entries? The assumption only really matters when PoD is in use. Alternately, a separate #define for PoD debug might be useful, so we can easily turn on all these options when we need to. -George _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel