Add IRQ placement-only and ithread-only API variants. intr_event_bind
has been extended with sibling methods, as it has many more callsites in
existing code.
Details
- Reviewers
jhb kib mav adrian - Commits
- rS317756: Extend cpuset_get/setaffinity() APIs
(I moved the mutually unobjectionable part of D10435 to its own review.)
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 9054 Build 9464: arc lint + arc unit
Event Timeline
This is just the API and not any cpuset changes. Guess we can do the userland side of it later!
Overall it is fine, see some trivial nits inline.
sys/kern/kern_intr.c | ||
---|---|---|
294 | Use bool for boolean arguments ? | |
344 | This is racy beyond any tolerance. Two parallel setaffinity or one set and one get are not supposed to work correctly, it seems. I believe a low-tech but sufficient solution is to add global perhaps sleepable (sx) lock around both intr_setaffinity and intr_getaffinity. This is a subject for a separate patch, of course. | |
sys/sys/cpuset.h | ||
86 | I suggest CPU_WHICH_INTRHANDLER or similar name. IRQ_ONLY is puzzling. |
Later, you would want to update cpuset(2).
sys/kern/kern_intr.c | ||
---|---|---|
328 | If you write this as if (error != 0 && bindithread) { you can de-indent the body by one level. |
sys/kern/kern_intr.c | ||
---|---|---|
328 | Sort of. The return (error) still needs to happen if error != 0 && !bindithread. So that would have to change into an } else if () {. And there's no compelling reason yet — none of the extra indented lines wrap. I'll leave it as-is for now. |
sys/kern/kern_intr.c | ||
---|---|---|
328 | If would be if (error != 0 && !bindithread) { ... } if (error != 0) return (error); Ok. |