From: Rik van Riel <riel@conectiva.com.br>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: "David S. Miller" <davem@redhat.com>,
linux-mm@kvack.org, "Stephen C. Tweedie" <sct@redhat.com>,
Matthew Dillon <dillon@apollo.backplane.com>
Subject: Re: [RFC] 2-pointer PTE chaining idea
Date: Fri, 19 Jan 2001 18:55:59 +1100 (EST) [thread overview]
Message-ID: <Pine.LNX.4.31.0101191849050.3368-100000@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.10.10101182307340.9418-100000@penguin.transmeta.com>
On Thu, 18 Jan 2001, Linus Torvalds wrote:
> On Thu, 18 Jan 2001, David S. Miller wrote:
> > Rik van Riel writes:
> > > In order to find the vma and the mm_struct each pte belongs to,
> > > we can use the ->mapping and ->index fields in the page_struct
> > > of the page table, with the ->mapping pointing to the mm_struct
> > > and the ->index containing the offset within the mm_struct
> >
> > Anonymous pages have no page->mapping, how can this work?
>
> Note the "in the page struct of the page table".
> ^^^^^^^^^^
>
> What Rik is saying is that if your page tables themselves are full pages
> (which is not true everywhere, but hey, close enough), you can use the
> "struct page *" of the _page_table_ page to save off the "struct
> mm_struct" pointer, along with the base in the mm_struct.
> It doesn't help us, though. 2 or 3 pointers doesn't make any difference on
> x86, at least: the 3-pointer-scheme had a "next, prev, mm" pointer triple,
> and there is an _implied_ pointer pointing to the page table entry itself,
> that Rik probably forgot about.
Actually, the pointer is to the page table entry ... on systems
where the page table is a multiple of the full page we know that
the page table itself has address:
page_table = pte_t & ~(PAGE_TABLE_SIZE - 1);
And from there we can easily get the struct page *.
> The only sane way I can think of to do the "implied pointer" is to do an
> order-2 allocation when you allocate a page directory: you get 16kB of
How about doing an order-1 allocation and having a singly linked
list ?
The structure would then look like this (on x86)
struct bidir_page_table {
struct pte_t pte[1024];
void * next[1024];
};
With next[400]:
- indicating that pte[400] is in the pte chain we're currently
searching
- pointing to the next pointer in the pte chain, much like used
block listed in the FAT filesystem
regards,
Rik
--
Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...
http://www.surriel.com/
http://www.conectiva.com/ http://distro.conectiva.com.br/
--
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.eu.org/Linux-MM/
next prev parent reply other threads:[~2001-01-19 7:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-19 5:08 Rik van Riel
2001-01-19 6:57 ` David S. Miller
2001-01-19 7:17 ` Linus Torvalds
2001-01-19 7:55 ` Rik van Riel [this message]
2001-01-20 5:22 ` Linus Torvalds
2001-01-20 5:31 ` David S. Miller
2001-01-20 7:05 ` Rik van Riel
2001-01-19 11:49 ` Ingo Molnar
2001-01-20 6:58 ` Rik van Riel
2001-01-19 11:37 ` Ingo Molnar
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=Pine.LNX.4.31.0101191849050.3368-100000@localhost.localdomain \
--to=riel@conectiva.com.br \
--cc=davem@redhat.com \
--cc=dillon@apollo.backplane.com \
--cc=linux-mm@kvack.org \
--cc=sct@redhat.com \
--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