From: Keir Fraser Subject: Re: RFC: [0/2] Remove netloop by lazy copying in netback Date: Sun, 25 Mar 2007 13:27:04 +0100 Message-ID: References: <20070325114128.GA5950@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20070325114128.GA5950@gondor.apana.org.au> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Herbert Xu Cc: Xen Development Mailing List List-Id: xen-devel@lists.xenproject.org On 25/3/07 12:41, "Herbert Xu" wrote: > Actually looking into it further for ia64 there is still a problem. > We use large pages for the identity mapping on ia64. In order to > modify the PTE we'd have to break the large pages. > > Am I missing something obvious? No. Actually I changed my mind -- your original scheme (strip the original pseudophysical frame of its RAM, and add that original pseudophys frame into the netback set of frames) has the very nice advantage that we don't end up with queued packets taking space in the netback frame pool. I missed that your scheme essentially switches the roles of a normal RAM frame and a netback frame, so that you end up with a freed-up netback frame at the end of the swap. Sorry about that. So we're back to the problem of doing this switch when Xen is doing the p2m translation (as on ia64 for example). On x86 we have a XENMEM_add_to_physmap hypercall. This could be generalised to other architectures and extended. For example, we could add a XENMAPSPACE_gpfn -- which would mean take the 'thing' currently mapped at the specified gpfn and map it at the new gpfn location instead. I'd certainly personally rather see add_to_physmap() extended than add extra single-purpose crap to the grant-table interfaces. -- Keir