On 10/29/24 08:05, Jeff Law wrote:
> 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.

Right, this characterization wasn't my first choice either but from earlier 
discussions on the list it seems the existing behavior was "as-designed"
and more of a feature than anti-feature. So I wanted this patch to come out as 
neutral vs. being pejorative (as in it makes spilling less aggressive)...

>> 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?

I agree the NARROW/WIDE stuff is obfuscating things in technicalities.
How about  TARGET_SCHED_PRESSURE_SPILL_AGGRESSIVE with true (default) being 
existing behavior and false being new semantics.
Its a bit verbose but I think clear enough.


> 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.

Oh gosh. Get well soon !

Thx,
-Vineet

Reply via email to