Fenrus Linux went to the RC on March 17th; the graphs at http://linux.fenrus.org/performance/ show that there's modest increases in the cray and graphics-magick tests, and a regression in fhourstones... with everything else being basically flat.

03-22-2013, 03:15 PM

wargames

Quick question: when you say "support for new Broadwell instruction set", do you mean the compiler automatically chooses instructions from that instruction set when necessary ?

03-22-2013, 04:03 PM

startzz

"Support for the new Intel processor codename Broadwell with RDSEED, ADCX, ADOX, PREFETCHW is available through -madx, -mprfchw, -mrdseed command-line options."

03-22-2013, 08:09 PM

wargames

Quote:

Originally Posted by startzz

"Support for the new Intel processor codename Broadwell with RDSEED, ADCX, ADOX, PREFETCHW is available through -madx, -mprfchw, -mrdseed command-line options."

Not exactly what I meant... What I mean is if you enable the instructions, how does the compiler decide when to use them ? Because being specialized instructions, I don't see them being used for things like conditionals and simple math operations which are the most common used operations in a program. What I really mean is that everytime I have seen code optimized for a specific processor instruction set, the coding is done in assembler, not using a c/c++ compiler...

03-22-2013, 10:17 PM

ryao

Quote:

Originally Posted by wargames

Not exactly what I meant... What I mean is if you enable the instructions, how does the compiler decide when to use them ? Because being specialized instructions, I don't see them being used for things like conditionals and simple math operations which are the most common used operations in a program. What I really mean is that everytime I have seen code optimized for a specific processor instruction set, the coding is done in assembler, not using a c/c++ compiler...

In all likelihood, it does not. It would just have support for intrinsics to make it easier to use them. That is how support for many instructions is added.

03-23-2013, 07:22 AM

carewolf

Quote:

Originally Posted by wargames

Not exactly what I meant... What I mean is if you enable the instructions, how does the compiler decide when to use them ? Because being specialized instructions, I don't see them being used for things like conditionals and simple math operations which are the most common used operations in a program. What I really mean is that everytime I have seen code optimized for a specific processor instruction set, the coding is done in assembler, not using a c/c++ compiler...

Prefetch is pretty generic and has been supported in GCC for more than a decade and half since AMD introduced it in 3DNow!, so I fully expect GCC to be able to take advantage of that automatically.

03-23-2013, 10:06 AM

fenrus

prefetch

Quote:

Originally Posted by carewolf

Prefetch is pretty generic and has been supported in GCC for more than a decade and half since AMD introduced it in 3DNow!, so I fully expect GCC to be able to take advantage of that automatically.

The Prefetch instruction (and in this case "prefetchw") is almost always a loss. Hardware nowadays has pretty aggressive prefetchers that work on the actual access pattern, and those are very effective for most cases.

The problem is that for the cases where it's not (e.g. the ones hard to tell by a machine) are also the ones where the compiler will have a hard time adding their own prefetches. (there are some special cases in HPC and such where the human can know special things)

it's branch prediction hints all over again in many ways, where a broad use is damage because programmers know their own program not as well as the cpu does ;-)

03-23-2013, 11:24 AM

ryao

Quote:

Originally Posted by fenrus

The Prefetch instruction (and in this case "prefetchw") is almost always a loss. Hardware nowadays has pretty aggressive prefetchers that work on the actual access pattern, and those are very effective for most cases.

The problem is that for the cases where it's not (e.g. the ones hard to tell by a machine) are also the ones where the compiler will have a hard time adding their own prefetches. (there are some special cases in HPC and such where the human can know special things)

it's branch prediction hints all over again in many ways, where a broad use is damage because programmers know their own program not as well as the cpu does ;-)

If you set -mtune=<architecture>, then prefetchw might actually be useful. With that said, the only people that will benefit from it are those building software themselves (i.e. Gentoo users).