The kmem API implementation attempts to ensure that all pages backing a
given large virtual page come from the same physical domain. Use the
virtual address to determine the domain.
Details
- Reviewers
alc cem kib jeff - Commits
- rS338830: Change the domain selection policy in kmem_back().
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
head/sys/vm/vm_kern.c | ||
---|---|---|
493 | I don't see where domain is initialized to zero when vm_ndomains is 1. |
head/sys/vm/vm_kern.c | ||
---|---|---|
493 | Thanks, fixed. |
head/sys/vm/vm_kern.c | ||
---|---|---|
504–507 | This doesn't honor the kernel policy, nor will it work once we have holes in the domain space. You should be looking at the ordered list of domains in the policy assigned to the kernel_object at a minimum. I think the best solution would be to run the normal iterator within this outer loop so it is run once per QUANTUM and is allowed to make its own decisions about domains. |
head/sys/vm/vm_kern.c | ||
---|---|---|
504–507 | The patch to handle empty domains has already been updated to handle kmem_back(). Using a domainset iterator here will require some refactoring since we don't hold the object lock; I will look into it. |
head/sys/vm/vm_kern.c | ||
---|---|---|
504–507 | BTW, none of the kmem_* functions hold the object lock when running the iterator, which will cause a problem similar to the one fixed by r338755 if we end up defining a kernel policy. |