From fcc4232f71d0f7b65b1a794d331c720192893f95 Mon Sep 17 00:00:00 2001 From: oster Date: Fri, 2 Aug 2002 03:32:56 +0000 Subject: Nuke stuff dealing with the experimental memChunk code. It's unused, and currently only contributing to bloat. --- sys/dev/raidframe/rf_dag.h | 17 +---------------- sys/dev/raidframe/rf_dagutils.c | 22 ++-------------------- 2 files changed, 3 insertions(+), 36 deletions(-) (limited to 'sys/dev/raidframe') diff --git a/sys/dev/raidframe/rf_dag.h b/sys/dev/raidframe/rf_dag.h index 99b1f1afbbf..8ae7eca0f58 100644 --- a/sys/dev/raidframe/rf_dag.h +++ b/sys/dev/raidframe/rf_dag.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dag.h,v 1.4 2001/10/04 15:58:51 oster Exp $ */ +/* $NetBSD: rf_dag.h,v 1.5 2002/08/02 03:32:56 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -152,8 +152,6 @@ typedef enum RF_DagStatus_e { } RF_DagStatus_t; #define RF_MAX_HDR_SUCC 1 -#define RF_MAXCHUNKS 10 - struct RF_DagHeader_s { RF_DagStatus_t status; /* status of this DAG */ int numSuccedents; /* DAG may be a tree, i.e. may have > 1 root */ @@ -180,19 +178,6 @@ struct RF_DagHeader_s { * is for */ void *bp; /* the bp for this I/O passed down from the * file system. ignored outside kernel */ - - RF_ChunkDesc_t *memChunk[RF_MAXCHUNKS]; /* experimental- Chunks of - * memory to be retained upon - * DAG free for re-use */ - int chunkIndex; /* the idea is to avoid calls to alloc and - * free */ - - RF_ChunkDesc_t **xtraMemChunk; /* escape hatch which allows - * SelectAlgorithm to merge memChunks - * from several dags */ - int xtraChunkIndex; /* number of ptrs to valid chunks */ - int xtraChunkCnt; /* number of ptrs to chunks allocated */ - }; struct RF_DagList_s { diff --git a/sys/dev/raidframe/rf_dagutils.c b/sys/dev/raidframe/rf_dagutils.c index 5957831c00b..defaefcffbd 100644 --- a/sys/dev/raidframe/rf_dagutils.c +++ b/sys/dev/raidframe/rf_dagutils.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagutils.c,v 1.13 2002/07/13 20:14:34 oster Exp $ */ +/* $NetBSD: rf_dagutils.c,v 1.14 2002/08/02 03:32:56 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ *****************************************************************************/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_dagutils.c,v 1.13 2002/07/13 20:14:34 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_dagutils.c,v 1.14 2002/08/02 03:32:56 oster Exp $"); #include @@ -160,27 +160,9 @@ rf_FreeDAG(dag_h) { RF_AccessStripeMapHeader_t *asmap, *t_asmap; RF_DagHeader_t *nextDag; - int i; while (dag_h) { nextDag = dag_h->next; - for (i = 0; dag_h->memChunk[i] && i < RF_MAXCHUNKS; i++) { - /* release mem chunks */ - rf_ReleaseMemChunk(dag_h->memChunk[i]); - dag_h->memChunk[i] = NULL; - } - - RF_ASSERT(i == dag_h->chunkIndex); - if (dag_h->xtraChunkCnt > 0) { - /* free xtraMemChunks */ - for (i = 0; dag_h->xtraMemChunk[i] && i < dag_h->xtraChunkIndex; i++) { - rf_ReleaseMemChunk(dag_h->xtraMemChunk[i]); - dag_h->xtraMemChunk[i] = NULL; - } - RF_ASSERT(i == dag_h->xtraChunkIndex); - /* free ptrs to xtraMemChunks */ - RF_Free(dag_h->xtraMemChunk, dag_h->xtraChunkCnt * sizeof(RF_ChunkDesc_t *)); - } rf_FreeAllocList(dag_h->allocList); for (asmap = dag_h->asmList; asmap;) { t_asmap = asmap; -- cgit