Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_pagequeue.h
Show First 20 Lines • Show All 379 Lines • ▼ Show 20 Lines | |||||
void vm_domain_clear(struct vm_domain *vmd); | void vm_domain_clear(struct vm_domain *vmd); | ||||
int vm_domain_allocate(struct vm_domain *vmd, int req, int npages); | int vm_domain_allocate(struct vm_domain *vmd, int req, int npages); | ||||
/* | /* | ||||
* vm_pagequeue_domain: | * vm_pagequeue_domain: | ||||
* | * | ||||
* Return the memory domain the page belongs to. | * Return the memory domain the page belongs to. | ||||
*/ | */ | ||||
static inline struct vm_domain * | static inline struct vm_domain * | ||||
vm_pagequeue_domain(vm_page_t m) | vm_pagequeue_domain(vm_page_t m) | ||||
{ | { | ||||
return (VM_DOMAIN(vm_phys_domain(m))); | return (VM_DOMAIN(vm_phys_page_domain(m))); | ||||
} | } | ||||
alc: If I'm allowed to be nit-picky for the moment, I would observe that this function has nothing… | |||||
Done Inline ActionsThe naming of this file is kind of strange. vm_pagequeue.h's main purpose is to define struct vm_domain, which happens to embed the domain's page queues. We could perhaps rename it to vm_domain.h. I'm not sure what this particular function would logically be called, though. markj: The naming of this file is kind of strange. vm_pagequeue.h's main purpose is to define struct… | |||||
/* | /* | ||||
* Return the number of pages we need to free-up or cache | * Return the number of pages we need to free-up or cache | ||||
* A positive number indicates that we do not have enough free pages. | * A positive number indicates that we do not have enough free pages. | ||||
*/ | */ | ||||
static inline int | static inline int | ||||
vm_paging_target(struct vm_domain *vmd) | vm_paging_target(struct vm_domain *vmd) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 67 Lines • Show Last 20 Lines |
If I'm allowed to be nit-picky for the moment, I would observe that this function has nothing to do with page queues. :-) (To be clear, I'm not asking for a further change to this particular patch.)