[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] [PATCH 1/5 TAKE 2] xenoprof: split xen x86 xenoprof code



 

> -----Original Message-----
> From: Isaku Yamahata [mailto:yamahata@xxxxxxxxxxxxx] 
> Sent: Friday, November 17, 2006 6:47 PM
> To: Santos, Jose Renato G
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxx; xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-devel] [PATCH 1/5 TAKE 2] xenoprof: split 
> xen x86 xenoprof code
> 
> On Fri, Nov 17, 2006 at 01:26:04PM -0600, Santos, Jose Renato G wrote:
> 
> > > > QUESTIONS for Isaku:
> > > > 
> > > > patch 4/5:
> > > > ==========
> > > > 
> > > > > +struct xenoprof_shared_buffer {
> > > > > +     char                                    *buffer;
> > > > > +     struct xenoprof_arch_shared_buffer      arch;
> > > > > +};
> > > > 
> > > > The arch field has no extra info for x86. Why do you need this?
> > > 
> > > On IA64 it is defined as
> > > struct xenoprof_arch_shared_buffer {
> > >         struct resource*        res;
> > > };
> > > 
> > > On IA64, auto translated mode feature is enabled.
> > > It means that page mapping from xen is based on pseudo physical 
> > > address, not virtual address. Pseudo physical address used to map 
> > > pages must be recorded somewhere in order to unmap.
> > > I guess, if xenoprof/x86 supported auto translated guest mode 
> > > something similar structure would be necessary.
> > > 
> > > 
> >   Isaku
> > 
> >  I am still not convinced that we need this. Since this in 
> the kernel
> > you can always get the pseudo physical address from the 
> virtual address,
> > right? Am I missing something?
> 
> Yes, the pseudo physical address itself can be get.
> The point is that the pseudo physical addresses aren't always
> backed by struct page.
> In such a case alloc_pages()/free_pages() can't be used, 
> another structure
> is necessary.
> In fact Xen/IA64 allocates the pseudo physical address resion by
> allocate_resource(&iomem_resource, ...). Not by alloc_pages().
> Why doesn't Xen/IA64 use alloc_pages()?
> Because it is also used for grant table foreign domain page mapping
> and its size is very large sometimes. Using alloc_pages() 
> results in OOM.
> Xen/PPC seems to adopt another approach, though.
> 

  OK, I understand now.
  You want to keep the mem resource info and the buffer virtual address
in the same struct which you pass to the arch specific code for mapping
and unmapping xenoprof pages. I think that is fine.

  Regards

  Renato

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.