codeplaysoftware / standards-proposals

Repository for publicly sharing proposals in various standards groups
Apache License 2.0
27 stars 17 forks source link

Add P2155r0: Policy property for describing adjacency #125

Closed AerialMantis closed 4 years ago

AerialMantis commented 4 years ago

Introduce a draft of the ISO C++ paper for proposing an execution policy property for describing the implications of adjacency in bulk algorithms. This paper is a continuation of P1436, taking in feedback from a discussion in SG1 at the Prague ISO C++ meeting.

Note, the motivation section is taken straight from P1436r2 so I plan to update that to refine it before submission. I also plan to add a changelog that will link back to P1436.

AerialMantis commented 4 years ago

Thanks for the feedback @mhoemmen!

rodgert commented 4 years ago

line 34: "thread which accesses, otherwise refereed to" Should be 'referred'

Should this sentence read - "The position of a memory allocation relative to the thread which accesses the memory, otherwise referred to as memory affinity, can have a significant impact on the performance of concurrent applications." ?

line 37: a nit, "some larger systems" seems to downplay the ubiquitous nature of NUMA architectures, any vanilla two socket server is going to have NUMA these days.

paragraph starting at line 43: this is really rather worse than "simple" false sharing, once we start to talk about NUMA. Not sure if we need to point out the issues with saturating node to node communication links here as well.

line 54: I assume 'process' here means the OS notion of process. Does this even matter, it's the thread affinities within a process that matter, generally. So "keeping a processes thread(s) bound to specific memory regions optimizes" ...

line 58: Is "fuel all the cores" what the kids are calling it these days? Maybe something like "is crucial to maximally utilizing cores and to exploit the full performance of the memory subsystem on NUMA architectures."

line 89: "should help computers" are we helping the computer, or are we helping the programmer help the computer? Maybe this is a nit, but it seems that since we are talking about a programming facility the thing we are helping is the programmer.

AerialMantis commented 4 years ago

Thanks very much for the feedback @rodgert! I've applied your suggestions.

Should this sentence read - "The position of a memory allocation relative to the thread which accesses the memory, otherwise referred to as memory affinity, can have a significant impact on the performance of concurrent applications." ?

Yes, thanks.

line 37: a nit, "some larger systems" seems to downplay the ubiquitous nature of NUMA architectures, any vanilla two socket server is going to have NUMA these days.

That's a good point, I've fixed this.

paragraph starting at line 43: this is really rather worse than "simple" false sharing, once we start to talk about NUMA. Not sure if we need to point out the issues with saturating node to node communication links here as well.

That's a good point, I have included that case as well.

line 54: I assume 'process' here means the OS notion of process. Does this even matter, it's the thread affinities within a process that matter, generally. So "keeping a processes thread(s) bound to specific memory regions optimizes" ...

Yes, that's more accurate, I'll use that.

line 58: Is "fuel all the cores" what the kids are calling it these days? Maybe something like "is crucial to maximally utilizing cores and to exploit the full performance of the memory subsystem on NUMA architectures."

I like this wording, I'll use this instead.

line 89: "should help computers" are we helping the computer, or are we helping the programmer help the computer? Maybe this is a nit, but it seems that since we are talking about a programming facility the thing we are helping is the programmer.

That's a good point, I agree that sounds better.

AerialMantis commented 4 years ago

Thank you everyone for the feedback, I have now submitted this for the mailing, so I will merge this.