git: fe1165df4b77 - main - vm_pageout: Make vmd_oom a bool

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Thu, 09 Jan 2025 14:56:19 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=fe1165df4b776b14b21a04d2ef3fc4c46740c2f5

commit fe1165df4b776b14b21a04d2ef3fc4c46740c2f5
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-01-09 14:53:37 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-01-09 14:53:37 +0000

    vm_pageout: Make vmd_oom a bool
    
    No functional change intended.
    
    Reviewed by:    dougm, kib
    MFC after:      1 week
    Sponsored by:   Klara, Inc.
    Sponsored by:   Modirum MDPay
    Differential Revision:  https://reviews.freebsd.org/D48376
---
 sys/vm/vm_page.c      | 2 +-
 sys/vm/vm_pageout.c   | 6 +++---
 sys/vm/vm_pagequeue.h | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index f351295c1af5..f042d4767b36 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -460,7 +460,7 @@ vm_page_domain_init(int domain)
 	vmd->vmd_page_count = 0;
 	vmd->vmd_free_count = 0;
 	vmd->vmd_segs = 0;
-	vmd->vmd_oom = FALSE;
+	vmd->vmd_oom = false;
 	for (i = 0; i < PQ_COUNT; i++) {
 		pq = &vmd->vmd_pagequeues[i];
 		TAILQ_INIT(&pq->pq_pl);
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 28a54a83fd49..d26e04f60c00 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -1773,7 +1773,7 @@ vm_pageout_mightbe_oom(struct vm_domain *vmd, int page_shortage,
 		vmd->vmd_oom_seq++;
 	if (vmd->vmd_oom_seq < vm_pageout_oom_seq) {
 		if (vmd->vmd_oom) {
-			vmd->vmd_oom = FALSE;
+			vmd->vmd_oom = false;
 			atomic_subtract_int(&vm_pageout_oom_vote, 1);
 		}
 		return;
@@ -1788,7 +1788,7 @@ vm_pageout_mightbe_oom(struct vm_domain *vmd, int page_shortage,
 	if (vmd->vmd_oom)
 		return;
 
-	vmd->vmd_oom = TRUE;
+	vmd->vmd_oom = true;
 	old_vote = atomic_fetchadd_int(&vm_pageout_oom_vote, 1);
 	if (old_vote != vm_ndomains - 1)
 		return;
@@ -1806,7 +1806,7 @@ vm_pageout_mightbe_oom(struct vm_domain *vmd, int page_shortage,
 	 * memory condition is still there, due to vmd_oom being
 	 * false.
 	 */
-	vmd->vmd_oom = FALSE;
+	vmd->vmd_oom = false;
 	atomic_subtract_int(&vm_pageout_oom_vote, 1);
 }
 
diff --git a/sys/vm/vm_pagequeue.h b/sys/vm/vm_pagequeue.h
index af1183e63e53..23a3ea96d80c 100644
--- a/sys/vm/vm_pagequeue.h
+++ b/sys/vm/vm_pagequeue.h
@@ -257,7 +257,7 @@ struct vm_domain {
 
 	/* Paging control variables, used within single threaded page daemon. */
 	struct pidctrl vmd_pid;		/* Pageout controller. */
-	boolean_t vmd_oom;
+	bool vmd_oom;
 	u_int vmd_inactive_threads;
 	u_int vmd_inactive_shortage;		/* Per-thread shortage. */
 	blockcount_t vmd_inactive_running;	/* Number of inactive threads. */