From: Andrea Arcangeli <andrea@suse.de>
To: William Lee Irwin III <wli@holomorphy.com>,
Andrew Morton <akpm@zip.com.au>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [BK PATCH 2.5] Introduce 64-bit versions of PAGE_{CACHE_,}{MASK,ALIGN}
Date: Mon, 29 Jul 2002 02:56:12 +0200 [thread overview]
Message-ID: <20020729005612.GM1201@dualathlon.random> (raw)
In-Reply-To: <20020729004325.GS25038@holomorphy.com>
On Sun, Jul 28, 2002 at 05:43:25PM -0700, William Lee Irwin III wrote:
> Linus Torvalds wrote:
> >> Dream on. It's good, and it's not getting removed. The "struct page" is
> >> size-critical, and also correctness-critical (see above on gcc issues).
>
> 32-bit is a sad, broken, and depressing reality we're going to be
> saddled with on mainstream systems for ages. It's stinking up the
> kernel like a dead woodchuck under the porch as it is, and the 64GB
> abominations on their way out the ass-end of hardware vendor pipelines
> are truly vomitous.
>
>
> On Sun, Jul 28, 2002 at 05:10:48PM -0700, Andrew Morton wrote:
> > Plan B is to remove page->index.
> > - Replace ->mapping with a pointer to the page's radix tree
> > slot. Use address masking to go from page.radix_tree_slot
> > to the radix tree node.
> > - Store the base index in the radix tree node, use math to
> > derive page->index. Gives 64-bit index without increasing
> > the size of struct page. 4 bytes saved.
> > - Implement radix_tree_gang_lookup() as previously described. Use
> > this in truncate_inode_pages, invalidate_inode_pages[2], readahead
> > and writeback.
> > - The only thing we now need page.list for is tracking dirty pages.
> > Implement a 64-bit dirtiness bitmap in radix_tree_node, propagate
> > that up the radix tree so we can efficiently traverse dirty pages
> > in a mapping. This also allows writeback to always write in ascending
> > index order. Remove page->list. 8 bytes saved.
> > - Few pages use ->private for much. Hash for it. 4(ish) bytes
> > saved.
> > - Remove ->virtual, do page_address() via a hash. 4(ish) bytes saved.
> > - Remove the rmap chain (I just broke ptep_to_address() anyway). 4 bytes
> > saved. struct page is now 20 bytes.
> > There look. In five minutes I shrunk 24 bytes from the page
> > structure. Who said programming was hard?
>
> This is so aggressive I'm obligated to pursue it. The pte_chain will
> die shortly if I get my way as it is.
if you look at DaveM first full rmap implementation it never had a
pte-chain. He used the same rmap logic we always hand in linux since the
first 2.1 kernel I looked at, to handle correctly truncate against
MAP_SHARED. Unfortunately that's not very efficient and requires some
metadata allocation for anonymous pages (that's the address space
pointer, anon pages regularly doesn't have a dedicated address space),
and overhead that we never had w/o full rmap (and for inode backed
mappings we just have this info in the inode, just the shared_lock
locking isn't trivial). Hope you can came up with a better algorithm
(nevertheless also the current rmap implementation adds significant
measurable overhead in the fast paths), Rik told me a few days ago he
also wanted to drop the pte_chain, but I assume you're just in sync with him.
Andrea
next prev parent reply other threads:[~2002-07-29 0:51 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-27 13:41 Anton Altaparmakov
2002-07-27 17:23 ` Andrew Morton
2002-07-28 17:53 ` Eric W. Biederman
2002-07-28 18:54 ` Anton Altaparmakov
2002-07-28 20:12 ` Eric W. Biederman
2002-07-28 23:26 ` Linus Torvalds
2002-07-29 0:10 ` Andrew Morton
2002-07-29 0:43 ` William Lee Irwin III
2002-07-29 0:56 ` Andrea Arcangeli [this message]
2002-07-29 1:04 ` William Lee Irwin III
2002-07-29 1:09 ` Rik van Riel
2002-07-29 2:14 ` Andrew Morton
2002-07-29 2:11 ` William Lee Irwin III
2002-07-29 2:18 ` Rik van Riel
2002-07-29 0:49 ` Andrea Arcangeli
2002-07-29 2:05 ` Andrew Morton
2002-07-29 2:09 ` William Lee Irwin III
2002-07-29 20:52 ` Andrea Arcangeli
2002-07-29 21:01 ` Andrew Morton
2002-07-29 21:31 ` Andrea Arcangeli
2002-07-29 21:46 ` Andrew Morton
2002-07-29 22:18 ` Andrea Arcangeli
2002-07-29 0:56 ` William Lee Irwin III
2002-07-29 1:36 ` Andrew Morton
2002-07-29 1:37 ` William Lee Irwin III
2002-07-29 9:27 ` Russell King
2002-07-29 18:32 ` Andrew Morton
[not found] <5.1.0.14.2.20020728193528.04336a80@pop.cus.cam.ac.uk.suse.lists.linux.kernel>
[not found] ` <Pine.LNX.4.44.0207281622350.8208-100000@home.transmeta.com.suse.lists.linux.kernel>
[not found] ` <3D448808.CF8D18BA@zip.com.au.suse.lists.linux.kernel>
[not found] ` <20020729004942.GL1201@dualathlon.random.suse.lists.linux.kernel>
[not found] ` <3D44A2DF.F751B564@zip.com.au.suse.lists.linux.kernel>
[not found] ` <20020729205211.GB1201@dualathlon.random.suse.lists.linux.kernel>
2002-07-30 13:44 ` Andi Kleen
2002-07-30 14:06 ` Rik van Riel
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=20020729005612.GM1201@dualathlon.random \
--to=andrea@suse.de \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=wli@holomorphy.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®