public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Carsten Otte <cotte@de.ibm.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: carsteno@de.ibm.com, Jes Sorensen <jes@sgi.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, Hugh Dickins <hugh@veritas.com>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	bjorn_helgaas@hp.com
Subject: Re: [patch] do_no_pfn handler
Date: Tue, 11 Apr 2006 22:03:27 +0200	[thread overview]
Message-ID: <443C0B8F.7010501@de.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0604110830260.10745@g5.osdl.org>

Linus Torvalds wrote:
> You _really_ cannot do COW together with "random pfn filling".
I still have'nt found a good way to do so, even after discussing with Nick and Hugh, but that's exactly where I intend to get for the xip stuff.

Today, the _only_ code that uses the struct page behind those DCSS segments is aops->nopage (as return value) and do_wp_page. Those small servers have almost no local memory (kernel, libraries, and binaries are shared), and the mem_map array is a large overhead.

> You can do COW with a pure remap_pfn_range() (ie a /dev/mem kind of 
> mapping, or a frame buffer etc), but that's only because it has a very 
> magic special case that is used to distinguish between cow'ed pages and 
> the pages that were inserted initially.
> 
> We have no free bits in the page tables to say "this is a COW page" in 
> general (on x86 we could do it, but some other architectures don't have 
> any SW-usable bits). 
That's true. One can store that information in the vma flags, and split the vma into 3 vmas once we have a write fault. Although that would work in theory, I doubt it would save lot of memory because of too many vmas, and I think we would burn precious CPU horsepower walking all those vmas.
I believe Hugh has already done an implementation for that which he does not consider nice. I have not found a feasible way to adress that issue so far, and I promise to keep from coding until I find a reasonable non-intrusive way to get there.
-- 

Carsten Otte
IBM Linux technology center
ARCH=s390

  reply	other threads:[~2006-04-11 20:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-03 11:32 [patch] do_no_pfn handler Jes Sorensen
2006-04-03 11:46 ` Nick Piggin
2006-04-03 14:49   ` Jes Sorensen
2006-04-04 10:58 ` Jes Sorensen
2006-04-04 11:05   ` Nick Piggin
2006-04-05  9:34     ` Jes Sorensen
2006-04-19 14:10     ` [patch - repost] " Jes Sorensen
2006-04-21 10:41       ` Nick Piggin
2006-04-24  7:55         ` Jes Sorensen
2006-04-11 14:29 ` [patch] " Jes Sorensen
2006-04-11 15:10   ` Linus Torvalds
2006-04-11 15:26     ` Carsten Otte
2006-04-11 15:35       ` Linus Torvalds
2006-04-11 20:03         ` Carsten Otte [this message]
2006-04-11 20:30           ` Linus Torvalds
2006-04-11 20:53             ` Carsten Otte
2006-04-12  9:09     ` Jes Sorensen
2006-04-12  9:16       ` Carsten Otte

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=443C0B8F.7010501@de.ibm.com \
    --to=cotte@de.ibm.com \
    --cc=akpm@osdl.org \
    --cc=bjorn_helgaas@hp.com \
    --cc=carsteno@de.ibm.com \
    --cc=hugh@veritas.com \
    --cc=jes@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=torvalds@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