[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080126001128.GB24559@elte.hu>
Date: Sat, 26 Jan 2008 01:11:28 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Jeremy Fitzhardinge <jeremy@...p.org>
Cc: Keir Fraser <Keir.Fraser@...cam.ac.uk>,
"H. Peter Anvin" <hpa@...or.com>,
LKML <linux-kernel@...r.kernel.org>, Andi Kleen <ak@...e.de>,
Jan Beulich <jbeulich@...ell.com>,
Eduardo Pereira Habkost <ehabkost@...hat.com>,
Ian Campbell <ijc@...lion.org.uk>,
William Irwin <wli@...omorphy.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 11 of 11] x86: defer cr3 reload when doing pud_clear()
* Jeremy Fitzhardinge <jeremy@...p.org> wrote:
> Is there any guide about the tradeoff of when to use invlpg vs
> flushing the whole tlb? 1 page? 10? 90% of the tlb?
i made measurements some time ago and INVLPG was quite uniformly slow on
all important CPU types - on the order of 100+ cycles. It's probably
microcode. With a cr3 flush being on the order of 200-300 cycles (plus
any add-on TLB miss costs - but those are amortized quite well as long
as the pagetables are well cached - which they usually are on today's
2MB-ish L2 caches), the high cost of INVLPG rarely makes it worthwile
for anything more than a few pages.
so INVLPG makes sense for pagetable fault realated single-address
flushes, but they rarely make sense for range flushes. (and that's how
Linux uses it)
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists