Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
When looking at this again, I couldn't see the issue you mentioned in IRC last night John:
[21:24] <BigSpoon> it means it only does it
[21:24] <BigSpoon> if you scan within the window
[21:24] <BigSpoon> it should be >
[21:24] <BigSpoon> not <
Have I not had enough coffee this morning?
The overflow issue was there, which I've addressed in this revision.
I had it backwards, the condition is correct. However, this is not the correct way to handle wrapping. You should always compute a tick delta and compare that instead. That is:
ticks - lowmem_ticks >= lowmem_period * hz
Will would prefer you to do a divide to avoid overflow, so that would become:
(ticks - lowmem_ticks) / hz >= lowmem_period
I think this is also easier to read and parse than the current expression (is the amount of time that has passed greater than that the throttle period?)
Yep got confused looking for the range issue, updated with the recommended method for signed vals.