[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH 0 of 2] Add libxc API that sets mem_access type for an array of gfns
- To: Aravindh Puthiyaparambil <aravindh@xxxxxxxxxxxx>
- From: Christian Limpach <christian.limpach@xxxxxxxxx>
- Date: Thu, 26 Apr 2012 13:20:00 -0700
- Cc: tim@xxxxxxx, xen-devel@xxxxxxxxxxxxx
- Delivery-date: Thu, 26 Apr 2012 20:20:32 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=x9tDxD974RczXIh6/8CLVsZbF9wCrreGh4MbikHFLSI=; b=ZUCApsEPpXQlS+fiRQgL/Aoj+h+yP5Eu9wbdQZmTb93S4+onMysDhTXAsJbBMpRRQP QvcmZt2tz/RM9NcRKBBPLfIhYsCop5Wk6jvv1X26M+fmvnRWQE69VQKc9lE0RvwImJl3 xuQQuKh52cpfmuYjhdCjHbzSxstQa922HwbcDan0nDJhaPLwh3tlknwrtRwjDQI4ZqjQ 97qcTyDAb3M0OWSCzeOBZPL1gyS31n5Jqrct9OSBmhO5y+u1ysxMBC5jNYNoGVzRlB77 WtsnSAj6LN6uY2TyxdKvVjfKEsSpqb0U7575fY5ZfKnnL29Fp3U3FU554Hxr8Nec56/D xgzA==
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
On Thu, Apr 26, 2012 at 11:33 AM, Aravindh Puthiyaparambil
> When the mem_access type needs to be changed for multiple discontiguous gfns,
> calling xc_hvm_set_mem_access() multiple times does not perform very well.
> The main pain points are the multiple libxc calls themselves plus the
> multiple map_domain_page() / unmap_domain_page() and ept_sync_domain() calls
> for each ept_set_entry(gfn). The following patches adds a new mem_access API
> that sets the mem_access type for an array of guest physical addresses in one
> libxc call with minimal map_domain_page() / unmap_domain_page() and
> ept_sync_domain() calls.
Are you sure that your bulk code actually works? It seems to me that
your __ept_set_entry function assumes that table still points to the
top of the p2m. The "for ( i = ept_get_wl(d); i > target; i-- )" loop
will walk the table, and so in the subsequent calls from your bulk
loop, this won't work?
I think you need something like an iterator, the context of which can
be passed around...
Also, the call to ept_get_entry in your bulk loop will do a walk in
every iteration, it seems a bit arbitrary to only (try to) avoid one
and not the other. But I guess the "win" is from reducing the number
of ept_sync_domain calls.
Xen-devel mailing list