Update cpu_work_per_thread calculation to better match cpu-benchmark#152
Update cpu_work_per_thread calculation to better match cpu-benchmark#152henricasanova merged 1 commit intomainfrom
Conversation
Signed-off-by: Steven Hahn <hahnse@ornl.gov>
|
I concur. The stress-ng code doesn't really batch the calculation. I mean, it's odd. I am not sure why they have this grouping iterations into groups of 16384, but based on the stress-ng code you highlight, the total number of iterations is |
henricasanova
left a comment
There was a problem hiding this comment.
looks reasonable to me.
I think it's trying to reduce calls to |
|
yes, perhaps. But for a stresser benchmark, IO wouldn't think that avoiding function call overheads would be a thing, since the compute unit could be defined simply as compute something and call that function. anyway. it's all merged in :) |
cpu-benchmark calculated 1000000 points per unit of cpu_work. In contrast, stress-ng's input is in units of 1 point.
I thought stress-ng batched the calculation in units of 16384 points, but that doesn't appear to be the case.
https://github.com/ColinIanKing/stress-ng/blob/c6952a9ececa120975f84f3ca969bd3c258c77ef/stress-monte-carlo.c#L333