From: jmerkey@wolfmountaingroup.com
To: linux-kernel@vger.kernel.org
Subject: TLB IPI FLushTLB vs Invl Page
Date: Tue, 2 Sep 2008 14:01:09 -0600 (MDT) [thread overview]
Message-ID: <1100.69.2.248.210.1220385669.squirrel@webmail.wolfmountaingroup.com> (raw)
Analysis on this one has been done by others on other OS's. Results are:
NMI IPI which results in TLB flush
mov eax, cr3
mov cr3,eax
vs.
invlpg [page]
TLB flushing always blows out the TLB and it usually takes 150 clocks
(cumulative over time) for the processor to recover. invlpage is more
lightweight but takes around 100 clocks for the system to recover.
Easiest way to measure the two is to write a short program loop that does
something like (holding the processor into this loop):
while (1)
{
FlushTLB();
counter++;
}
vs.
while (1)
{
Invlpg(page);
counter++;
}
and compare which one counts higher on all processors -- this one is less
overhead on the bus overall.
I did the same tests many years ago and compared these two instructions.
results were invlpg saves you on performance but overall was no better
than flushing the entire TLB since you end up ending more IPI's on average.
Jeff
reply other threads:[~2008-09-02 20:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1100.69.2.248.210.1220385669.squirrel@webmail.wolfmountaingroup.com \
--to=jmerkey@wolfmountaingroup.com \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®