WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Mark Williamson <Mark.Williamson@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [XEN] using shmfs for swapspace
From: Arnd Bergmann <arnd@xxxxxxxx>
Date: Wed, 5 Jan 2005 01:11:54 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxxxx, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>, Luke Kenneth Casson Leighton <lkcl@xxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>
Delivery-date: Wed, 05 Jan 2005 02:12:12 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
In-reply-to: <200501040304.10128.maw48@xxxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
References: <20050102162652.GA12268@xxxxxxxx> <1104785749.13302.26.camel@xxxxxxxxxxxxxxxxxxxxx> <200501040304.10128.maw48@xxxxxxxxxxxx>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.6.2
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: pgpapfsjhwN9S.pgp
Description: signature