Re: [patch 4/6] Guest page hinting: writable page table entries.

2008-03-12 Thread Rusty Russell
On Thursday 13 March 2008 00:21:36 Martin Schwidefsky wrote: > Index: linux-2.6/fs/exec.c > === > --- linux-2.6.orig/fs/exec.c > +++ linux-2.6/fs/exec.c > @@ -51,6 +51,7 @@ > #include > #include > #include > +#include > > #incl

Re: [patch 3/6] Guest page hinting: mlocked pages.

2008-03-12 Thread Rusty Russell
On Thursday 13 March 2008 00:21:35 Martin Schwidefsky wrote: > --- linux-2.6.orig/include/linux/fs.h > +++ linux-2.6/include/linux/fs.h > @@ -513,6 +513,9 @@ struct address_space { > spinlock_t private_lock; /* for use by the address_space > */ > struct list_head

Re: [patch 1/6] Guest page hinting: core + volatile page cache.

2008-03-12 Thread Rusty Russell
On Thursday 13 March 2008 00:21:33 Martin Schwidefsky wrote: > @@ -957,6 +975,19 @@ struct page *follow_page(struct vm_area_ > > if (flags & FOLL_GET) > get_page(page); > + > + if (flags & FOLL_GET) { > + /* > + * The page is made stable if a referen

Re: [patch 0/6] Guest page hinting version 6.

2008-03-12 Thread Rusty Russell
On Thursday 13 March 2008 00:21:32 Martin Schwidefsky wrote: > My question now is how to proceed with the code. I sure > would love to see the code going upstream some day but that depends on > the mm developers as the code adds complexity that needs to be supported. Well, I want this feature, but

Re: [patch 6/6] Guest page hinting: s390 support.

2008-03-12 Thread Jeremy Fitzhardinge
Anthony Liguori wrote: >> Vp should never happen, since you'd never preserve a V page. And >> surely it would be Pr -> Sr, since the hypervisor wouldn't push the >> page to backing store when you change the client state. >> > > You're right, I meant Vp/Pp but they are invalid states. I thi

Re: [patch 6/6] Guest page hinting: s390 support.

2008-03-12 Thread Anthony Liguori
Jeremy Fitzhardinge wrote: >> >> Well presumably Vp/Pr => Sp? Is is true that from the guest's >> perspective, all of the 'p' states are identical to the 'r' states? >> > > Vp should never happen, since you'd never preserve a V page. And > surely it would be Pr -> Sr, since the hypervisor wo

Re: [patch 6/6] Guest page hinting: s390 support.

2008-03-12 Thread Jeremy Fitzhardinge
Anthony Liguori wrote: Jeremy Fitzhardinge wrote: With stable_if_clean you are refering to stable_if_present? No. I misunderstood and thought that stable_if_present sets the Px state. I'd overlooked the writable flag on page_set_volatile(). If yes the answer is that this op

Re: [patch 6/6] Guest page hinting: s390 support.

2008-03-12 Thread Anthony Liguori
Jeremy Fitzhardinge wrote: >> With stable_if_clean you are refering to stable_if_present? > > No. I misunderstood and thought that stable_if_present sets the Px > state. I'd overlooked the writable flag on page_set_volatile(). > >> If yes the >> answer is that this operation is used to get a

Re: [patch 6/6] Guest page hinting: s390 support.

2008-03-12 Thread Jeremy Fitzhardinge
Martin Schwidefsky wrote: On Wed, 2008-03-12 at 09:44 -0700, Jeremy Fitzhardinge wrote: Martin Schwidefsky wrote: That is the first block of state transitions: {Ur,Sr,Vr,Pr} You can go from any of the four states to any of the remaining three. You only mention page_set_{unused

Re: [patch 6/6] Guest page hinting: s390 support.

2008-03-12 Thread Martin Schwidefsky
On Wed, 2008-03-12 at 09:44 -0700, Jeremy Fitzhardinge wrote: > Martin Schwidefsky wrote: > > That is the first block of state transitions: {Ur,Sr,Vr,Pr} > > You can go from any of the four states to any of the remaining three. > > > > You only mention page_set_{unused,stable,volatile}. Is >

Re: [patch 6/6] Guest page hinting: s390 support.

2008-03-12 Thread Jeremy Fitzhardinge
Martin Schwidefsky wrote: That is the first block of state transitions: {Ur,Sr,Vr,Pr} You can go from any of the four states to any of the remaining three. You only mention page_set_{unused,stable,volatile}. Is page_set_stable_if_present() the fourth. And shouldn't that be "stable_if_cle

Re: [patch 6/6] Guest page hinting: s390 support.

2008-03-12 Thread Martin Schwidefsky
On Wed, 2008-03-12 at 09:19 -0700, Jeremy Fitzhardinge wrote: > Martin Schwidefsky wrote: > > The state transitions (a diagram would be nicer but that is too hard > > to do in ascii art...): > > {Ur,Sr,Vr,Pr}: a resident page will change its block usage state if the > > guest requests it with

Re: [patch 6/6] Guest page hinting: s390 support.

2008-03-12 Thread Jeremy Fitzhardinge
Martin Schwidefsky wrote: The state transitions (a diagram would be nicer but that is too hard to do in ascii art...): {Ur,Sr,Vr,Pr}: a resident page will change its block usage state if the guest requests it with page_set_{unused,stable,volatile}. {Uz,Sz,Vz}: a logically zero page will chan

Re: 2.6.25-rc5-mm1 (paravirt/vsmp/no PCI)

2008-03-12 Thread Ravikiran G Thirumalai
On Tue, Mar 11, 2008 at 11:18:44AM -0700, Jeremy Fitzhardinge wrote: >Randy Dunlap wrote: > >Added Cc: > >>On Tue, 11 Mar 2008 01:14:34 -0700 Andrew Morton wrote: >> >> >>>ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.25-rc5/2.6.25-rc5-mm1/ >>> >> >>randconfig (x86_64) with >>PC

[patch 6/6] Guest page hinting: s390 support.

2008-03-12 Thread Martin Schwidefsky
From: Martin Schwidefsky <[EMAIL PROTECTED]> From: Hubertus Franke <[EMAIL PROTECTED]> From: Himanshu Raj s390 uses the milli-coded ESSA instruction to set the page state. The page state is formed by four guest page states called block usage states and three host page states called block content s

[patch 2/6] Guest page hinting: volatile swap cache.

2008-03-12 Thread Martin Schwidefsky
From: Martin Schwidefsky <[EMAIL PROTECTED]> From: Hubertus Franke <[EMAIL PROTECTED]> From: Himanshu Raj The volatile page state can be used for anonymous pages as well, if they have been added to the swap cache and the swap write is finished. The tricky bit is in free_swap_and_cache. The call to

[patch 5/6] Guest page hinting: minor fault optimization.

2008-03-12 Thread Martin Schwidefsky
From: Martin Schwidefsky <[EMAIL PROTECTED]> From: Hubertus Franke <[EMAIL PROTECTED]> From: Himanshu Raj On of the challenges of the guest page hinting scheme is the cost for the state transitions. If the cost gets too high the whole concept of page state information is in question. Therefore it

[patch 0/6] Guest page hinting version 6.

2008-03-12 Thread Martin Schwidefsky
Greetings, I've dedusted the guest page hinting patches and ported them to todays upstream git tree. There is one reject if applied to 2.6.24-rc5-mm1 but that is easy to fix. The code stills works as expected on my test system. Our z/VM performance team recently published a report on guest page hi

[patch 1/6] Guest page hinting: core + volatile page cache.

2008-03-12 Thread Martin Schwidefsky
From: Martin Schwidefsky <[EMAIL PROTECTED]> From: Hubertus Franke <[EMAIL PROTECTED]> From: Himanshu Raj The guest page hinting patchset introduces code that passes guest page usage information to the host system that virtualizes the memory of its guests. There are three different page states: *

[patch 3/6] Guest page hinting: mlocked pages.

2008-03-12 Thread Martin Schwidefsky
From: Martin Schwidefsky <[EMAIL PROTECTED]> From: Hubertus Franke <[EMAIL PROTECTED]> From: Himanshu Raj Add code to get mlock() working with guest page hinting. The problem with mlock is that locked pages may not be removed from page cache. That means they need to be stable. page_make_volatile n

[patch 4/6] Guest page hinting: writable page table entries.

2008-03-12 Thread Martin Schwidefsky
From: Martin Schwidefsky <[EMAIL PROTECTED]> From: Hubertus Franke <[EMAIL PROTECTED]> From: Himanshu Raj The volatile state for page cache and swap cache pages requires that the host system needs to be able to determine if a volatile page is dirty before removing it. This excludes almost all plat

Re: 2.6.25-rc5-mm1 (paravirt/vsmp/no PCI)

2008-03-12 Thread Ingo Molnar
* Ravikiran G Thirumalai <[EMAIL PROTECTED]> wrote: > Would anyone have objection to have PARAVIRT depend on PCI, since the > vsmp paravirt bits depend on PCI cfg space to determine if the system > is vsmp? If not, this patch would suffice. hm, that's not a good idea - there's nothing in lgue