InvestorsHub Logo
Followers 21
Posts 14802
Boards Moderated 0
Alias Born 03/17/2003

Re: None

Tuesday, 09/06/2011 12:53:28 PM

Tuesday, September 06, 2011 12:53:28 PM

Post# of 151673
Looks like Linus isn't happy with a fix AMD proposed for a cache
aliasing problem that hurts Linux performance on Bulldozer:

http://us.generation-nt.com/answer/patch-x86-amd-correct-f15h-ic-aliasing-issue-help-204200361.html

At top of thread:

From: Borislav Petkov <borislav.petkov@amd.com>

This patch provides performance tuning for the "Bulldozer" CPU. With its
shared instruction cache there is a chance of generating an excessive
number of cache cross-invalidates when running specific workloads on the
cores of a compute module.

This excessive amount of cross-invalidations can be observed if cache
lines backed by shared physical memory alias in bits [14:12] of their
virtual addresses, as those bits are used for the index generation.

This patch addresses the issue by zeroing out the slice [14:12] of
the file mapping's virtual address at generation time, thus forcing
those bits the same for all mappings of a single shared library across
processes and, in doing so, avoids instruction cache aliases.


Later on Linus weighs in with:

Argh. This is a small disaster, you know that, right? Suddenly we have
user-visible allocation changes depending on which CPU you are running
on. I just hope that the address-space randomization has caught all
the code that depended on specific layouts.

And even with ASLR, I wouldn't be surprised if there are binaries out
there that "know" that they get dense virtual memory when they do
back-to-back allocations, even when they don't pass in the address
explicitly.

How much testing has AMD done with this change and various legacy
Linux distros? The 32-bit case in particular makes me nervous, that's
where I'd expect a higher likelihood of binaries that depend on the
layout.

You guys do realize that we had to disable ASLR on many machines?

So at a MINIMUM, I would say that this is acceptable only when the
process doing the allocation hasn't got ASLR disabled.


Oooopsie. I wonder if AMD designers didn't run enough real world
code through their Bulldozer uarch simulator early in the design
cycle when stuff is easy to change rather than carved in stone.

On another forum someone claimed this aliasing bug drops BD
performance by 3%.
Volume:
Day Range:
Bid:
Ask:
Last Trade Time:
Total Trades:
  • 1D
  • 1M
  • 3M
  • 6M
  • 1Y
  • 5Y
Recent INTC News