From: Jamie Lokier <lk@tantalophile.demon.co.uk>
To: Andrew Morton <akpm@zip.com.au>
Cc: Linus Torvalds <torvalds@transmeta.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch 15/21] multiple pte pointers per pte_chain
Date: Sun, 11 Aug 2002 15:51:22 +0100 [thread overview]
Message-ID: <20020811155122.B2513@kushida.apsleyroad.org> (raw)
In-Reply-To: <3D5614BC.EB0629B6@zip.com.au>; from akpm@zip.com.au on Sun, Aug 11, 2002 at 12:39:40AM -0700
Andrew Morton wrote:
> Pages which are mapped by only a single process continue to not have a
> pte_chain. The pointer in struct page points directly at the mapping
> pte (a "PageDirect" pte pointer). Once the page is shared a pte_chain
> is allocated and both the new and old pte pointers are moved into it.
May I suggest that the final pte in the list of ptes for a page is
_always_ pointed to directly?
In other words, a pte_chain looks like this:
struct page -> pte_chain -> pte_chain -> pte_chain -> pte
| | |
v v v
pte pte pte
pte_chain vs. pte would be distinguished by the least significant bit of
the pointer, or something similar.
This adds a special case in the list walker -- on the other hand, it
also removes two special cases ("PageDirect" is no longer required, and
there is no 0 to indicate end-of-list). But the best part is: it saves
more memory, has no cache line cost, and reduces the amount of work
needed to share a page :-)
-- Jamie
next prev parent reply other threads:[~2002-08-11 14:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-11 7:39 Andrew Morton
2002-08-11 14:51 ` Jamie Lokier [this message]
2002-08-11 17:27 ` Daniel Phillips
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=20020811155122.B2513@kushida.apsleyroad.org \
--to=lk@tantalophile.demon.co.uk \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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
all inboxes | Powered by JetHome®