virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: Andy Whitcroft <apw@shadowen.org>
Cc: akpm@osdl.org, virtualization@lists.osdl.org,
	frankeh@watson.ibm.com, nickpiggin@yahoo.com.au,
	Dave Hansen <haveblue@us.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch 3/9] Guest page hinting: volatile page cache.
Date: Fri, 01 Sep 2006 18:04:00 +0200	[thread overview]
Message-ID: <1157126640.21733.43.camel@localhost> (raw)
In-Reply-To: <44F8563B.3050505@shadowen.org>

On Fri, 2006-09-01 at 16:48 +0100, Andy Whitcroft wrote:
> >> I know that there are 32-bit s390 kernels, but would this be a
> >> reasonable feature to restrict to only 64-bit kernels?  That might be a
> >> decent compromise.
> > 
> > Yes, it is definitly an option to make this a 64-bit only features. In
> > particular because the ESSA instruction that is used on s390 is only
> > available in zarch mode (=64 bit).
> 
> Wow.  Well there are only 7 extra bits available in 64 bit mode (the
> FIELDS area is larger on 64bit machines).  Do we really, really need
> three new bits.  What are they being used for here.

I have though about alternatives for the page bits hard and long and I
could not find a way how to do it without the bits. Their use is:
1) The page-is-discarded (PG_discarded) bit is set for pages that have
been recognized as removed by the host. The page needs to be removed
from the page cache while there are still page references floating
around. To prevent multiple removals from the page cache the discarded
bit is needed.
2) The page-state-change (PG_state_change) bit is required to prevent
that an make_stable "overtakes" a make_volatile. In order to make a page
volatile a number of conditions are check. After this is done the state
change will be done. The critical section is the code that performs the
checks up to the instruction that does the state change. No make_stable
may be done in between. The granularity is per page, to use a global
lock like a spinlock would severly limit the scalability for large smp
systems.
3) The page-has-a-writable-mapping (PG_writable) bit is set when the
first writable pte for a page is established. The page needs to have a
different state if a writable pte exists compared to a read-only page.
The alternative without the page bit would be to do the state change
every time a writable pte is established or to search all ptes of a
given page. Both have performance implications. 

Overall I fear that the code really needs three additional bits.

-- 
blue skies,
  Martin.

Martin Schwidefsky
Linux for zSeries Development & Services
IBM Deutschland Entwicklung GmbH

"Reality continues to ruin my life." - Calvin.

  reply	other threads:[~2006-09-01 16:04 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-01 11:09 [patch 3/9] Guest page hinting: volatile page cache Martin Schwidefsky
2006-09-01 14:54 ` Dave Hansen
2006-09-01 15:29   ` Martin Schwidefsky
2006-09-01 15:37     ` Dave Hansen
2006-09-01 14:57 ` Dave Hansen
2006-09-01 15:31   ` Martin Schwidefsky
2006-09-01 15:48     ` Andy Whitcroft
2006-09-01 16:04       ` Martin Schwidefsky [this message]
2006-09-01 16:18         ` Dave Hansen
2006-09-01 16:25           ` Martin Schwidefsky
2006-09-01 16:37             ` Dave Hansen
2006-09-01 16:56               ` Martin Schwidefsky
2006-09-01 17:16                 ` Dave Hansen
2006-09-01 17:42                   ` Martin Schwidefsky
2006-09-01 18:03                     ` Dave Hansen
2006-09-01 18:04                       ` Martin Schwidefsky
2006-09-01 18:23                         ` Dave Hansen
2006-09-01 18:31                           ` Martin Schwidefsky
2006-09-01 18:41                             ` Dave Hansen
2006-09-04 11:21                               ` Martin Schwidefsky
2006-09-05 18:27                                 ` Dave Hansen
2006-09-06 10:49                                   ` Martin Schwidefsky
2006-09-01 16:29         ` Dave Hansen
2006-09-01 17:02           ` Martin Schwidefsky
2006-09-01 17:05             ` Dave Hansen
2006-09-13 18:21 ` Zachary Amsden
2006-09-14  8:56   ` Martin Schwidefsky
2006-09-14  9:23     ` Zachary Amsden
2006-09-15  8:36       ` Martin Schwidefsky
  -- strict thread matches above, loose matches on Subject: below --
2006-09-15 17:50 Chuck Ebbert
2006-09-18  8:08 ` Martin Schwidefsky

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=1157126640.21733.43.camel@localhost \
    --to=schwidefsky@de.ibm.com \
    --cc=akpm@osdl.org \
    --cc=apw@shadowen.org \
    --cc=frankeh@watson.ibm.com \
    --cc=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=virtualization@lists.osdl.org \
    /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;
as well as URLs for NNTP newsgroup(s).