mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Andrea Arcangeli <andrea@suse.de>
Cc: Linus Torvalds <torvalds@osdl.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	Rik van Riel <riel@surriel.com>, Andrew Morton <akpm@osdl.org>
Subject: Re: Page aging broken in 2.6
Date: Sat, 27 Dec 2003 16:02:05 +1100	[thread overview]
Message-ID: <1072501324.15477.116.camel@gaston> (raw)
In-Reply-To: <20031227023752.GF1676@dualathlon.random>


> Returning to the "how to flush the tlb after clearing the young bit", at
> least on the x86 I find more desiderable to flush based on mm (in UP
> that's the most efficient and it provides an accurate behaviour, in SMP
> it maybe still to costly but sure a lot less costly than a broadcast per
> pte).  In 2.4 with the pagetable scan the flush per mm is
> strightforward and  it provides a very high probability of optimizing
> away an huge lot of spurious IPI broadcast. But even in 2.6 the vm is
> unmapping stuff with some aggressive clustering algorithm so that when
> it starts umapping stuff it drops quite some stuff and there's still a
> relevant probability that only a few mm have to be flushed, which in SMP
> can decrease a lot the need of IPIs.  Not sure how these flush_tlb_mm
> ideas translates for ppc though.

Since we use the hash as a TLB cache, we need to evict things from
it where you would do a flush_tlb. A flush_tlb_mm (or a range) is
fairly expensive. We have to calculate the hash value for each page
and evict them all. Also, the "nice" thing with this hash is since
we have the vsid's (kind of address space number), we can hold
many processes translations in there for a long time.

On the other hand, we don't need IPIs for any kind of flush (the
actual TLB flushes that we perform after evicting the hash entries
do broadcast in HW).

> The dirty and accessed bitflags instead are quite a different matter
> w.r.t to tlb flushing, we can't defer the tlb flush after atomically
> clearing the pte in smp while we clear the dirty bit. the tlb shootdown
> is the clustered version of that. the shootdown run a broadcast IPI
> not more than every 508 pte freed per mm. For the same reason we can try
> to coalesce the tlb flush post-clear-young with an mm flush, we can
> achieve a similar coalescing without the no need of an exact tlb
> shootdown like in the pte freeing




  reply	other threads:[~2003-12-27  5:02 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-26  7:28 Benjamin Herrenschmidt
2003-12-26  7:40 ` Andrew Morton
2003-12-26  9:21   ` Arjan van de Ven
2003-12-26  9:58     ` Benjamin Herrenschmidt
2003-12-26 19:44     ` Davide Libenzi
2003-12-26  9:33   ` Russell King
2003-12-26 10:07     ` Benjamin Herrenschmidt
2003-12-26 17:59 ` Linus Torvalds
2003-12-26 23:55   ` Benjamin Herrenschmidt
2003-12-27  0:35     ` Linus Torvalds
2003-12-27  0:44       ` Benjamin Herrenschmidt
2003-12-27  0:53         ` Linus Torvalds
2003-12-27  0:59           ` Linus Torvalds
2003-12-27  1:03           ` Benjamin Herrenschmidt
2003-12-27  2:37             ` Andrea Arcangeli
2003-12-27  5:02               ` Benjamin Herrenschmidt [this message]
2003-12-27 10:16               ` William Lee Irwin III
2003-12-27  2:47           ` Rik van Riel
2003-12-27  3:00             ` Andrew Morton
2003-12-27  3:31               ` Rik van Riel
2003-12-27  3:54               ` Linus Torvalds
2003-12-27 16:34                 ` Martin J. Bligh
2003-12-27 23:07               ` Roger Luethi
2003-12-27 23:55                 ` William Lee Irwin III
2003-12-28 11:23                   ` Roger Luethi
2003-12-28 16:35                     ` William Lee Irwin III
2003-12-28 17:15                       ` Roger Luethi
2003-12-28  0:04                 ` Andrew Morton
2003-12-28 11:58                   ` Roger Luethi
2003-12-27  1:41       ` Andrea Arcangeli
2003-12-26 10:45 Manfred Spraul

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=1072501324.15477.116.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=akpm@osdl.org \
    --cc=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@surriel.com \
    --cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome