On 10/20/24 1:40 PM, Vineet Gupta wrote:
Pressure senstive scheduling seems to prefer "wide" schedules with more
parallelism tending to more spills. This works better for in-order
cores [1][2].
I'm not really sure I'd characterize it that way, but I can also see how
you got to the wide vs narrow characterization.
In my mind what we're really doing is refining a bit of the pressure
reduction heuristic to more accurately reflect the result of issuing
insns that reduce pressure. So it's more like a level of how
aggressively we try to reduce pressure.
This patch allows for an opt-in target hook
TARGET_SCHED_PRESSURE_PREFER_NARROW:
- The default hook (returns false) preserves existing behavior of wider
schedules, more parallelism and potentially more spills.
- targets implementing the hook as true get the reverse effect.
I think we need a better name/description here. If SCHED_PRESSURE_MODEL
was a target hook then I'd probably be looking to make it an integer
indicating how aggressively to try and reduce pressure. So perhaps
TARGET_SCHED_PRESSURE_AGGRESSIVE? I don't particularly like it, but I
like it better than the PREFER_NARROW idea. Everything else I've come
up with has been scarily verbose.
TARGET_SCHED_PRESSURE_INCLUDE_PRESSURE_REDUCING_INSNS is on the absurd
side. Removing the second PRESSURE makes me think of vector reductions,
so I didn't want to do that :-)
Certainly open to more ideas on the naming, which I think will impact
the documentation & comments as well.
And to be 100% clear, no concerns with the behavior of the patch, it's
really just the naming convention, documentation/comments.
Thoughts?
Jeff
ps. I've got to get out of my bubble more often. Picked up a bug at
the RVI summit... Clearly my immune system isn't firing on all cylinders.