Page MenuHomeFreeBSD

sched: fix kern.sched.{4bsd,ule}.slice
AcceptedPublic

Authored by mchoo on Fri, Sep 4, 5:37 PM.
Tags
None
Referenced Files
F171190496: D59401.id185837.diff
Wed, Sep 9, 9:34 AM
F171178510: D59401.id186038.diff
Wed, Sep 9, 7:06 AM
F171175519: D59401.id186083.diff
Wed, Sep 9, 6:25 AM
F171168921: D59401.id186038.diff
Wed, Sep 9, 4:59 AM
F171127298: D59401.id186038.diff
Tue, Sep 8, 9:14 PM
F171097733: D59401.id185837.diff
Tue, Sep 8, 4:46 PM
F171096482: D59401.diff
Tue, Sep 8, 4:35 PM
Unknown Object (File)
Tue, Sep 8, 8:58 AM
Subscribers

Details

Reviewers
jhb
olce
Group Reviewers
scheduler
Summary

Fix three problems with kern.sched.{4bsd,ule}.slice:

  • Guarantee minimum slice is 1.
  • Recalculate hogticks on sysctl write.
  • For ULE, recalculate sched_slice_min on sysctl write.

MFC after: 2 weeks
MFC to: stable/14, stable/15
Sponsored by: FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
No Test Coverage
Build Status
Buildable 76611
Build 73494: arc lint + arc unit

Event Timeline

mchoo requested review of this revision.Fri, Sep 4, 5:37 PM
olce requested changes to this revision.Sun, Sep 6, 4:38 PM
olce added inline comments.
sys/kern/sched_4bsd.c
214

It's an internal function, no need to have 4bsd_ in the name.

Additionally, I'm planning to rename back all implementations of the current interface (to the rest of the kernel) to their prior names, that is, with ule_ or 4bsd_ removed, relatively soon (but there is EuroBSDCon next week).

224

Not necessary given the previous test. Replace by an assertion?

225–226

Could you please factor out the hogticks computation and setting in a separate function, and use it throughout the file (preferably as a separate commit)?

sys/kern/sched_ule.c
3490–3502

Same comments as for 4BSD.

This revision now requires changes to proceed.Sun, Sep 6, 4:38 PM

Remove unnecessary imax()

sys/kern/sched_4bsd.c
214

Since sysctl_kern_4bsd_quantum already has the namespace, I'll keep it for now. It can be renamed when the cleanup is done across 4BSD and ULE.

224

I think assertion is unnecessary here.

sys/kern/sched_ule.c
3499

D59408 adds imax() check for quantum sysctl.

sys/kern/sched_4bsd.c
214

Let's go right now in the intended direction. Additionally, having 4bsd_ here and no ule_ below is inconsistent. So please remove it.

mchoo added inline comments.
sys/kern/sched_4bsd.c
225–226

Done in D59471

This revision is now accepted and ready to land.Tue, Sep 8, 7:49 AM