public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Andrea Arcangeli <andrea@suse.de>
Cc: Andrew Morton <akpm@digeo.com>,
	Norman Gaywood <norm@turing.une.edu.au>,
	linux-kernel@vger.kernel.org
Subject: Re: Maybe a VM bug in 2.4.18-18 from RH 8.0?
Date: Fri, 6 Dec 2002 15:45:24 -0800	[thread overview]
Message-ID: <20021206234524.GS9882@holomorphy.com> (raw)
In-Reply-To: <20021206233243.GP4335@dualathlon.random>

On Sat, Dec 07, 2002 at 12:32:43AM +0100, Andrea Arcangeli wrote:
> but note that even with rmap you don't know the pmd that points to the
> pte that you want to relocate and for the anon pages you miss
> information about mm and virtual address where those pages are
> allocated, so basically rmap is useless for doing it, you need to do the
> pagetable walking ala swap_out, in turn it's not easier at all in 2.5
> than it could been in 2.4 (but of course this is a 2.5 thing only, I
> just want to say that if it's not difficult in 2.5 it wasn't difficult
> in 2.4 either).

Actually, we do. From include/asm-generic/rmap.h:

static inline void pgtable_add_rmap(struct page * page, struct mm_struct * mm, unsigned long address)
{
#ifdef BROKEN_PPC_PTE_ALLOC_ONE
	/* OK, so PPC calls pte_alloc() before mem_map[] is setup ... ;( */
	extern int mem_init_done;

	if (!mem_init_done)
		return;
#endif
	page->mapping = (void *)mm;
	page->index = address & ~((PTRS_PER_PTE * PAGE_SIZE) - 1);
	inc_page_state(nr_page_table_pages);
}

So pagetable pages are tagged with the right information, and in
principle could even be tagged here with the pmd in page->private.

These fields are actually required for use by try_to_unmap_one(),
and something similar could be done for a try_to_move_one(). This
information remains intact with shared pagetables, and is generalized
so that the PTE page is tagged with a list of mm's (the mm_chain),
and in that case no unique pmd could be directly stored in the page,
but it could just as easily be derived from the mm's in the mm_chain.

But there's no denying it would involve a substantial amount of work.


Bill

  reply	other threads:[~2002-12-06 23:38 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-06  0:13 Maybe a VM bug in 2.4.18-18 from RH 8.0? Norman Gaywood
2002-12-06  1:00 ` Andrew Morton
2002-12-06  1:17   ` Andrea Arcangeli
2002-12-06  1:34     ` Andrew Morton
2002-12-06  1:44       ` Andrea Arcangeli
2002-12-06  2:15         ` William Lee Irwin III
2002-12-06  2:28           ` Andrea Arcangeli
2002-12-06  2:41             ` William Lee Irwin III
2002-12-06  5:25               ` Andrew Morton
2002-12-06  5:48                 ` Andrea Arcangeli
2002-12-06  6:14                   ` William Lee Irwin III
2002-12-06  6:55                   ` Andrew Morton
2002-12-06  7:14                     ` GrandMasterLee
2002-12-06  7:25                       ` Andrew Morton
2002-12-06  7:34                         ` GrandMasterLee
2002-12-06  7:51                           ` Andrew Morton
2002-12-06 11:37                             ` Christoph Hellwig
2002-12-06 16:19                             ` GrandMasterLee
2002-12-06 14:57                     ` Andrea Arcangeli
2002-12-06 15:12                       ` William Lee Irwin III
2002-12-06 23:32                         ` Andrea Arcangeli
2002-12-06 23:45                           ` William Lee Irwin III [this message]
2002-12-06 23:57                             ` Andrea Arcangeli
2002-12-06  6:00                 ` William Lee Irwin III
2002-12-06 22:28               ` Andrea Arcangeli
2002-12-06 23:21                 ` William Lee Irwin III
2002-12-06 23:50                   ` Andrea Arcangeli
2002-12-07  0:30                     ` William Lee Irwin III
2002-12-07  0:01                   ` Andrew Morton
2002-12-07  0:21                     ` William Lee Irwin III
2002-12-07  0:30                       ` Andrew Morton
2002-12-07  2:19                       ` Alan Cox
2002-12-07  1:46                         ` William Lee Irwin III
2002-12-07  1:56                           ` Andrea Arcangeli
2002-12-07  2:31                           ` Alan Cox
2002-12-07  2:09                             ` William Lee Irwin III
2002-12-07  0:22                     ` Andrea Arcangeli
2002-12-07  0:35                       ` Andrew Morton
2002-12-07  0:46                     ` William Lee Irwin III
2002-12-07 10:55                     ` Arjan van de Ven
2002-12-06 10:36           ` Arjan van de Ven
2002-12-06 14:23             ` William Lee Irwin III
2002-12-06 15:12               ` William Lee Irwin III
2002-12-06 22:34                 ` Andrea Arcangeli
2002-12-07 18:27                   ` Eric W. Biederman
2002-12-06  1:08 ` Andrea Arcangeli
     [not found] <mailman.1039133948.27411.linux-kernel2news@redhat.com>
2002-12-06  0:35 ` Pete Zaitcev
2002-12-06  1:27   ` Norman Gaywood
2002-12-06 12:48     ` 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=20021206234524.GS9882@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=akpm@digeo.com \
    --cc=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=norm@turing.une.edu.au \
    /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