diff options
| author | oster <oster@NetBSD.org> | 2004-03-08 02:25:27 +0000 |
|---|---|---|
| committer | oster <oster@NetBSD.org> | 2004-03-08 02:25:27 +0000 |
| commit | bce42a309519fd7c3c65bf79438aaf630f1a970b (patch) | |
| tree | 53cc1e86018ca182e47280a7e01eb6dc39b75d27 /sys/dev/raidframe | |
| parent | 8cbd53826ebc80ac514b6b092b7f6ab94edd5a86 (diff) | |
Move pss_pool to rf_pools. Will save a bit of extra memory at
run-time, and we can only do one reconstruction at a time anyway.
Nuke pss_issued_pool - move it to an internal structure in pss.
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_netbsd.h | 4 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_psstatus.c | 19 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_psstatus.h | 4 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_raid.h | 4 |
4 files changed, 12 insertions, 19 deletions
diff --git a/sys/dev/raidframe/rf_netbsd.h b/sys/dev/raidframe/rf_netbsd.h index b41015ea619..e80c32ef78d 100644 --- a/sys/dev/raidframe/rf_netbsd.h +++ b/sys/dev/raidframe/rf_netbsd.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsd.h,v 1.14 2004/03/07 22:15:19 oster Exp $ */ +/* $NetBSD: rf_netbsd.h,v 1.15 2004/03/08 02:25:27 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -74,6 +74,8 @@ struct RF_Pools_s { struct pool funclist; /* Function Lists */ struct pool mcpair; /* Mutex/Cond Pairs */ struct pool pda; /* Physical Disk Access structures */ + 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 */ diff --git a/sys/dev/raidframe/rf_psstatus.c b/sys/dev/raidframe/rf_psstatus.c index 2786147418f..b54c550e12e 100644 --- a/sys/dev/raidframe/rf_psstatus.c +++ b/sys/dev/raidframe/rf_psstatus.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_psstatus.c,v 1.26 2004/03/07 22:15:19 oster Exp $ */ +/* $NetBSD: rf_psstatus.c,v 1.27 2004/03/08 02:25:27 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -37,7 +37,7 @@ *****************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_psstatus.c,v 1.26 2004/03/07 22:15:19 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_psstatus.c,v 1.27 2004/03/08 02:25:27 oster Exp $"); #include <dev/raidframe/raidframevar.h> @@ -69,10 +69,8 @@ static void rf_ShutdownPSStatus(void *); static void rf_ShutdownPSStatus(void *arg) { - RF_Raid_t *raidPtr = (RF_Raid_t *) arg; - pool_destroy(&raidPtr->pss_pool); - pool_destroy(&raidPtr->pss_issued_pool); + pool_destroy(&rf_pools.pss); } int @@ -81,10 +79,8 @@ rf_ConfigurePSStatus(RF_ShutdownList_t **listp, RF_Raid_t *raidPtr, { raidPtr->pssTableSize = RF_PSS_DEFAULT_TABLESIZE; - rf_pool_init(&raidPtr->pss_pool, sizeof(RF_ReconParityStripeStatus_t), + rf_pool_init(&rf_pools.pss, sizeof(RF_ReconParityStripeStatus_t), "raidpsspl", RF_MIN_FREE_PSS, RF_MAX_FREE_PSS); - rf_pool_init(&raidPtr->pss_issued_pool, raidPtr->numCol * sizeof(char), - "raidpssissuedpl", RF_MIN_FREE_PSS, RF_MAX_FREE_PSS); rf_ShutdownCreate(listp, rf_ShutdownPSStatus, raidPtr); return (0); @@ -257,10 +253,8 @@ rf_AllocPSStatus(RF_Raid_t *raidPtr) { RF_ReconParityStripeStatus_t *p; - p = pool_get(&raidPtr->pss_pool, PR_WAITOK); + p = pool_get(&rf_pools.pss, PR_WAITOK); memset(p, 0, sizeof(RF_ReconParityStripeStatus_t)); - p->issued = pool_get(&raidPtr->pss_issued_pool, PR_WAITOK); - memset(p->issued, 0, raidPtr->numCol); return (p); } @@ -271,8 +265,7 @@ rf_FreePSStatus(RF_Raid_t *raidPtr, RF_ReconParityStripeStatus_t *p) RF_ASSERT(p->blockWaitList == NULL); RF_ASSERT(p->bufWaitList == NULL); - pool_put(&raidPtr->pss_issued_pool, p->issued); - pool_put(&raidPtr->pss_pool, p); + pool_put(&rf_pools.pss, p); } static void diff --git a/sys/dev/raidframe/rf_psstatus.h b/sys/dev/raidframe/rf_psstatus.h index 8b7b6486ab5..40c5f6bb0f9 100644 --- a/sys/dev/raidframe/rf_psstatus.h +++ b/sys/dev/raidframe/rf_psstatus.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_psstatus.h,v 1.7 2004/03/03 00:58:03 oster Exp $ */ +/* $NetBSD: rf_psstatus.h,v 1.8 2004/03/08 02:25:27 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -73,7 +73,7 @@ struct RF_ReconParityStripeStatus_s { int xorBufCount; /* num buffers waiting to be xored */ int blockCount; /* count of # proc that have blocked recon on * this parity stripe */ - char *issued; /* issued[i]==1 <=> column i has already + char issued[RF_MAXCOL]; /* issued[i]==1 <=> column i has already * issued a read request for the indicated RU */ RF_CallbackDesc_t *procWaitList; /* list of user procs waiting * for recon to be done */ diff --git a/sys/dev/raidframe/rf_raid.h b/sys/dev/raidframe/rf_raid.h index 8114ded3619..45da8a6ddec 100644 --- a/sys/dev/raidframe/rf_raid.h +++ b/sys/dev/raidframe/rf_raid.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raid.h,v 1.28 2004/03/08 01:59:26 oster Exp $ */ +/* $NetBSD: rf_raid.h,v 1.29 2004/03/08 02:25:27 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -229,8 +229,6 @@ struct RF_Raid_s { * PSS (Parity Stripe Status) stuff */ long pssTableSize; - struct pool pss_pool; - struct pool pss_issued_pool; /* * Reconstruction stuff |
