lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 2 Sep 2008 14:01:09 -0600 (MDT)
From:	jmerkey@...fmountaingroup.com
To:	linux-kernel@...r.kernel.org
Subject: TLB IPI FLushTLB vs Invl Page


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




--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ