linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Carsten Otte <cotte@de.ibm.com>
Cc: virtualization@lists.linux-foundation.org,
	kvm-devel@lists.sourceforge.net, avi@qumranet.com,
	npiggin@suse.de, hugh@veritas.com, linux-mm@kvack.org,
	schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, os@de.ibm.com,
	borntraeger@de.ibm.com, hollisb@us.ibm.com, EHRHARDT@de.ibm.com,
	jeroney@us.ibm.com, aliguori@us.ibm.com, jblunck@suse.de,
	rvdheij@gmail.com, rusty@rustcorp.com.au, arnd@arndb.de,
	xiantao.zhang@intel.com
Subject: Re: [RFC/PATCH 02/15 v2] preparation: host memory management changes for s390 kvm
Date: Mon, 24 Mar 2008 14:52:09 -0700	[thread overview]
Message-ID: <20080324145209.23920166.akpm@linux-foundation.org> (raw)
In-Reply-To: <1206205359.7177.84.camel@cotte.boeblingen.de.ibm.com>

On Sat, 22 Mar 2008 18:02:39 +0100
Carsten Otte <cotte@de.ibm.com> wrote:

> From: Heiko Carstens <heiko.carstens@de.ibm.com>
> From: Christian Borntraeger <borntraeger@de.ibm.com>
> 
> This patch changes the s390 memory management defintions to use the pgste field
> for dirty and reference bit tracking of host and guest code. Usually on s390, 
> dirty and referenced are tracked in storage keys, which belong to the physical
> page. This changes with virtualization: The guest and host dirty/reference bits
> are defined to be the logical OR of the values for the mapping and the physical
> page. This patch implements the necessary changes in pgtable.h for s390.
> 
> 
> There is a common code change in mm/rmap.c, the call to page_test_and_clear_young
> must be moved. This is a no-op for all architecture but s390. page_referenced
> checks the referenced bits for the physiscal page and for all mappings:
> o The physical page is checked with page_test_and_clear_young.
> o The mappings are checked with ptep_test_and_clear_young and friends.
> 
> Without pgstes (the current implementation on Linux s390) the physical page
> check is implemented but the mapping callbacks are no-ops because dirty 
> and referenced are not tracked in the s390 page tables. The pgstes introduces 
> guest and host dirty and reference bits for s390 in the host mapping. These
> mapping must be checked before page_test_and_clear_young resets the reference
> bit. 
>
> ...
>
> --- linux-host.orig/mm/rmap.c
> +++ linux-host/mm/rmap.c
> @@ -413,9 +413,6 @@ int page_referenced(struct page *page, i
>  {
>  	int referenced = 0;
>  
> -	if (page_test_and_clear_young(page))
> -		referenced++;
> -
>  	if (TestClearPageReferenced(page))
>  		referenced++;
>  
> @@ -433,6 +430,10 @@ int page_referenced(struct page *page, i
>  			unlock_page(page);
>  		}
>  	}
> +
> +	if (page_test_and_clear_young(page))
> +		referenced++;
> +
>  	return referenced;
>  }

ack.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2008-03-24 21:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1206030270.6690.51.camel@cotte.boeblingen.de.ibm.com>
2008-03-22 17:02 ` [RFC/PATCH 00/15 v2] kvm on big iron Carsten Otte
2008-03-25 17:47   ` [RFC/PATCH 00/15 v3] " Carsten Otte
2008-03-27 12:02     ` Avi Kivity
     [not found]   ` <1206458154.6217.12.camel@cotte.boeblingen.de.ibm.com>
2008-03-25 17:47     ` [RFC/PATCH 01/15 v3] preparation: provide hook to enable pgstes in user pagetable Carsten Otte, Martin Schwidefsky, Carsten Otte
2008-03-25 17:47     ` [RFC/PATCH 02/15 v3] preparation: host memory management changes for s390 kvm Carsten Otte, Heiko Carstens, Christian Borntraeger
     [not found] ` <1206203560.7177.45.camel@cotte.boeblingen.de.ibm.com>
2008-03-22 17:02   ` [RFC/PATCH 01/15 v2] preparation: provide hook to enable pgstes in user pagetable Carsten Otte, Martin Schwidefsky
2008-03-24 21:50     ` Andrew Morton
2008-03-22 17:02   ` [RFC/PATCH 02/15 v2] preparation: host memory management changes for s390 kvm Carsten Otte, Heiko Carstens, Christian Borntraeger
2008-03-24 21:52     ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080324145209.23920166.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=EHRHARDT@de.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=arnd@arndb.de \
    --cc=avi@qumranet.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cotte@de.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hollisb@us.ibm.com \
    --cc=hugh@veritas.com \
    --cc=jblunck@suse.de \
    --cc=jeroney@us.ibm.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@suse.de \
    --cc=os@de.ibm.com \
    --cc=rusty@rustcorp.com.au \
    --cc=rvdheij@gmail.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xiantao.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox