Initialize ubchist earlier.

This commit is contained in:
riastradh 2014-07-07 20:14:43 +00:00
parent 0e72130a35
commit 4fa7e6020b
3 changed files with 13 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: init_main.c,v 1.456 2014/05/19 23:33:19 rmind Exp $ */
/* $NetBSD: init_main.c,v 1.457 2014/07/07 20:14:43 riastradh Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@ -97,7 +97,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.456 2014/05/19 23:33:19 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.457 2014/07/07 20:14:43 riastradh Exp $");
#include "opt_ddb.h"
#include "opt_ipsec.h"
@ -307,6 +307,7 @@ main(void)
evcnt_init();
uvm_init();
ubchist_init();
kcpuset_sysinit();
prop_kern_init();

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_bio.c,v 1.80 2013/10/25 20:23:33 martin Exp $ */
/* $NetBSD: uvm_bio.c,v 1.81 2014/07/07 20:14:43 riastradh Exp $ */
/*
* Copyright (c) 1998 Chuck Silvers.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.80 2013/10/25 20:23:33 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.81 2014/07/07 20:14:43 riastradh Exp $");
#include "opt_uvmhist.h"
#include "opt_ubc.h"
@ -210,6 +210,12 @@ ubc_init(void)
UVM_ADV_RANDOM, UVM_FLAG_NOMERGE)) != 0) {
panic("ubc_init: failed to map ubc_object");
}
}
void
ubchist_init(void)
{
UVMHIST_INIT(ubchist, 300);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_extern.h,v 1.190 2014/05/22 14:01:46 riastradh Exp $ */
/* $NetBSD: uvm_extern.h,v 1.191 2014/07/07 20:14:43 riastradh Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@ -545,6 +545,7 @@ void uao_reference(struct uvm_object *);
/* uvm_bio.c */
void ubc_init(void);
void ubchist_init(void);
void * ubc_alloc(struct uvm_object *, voff_t, vsize_t *, int,
int);
void ubc_release(void *, int);