Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm uvm_pglistfree(): just use uvm_pagefree().
details: https://anonhg.NetBSD.org/src/rev/f086b2f9932d
branches: trunk
changeset: 972322:f086b2f9932d
user: ad <ad%NetBSD.org@localhost>
date: Sat May 23 20:22:42 2020 +0000
description:
uvm_pglistfree(): just use uvm_pagefree().
diffstat:
sys/uvm/uvm_pglist.c | 29 +++--------------------------
1 files changed, 3 insertions(+), 26 deletions(-)
diffs (57 lines):
diff -r bc5cad0de233 -r f086b2f9932d sys/uvm/uvm_pglist.c
--- a/sys/uvm/uvm_pglist.c Sat May 23 19:56:00 2020 +0000
+++ b/sys/uvm/uvm_pglist.c Sat May 23 20:22:42 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_pglist.c,v 1.81 2020/03/01 21:43:56 ad Exp $ */
+/* $NetBSD: uvm_pglist.c,v 1.82 2020/05/23 20:22:42 ad Exp $ */
/*-
* Copyright (c) 1997, 2019 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.81 2020/03/01 21:43:56 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.82 2020/05/23 20:22:42 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -560,37 +560,14 @@
void
uvm_pglistfree(struct pglist *list)
{
- struct pgfreelist *pgfl;
- struct pgflbucket *pgb;
struct vm_page *pg;
- int c, b;
KASSERT(!cpu_intr_p());
KASSERT(!cpu_softintr_p());
- /*
- * Lock the free list and free each page.
- */
-
- uvm_pgfl_lock();
while ((pg = TAILQ_FIRST(list)) != NULL) {
TAILQ_REMOVE(list, pg, pageq.queue);
- pg->flags = (pg->flags & PG_ZERO) | PG_FREE;
-#ifdef DEBUG
- pg->uobject = (void *)0xdeadbeef;
- pg->uanon = (void *)0xdeadbeef;
- if (pg->flags & PG_ZERO)
- uvm_pagezerocheck(pg);
-#endif /* DEBUG */
- c = VM_PGCOLOR(pg);
- b = uvm_page_get_bucket(pg);
- pgfl = &uvm.page_free[uvm_page_get_freelist(pg)];
- pgb = pgfl->pgfl_buckets[b];
- if (pg->flags & PG_ZERO)
- CPU_COUNT(CPU_COUNT_ZEROPAGES, 1);
- pgb->pgb_nfree++;
- LIST_INSERT_HEAD(&pgb->pgb_colors[c], pg, pageq.list);
+ uvm_pagefree(pg);
STAT_DECR(uvm_pglistalloc_npages);
}
- uvm_pgfl_unlock();
}
Home |
Main Index |
Thread Index |
Old Index