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

Re: [Xen-devel] Re: [XEN] using shmfs for swapspace



On Dinsdag 04 Januar 2005 04:04, Mark Williamson wrote:
> > for doing opportunistic page recycling ("I dont need this page but when
> > I ask for it back please tell me if you trashed the content")
> 
> We've talked about doing this but AFAIK nobody has gotten round to it yet 
> because there hasn't been a pressing need (IIRC, it was on the todo list when 
> Xen 1.0 came out).
> 
> IMHO, it doesn't look terribly difficult but would require (hopefully small) 
> modifications to the architecture independent code, plus a little bit of 
> support code in Xen.
> 
> I'd quite like to look at this one fine day but I suspect there are more 
> useful things I should do first...

There are two other alternatives that are already used on s390 for making
multi-level paging a little more pleasant:

- Pseudo faults: When Linux accesses a page that it believes to be present
  but is actually swapped out in z/VM, the VM hypervisor causes a special
  PFAULT exception. Linux can then choose to either ignore this exception
  and continue, which will force VM to swap the page back in. Or it can
  do a task switch and wait for the page to come back. At the point where
  VM has read the page back from its swap device, it causes another
  exception, after which Linux wakes up the sleeping process.
  see arch/s390/mm/fault.c

- Ballooning: 
  z/VM has an interface (DIAG 10) for the OS to tell it about a page that
  is currently unused. The kernel uses get_free_page to reserve a number
  of pages, then calls DIAG10 to give it to z/VM. The amount of pages to
  give back to the hypervisor is determined by a system wide workload
  manager.
  see arch/s390/mm/cmm.c

When you want to introduce some interface in Xen, you probably want
something more powerful than these, but it probably makes sense to
see them as a base line of what can be done with practically no
common code changes (if you don't do similar stuff already).

        Arnd <><

Attachment: pgp7dxTRYwXFj.pgp
Description: signature


 


Rackspace

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