Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Pools are created way before the pool subsystem mut...
details: https://anonhg.NetBSD.org/src/rev/a8f5f446ace7
branches: trunk
changeset: 750488:a8f5f446ace7
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sun Jan 03 01:07:19 2010 +0000
description:
Pools are created way before the pool subsystem mutexes are
initialized.
Ignore also pool_allocator_lock while the system is in cold state.
When the system has left cold state, uvm_init() should have
also initialized the pool subsystem and the mutexes are
ready to use.
diffstat:
sys/kern/subr_pool.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r 6371ecf329be -r a8f5f446ace7 sys/kern/subr_pool.c
--- a/sys/kern/subr_pool.c Sat Jan 02 21:16:46 2010 +0000
+++ b/sys/kern/subr_pool.c Sun Jan 03 01:07:19 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_pool.c,v 1.179 2010/01/02 15:20:39 mlelstv Exp $ */
+/* $NetBSD: subr_pool.c,v 1.180 2010/01/03 01:07:19 mlelstv Exp $ */
/*-
* Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.179 2010/01/02 15:20:39 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.180 2010/01/03 01:07:19 mlelstv Exp $");
#include "opt_ddb.h"
#include "opt_pool.h"
@@ -666,7 +666,8 @@
palloc = &pool_allocator_nointr_fullpage;
}
#endif /* POOL_SUBPAGE */
- mutex_enter(&pool_allocator_lock);
+ if (!cold)
+ mutex_enter(&pool_allocator_lock);
if (palloc->pa_refcnt++ == 0) {
if (palloc->pa_pagesz == 0)
palloc->pa_pagesz = PAGE_SIZE;
@@ -681,7 +682,8 @@
pa_reclaim_register(palloc);
}
}
- mutex_exit(&pool_allocator_lock);
+ if (!cold)
+ mutex_exit(&pool_allocator_lock);
if (align == 0)
align = ALIGN(1);
Home |
Main Index |
Thread Index |
Old Index