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.
This commit is contained in:
oster 2004-03-08 02:25:27 +00:00
parent 8cbd53826e
commit bce42a3095
4 changed files with 12 additions and 19 deletions

View File

@ -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 */

View File

@ -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

View File

@ -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 */

View File

@ -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