Only send a speedup when there's a shortage. While this is a little racy, lost
races aren't a big deal for this function. If there's a shorage just popping up
after we check these values, then we'll catch it next time. If there's a
shortage that's just clearing up, we may do some work at the lower layers a
little sooner than we otherwise would have. Sicne shortages are relatively rare
events, both races are acceptable.
Details
Details
Without these, I'm seeing way too many speedups.
I tested this with:
dtrace -n 'fbt::softdep_send_speedup:entry {stack()}'
before the change, I saw it called all the time. After, it wasn't called at all.
Thanks for chuck for noticing the myriad of issues here. Other reviews will fix the other ones.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable