All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-arch@vger.kernel.org
Subject: Re: [PATCH] set_pte() part 2 arch usage
Date: Sat, 26 Feb 2005 19:09:43 -0800	[thread overview]
Message-ID: <20050226190943.7aa031e2.davem@davemloft.net> (raw)
In-Reply-To: <1109379369.15027.99.camel@gaston>

On Sat, 26 Feb 2005 11:56:09 +1100
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> On Fri, 2005-02-25 at 10:37 -0800, David S. Miller wrote:
> > I bet the address arg is incorrect in some case.
> 
> Yes, probably. That's the same symptoms we had when zeromap_pud_range
> had the bug getting the address wrong, which means we fail to properly
> flush the hash & TLB for this PTE. I'm not at work (it's sat. already
> here :) but I'll have a look asap.

I added the debugging I suggested and did some runs on sparc64.

There are many pte level looping constructs of the form:

	pte = ...(pmd, address);
	address &= ~PMD_MASK;
	end = address + size;
	if (end > PMD_SIZE)
		end = PMD_SIZE;

	some_loop() {
		...
		set_pte_at(mm, address, pte);
		address += PAGE_SIZE;
		pte++;
		...
	}

This "address" mask screws everything up.

I know of at least three such cases so far, vmalloc.c:unmap_area_pte(),
vmalloc.c:map_area_pte(), and mprotect.c:change_pte_range()

The latter could definitely explain the behavior you are seeing on
ppc64.

  reply	other threads:[~2005-02-27  3:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-24  4:07 [PATCH] set_pte() part 2 arch usage David S. Miller
2005-02-24  5:18 ` Benjamin Herrenschmidt
2005-02-24 22:36   ` David S. Miller
2005-02-25  5:32     ` Benjamin Herrenschmidt
2005-02-25  7:20       ` Benjamin Herrenschmidt
2005-02-25  7:57         ` David S. Miller
2005-02-25 18:37         ` David S. Miller
2005-02-26  0:56           ` Benjamin Herrenschmidt
2005-02-27  3:09             ` David S. Miller [this message]
2005-02-27  5:19               ` David S. Miller
2005-03-01  1:45                 ` Benjamin Herrenschmidt
2005-03-01 23:02                   ` David S. Miller
2005-03-01  2:22                 ` Benjamin Herrenschmidt
2005-03-01 23:32                   ` David S. Miller
2005-02-27  9:35               ` Benjamin Herrenschmidt
2005-02-28  4:14                 ` David S. Miller

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=20050226190943.7aa031e2.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=benh@kernel.crashing.org \
    --cc=linux-arch@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.