- Don't add 1 to the result of DOMAINSET_FLS(). It uses 1-indexing already.
- If a domainset consists entirely of empty domains, return true without modifying the set. Otherwise it is impossible to use DOMAINSET_FIXED reliably in kernel code.
- Always flatten a _PREFER policy to _ROUNDROBIN if the preferred domain is empty. Previously we were doing this only when ds_cnt > 1 after removing empty domains.
Details
Details
On a 2-socket system:
- I set hw.physmem to avoid using memory attached to domain 1, and verified that we can boot.
- I removed the DIMMs attached to socket 0, and verified that the system boots and that all system memory is associated with domain 1.
Diff Detail
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 26115 Build 24635: arc lint + arc unit
Event Timeline
Comment Actions
Should there be a followup to restore _FIXED in amd64/mp_machdep.c after this commit ?
sys/kern/kern_cpuset.c | ||
---|---|---|
503–514 | Is this DOMAINSET_NAND ? |
Comment Actions
I don't think so: the allocations must succeed, so if _FIXED is used there must be a fallback to RR if the allocation fails. But this is exactly the semantics provided by _PREF, so we might as well just use _PREF.
In general, _FIXED is dangerous since a M_WAITOK+_FIXED allocation will wait forever if the domain is empty. Any users should ensure that some upper layer specifies M_NOWAIT, as in uma allocf implementations.
head/sys/kern/kern_cpuset.c | ||
---|---|---|
479 ↗ | (On Diff #61354) | Isn't this another instance of one of the mistakes that you fixed in domainset_empty_vm()? |
head/sys/kern/kern_cpuset.c | ||
---|---|---|
479 ↗ | (On Diff #61354) | Thanks, I will fix it. |