Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/raidframe Reconstruction Descriptors are only alloca...



details:   https://anonhg.NetBSD.org/src/rev/2f6d07d87d03
branches:  trunk
changeset: 573201:2f6d07d87d03
user:      oster <oster%NetBSD.org@localhost>
date:      Sat Jan 22 02:22:44 2005 +0000

description:
Reconstruction Descriptors are only allocated once per reconstruction,
and don't need their own pool or freelist or anything fancier than a
malloc/free.

diffstat:

 sys/dev/raidframe/rf_netbsd.h      |   3 +--
 sys/dev/raidframe/rf_reconstruct.c |  12 +++++-------
 2 files changed, 6 insertions(+), 9 deletions(-)

diffs (71 lines):

diff -r 43e4d5916b9b -r 2f6d07d87d03 sys/dev/raidframe/rf_netbsd.h
--- a/sys/dev/raidframe/rf_netbsd.h     Sat Jan 22 01:36:59 2005 +0000
+++ b/sys/dev/raidframe/rf_netbsd.h     Sat Jan 22 02:22:44 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_netbsd.h,v 1.20 2004/04/09 23:10:16 oster Exp $     */
+/*     $NetBSD: rf_netbsd.h,v 1.21 2005/01/22 02:22:44 oster Exp $     */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -81,7 +81,6 @@
        struct pool pss;         /* Parity Stripe Status */
        struct pool pss_issued;  /* Parity Stripe Status Issued */
        struct pool rad;         /* Raid Access Descriptors */
-       struct pool recond;      /* reconstruction descriptors */
        struct pool reconbuffer; /* reconstruction buffer (header) pool */
        struct pool revent;      /* reconstruct events */
        struct pool stripelock;  /* StripeLock */
diff -r 43e4d5916b9b -r 2f6d07d87d03 sys/dev/raidframe/rf_reconstruct.c
--- a/sys/dev/raidframe/rf_reconstruct.c        Sat Jan 22 01:36:59 2005 +0000
+++ b/sys/dev/raidframe/rf_reconstruct.c        Sat Jan 22 02:22:44 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_reconstruct.c,v 1.79 2005/01/18 03:29:51 oster Exp $        */
+/*     $NetBSD: rf_reconstruct.c,v 1.80 2005/01/22 02:22:44 oster Exp $        */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -33,7 +33,7 @@
  ************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.79 2005/01/18 03:29:51 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.80 2005/01/22 02:22:44 oster Exp $");
 
 #include <sys/time.h>
 #include <sys/buf.h>
@@ -143,7 +143,6 @@
 static void 
 rf_ShutdownReconstruction(void *ignored)
 {
-       pool_destroy(&rf_pools.recond);
        pool_destroy(&rf_pools.reconbuffer);
 }
 
@@ -151,8 +150,6 @@
 rf_ConfigureReconstruction(RF_ShutdownList_t **listp)
 {
 
-       rf_pool_init(&rf_pools.recond, sizeof(RF_RaidReconDesc_t),
-                    "rf_recond_pl", RF_MIN_FREE_RECOND, RF_MAX_FREE_RECOND);
        rf_pool_init(&rf_pools.reconbuffer, sizeof(RF_ReconBuffer_t),
                     "rf_reconbuffer_pl", RF_MIN_FREE_RECONBUFFER, RF_MAX_FREE_RECONBUFFER);
        rf_ShutdownCreate(listp, rf_ShutdownReconstruction, NULL);
@@ -168,7 +165,8 @@
 
        RF_RaidReconDesc_t *reconDesc;
 
-       reconDesc = pool_get(&rf_pools.recond, PR_WAITOK);
+       RF_Malloc(reconDesc, sizeof(RF_RaidReconDesc_t),
+                 (RF_RaidReconDesc_t *));
        reconDesc->raidPtr = raidPtr;
        reconDesc->col = col;
        reconDesc->spareDiskPtr = spareDiskPtr;
@@ -194,7 +192,7 @@
 #if (RF_RECON_STATS > 0) || defined(KERNEL)
        printf("\n");
 #endif                         /* (RF_RECON_STATS > 0) || KERNEL */
-       pool_put(&rf_pools.recond, reconDesc);
+       RF_Free(reconDesc, sizeof(RF_RaidReconDesc_t));
 }
 
 



Home | Main Index | Thread Index | Old Index