* Clear the domain from the appropriate page level domainset. */
| 3093 | * Clear the domain from the appropriate page level domainset. |
| 3094 | */ |
| 3095 | void |
| 3096 | vm_domain_clear(struct vm_domain *vmd) |
| 3097 | { |
| 3098 | |
| 3099 | mtx_lock(&vm_domainset_lock); |
| 3100 | if (vmd->vmd_minset && !vm_paging_min(vmd)) { |
| 3101 | vmd->vmd_minset = 0; |
| 3102 | DOMAINSET_CLR(vmd->vmd_domain, &vm_min_domains); |
| 3103 | if (vm_min_waiters != 0) { |
| 3104 | vm_min_waiters = 0; |
| 3105 | wakeup(&vm_min_domains); |
| 3106 | } |
| 3107 | } |
| 3108 | if (vmd->vmd_severeset && !vm_paging_severe(vmd)) { |
| 3109 | vmd->vmd_severeset = 0; |
| 3110 | DOMAINSET_CLR(vmd->vmd_domain, &vm_severe_domains); |
| 3111 | if (vm_severe_waiters != 0) { |
| 3112 | vm_severe_waiters = 0; |
| 3113 | wakeup(&vm_severe_domains); |
| 3114 | } |
| 3115 | } |
| 3116 | |
| 3117 | /* |
| 3118 | * If pageout daemon needs pages, then tell it that there are |
| 3119 | * some free. |
| 3120 | */ |
| 3121 | if (vmd->vmd_pageout_pages_needed && |
| 3122 | vmd->vmd_free_count >= vmd->vmd_pageout_free_min) { |
| 3123 | wakeup(&vmd->vmd_pageout_pages_needed); |
| 3124 | vmd->vmd_pageout_pages_needed = 0; |
| 3125 | } |
| 3126 | |
| 3127 | /* See comments in vm_wait_doms(). */ |
| 3128 | if (vm_pageproc_waiters) { |
| 3129 | vm_pageproc_waiters = 0; |
| 3130 | wakeup(&vm_pageproc_waiters); |
| 3131 | } |
| 3132 | mtx_unlock(&vm_domainset_lock); |
| 3133 | } |
| 3134 | |
| 3135 | /* |
| 3136 | * Wait for free pages to exceed the min threshold globally. |
no test coverage detected