diff options
| author | oster <oster@NetBSD.org> | 1999-01-26 04:40:03 +0000 |
|---|---|---|
| committer | oster <oster@NetBSD.org> | 1999-01-26 04:40:03 +0000 |
| commit | 58f7de552d1a4a4fa5eb9aeb0698f4bbdd1a6128 (patch) | |
| tree | e74f5e8663f0b5ab3973131bb407edfd08730992 /sys/dev/raidframe | |
| parent | 46e8a53c3336f4664c71cc2f65de81a303286258 (diff) | |
Nuke more bits of RAIDframe "demo" code. We're not "demoing" here,
we're doing the Real Thing!
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_archs.h | 7 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_demo.h | 58 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_driver.c | 6 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_optnames.h | 11 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_reconmap.c | 14 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_reconstruct.c | 43 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_states.c | 5 |
7 files changed, 6 insertions, 138 deletions
diff --git a/sys/dev/raidframe/rf_archs.h b/sys/dev/raidframe/rf_archs.h index 0d7d344e82e..5442deaf6bd 100644 --- a/sys/dev/raidframe/rf_archs.h +++ b/sys/dev/raidframe/rf_archs.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_archs.h,v 1.2 1999/01/26 02:33:50 oster Exp $ */ +/* $NetBSD: rf_archs.h,v 1.3 1999/01/26 04:40:03 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -60,11 +60,6 @@ * Khalil's performance-displaying demo stuff. * Relies on CMU meter tools. */ -#ifndef KERNEL -#if RF_CMU_PDL > 0 -#define RF_DEMO 1 -#endif /* RF_CMU_PDL > 0 */ -#endif /* !KERNEL */ #define RF_INCLUDE_EVENODD 1 diff --git a/sys/dev/raidframe/rf_demo.h b/sys/dev/raidframe/rf_demo.h deleted file mode 100644 index 68ee422335b..00000000000 --- a/sys/dev/raidframe/rf_demo.h +++ /dev/null @@ -1,58 +0,0 @@ -/* $NetBSD: rf_demo.h,v 1.2 1999/01/26 02:33:55 oster Exp $ */ -/* - * Copyright (c) 1995 Carnegie-Mellon University. - * All rights reserved. - * - * Author: Mark Holland, Khalil Amiri - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -/* rf_demo.h - * some constants for demo'ing software - */ - -#ifndef _RF__RF_DEMO_H_ -#define _RF__RF_DEMO_H_ - -#include "rf_types.h" - -#define RF_DEMO_METER_WIDTH 300 /* how wide each meter is */ -#define RF_DEMO_METER_HEIGHT 150 /* how tall */ -#define RF_DEMO_METER_SPACING 15 /* how much space between horizontally */ -#define RF_DEMO_METER_VSPACE 20 /* how much space between vertically */ -#define RF_DEMO_FAULT_FREE 0 -#define RF_DEMO_DEGRADED 1 -#define RF_DEMO_RECON 2 - -void rf_startup_iops_demo(int meter_vpos, int C, int G); -void rf_update_user_stats(int resptime); -void rf_update_disk_iops(int val); -void rf_meter_update_thread(void); -void rf_finish_iops_demo(void); -void rf_demo_update_mode(int arg_mode); -void rf_startup_recon_demo(int meter_vpos, int C, int G, int init); -void rf_update_recon_meter(int val); -void rf_finish_recon_demo(struct timeval *etime); - -extern int rf_demo_op_mode; - -#endif /* !_RF__RF_DEMO_H_ */ diff --git a/sys/dev/raidframe/rf_driver.c b/sys/dev/raidframe/rf_driver.c index 170e22f376e..bc13e51679b 100644 --- a/sys/dev/raidframe/rf_driver.c +++ b/sys/dev/raidframe/rf_driver.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_driver.c,v 1.4 1999/01/26 02:33:56 oster Exp $ */ +/* $NetBSD: rf_driver.c,v 1.5 1999/01/26 04:40:03 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -95,10 +95,6 @@ #include <io/cam/pdrv.h> #endif /* DKUSAGE > 0 */ -#if RF_DEMO > 0 -#include "rf_demo.h" -#endif /* RF_DEMO > 0 */ - /* rad == RF_RaidAccessDesc_t */ static RF_FreeList_t *rf_rad_freelist; #define RF_MAX_FREE_RAD 128 diff --git a/sys/dev/raidframe/rf_optnames.h b/sys/dev/raidframe/rf_optnames.h index 671c455c909..c59116e1d78 100644 --- a/sys/dev/raidframe/rf_optnames.h +++ b/sys/dev/raidframe/rf_optnames.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_optnames.h,v 1.2 1999/01/26 02:33:59 oster Exp $ */ +/* $NetBSD: rf_optnames.h,v 1.3 1999/01/26 04:40:03 oster Exp $ */ /* * rf_optnames.h */ @@ -116,12 +116,3 @@ RF_DBG_OPTION(totalInCoreLogCapacity,1024*1024) /* target bytes available for in #if DFSTRACE > 0 RF_DBG_OPTION(DFSTraceAccesses,0) #endif /* DFSTRACE > 0 */ - -#if RF_DEMO > 0 -RF_DBG_OPTION(demoMeterHpos,0) /* horizontal position of meters for demo mode */ -RF_DBG_OPTION(demoMeterTag,0) -RF_DBG_OPTION(demoMeterVpos,0) /* vertical position of meters for demo mode */ -RF_DBG_OPTION(demoMode,0) -RF_DBG_OPTION(demoSMM,0) -RF_DBG_OPTION(demoSuppressReconInitVerify,0) /* supress initialization & verify for recon */ -#endif /* RF_DEMO > 0 */ diff --git a/sys/dev/raidframe/rf_reconmap.c b/sys/dev/raidframe/rf_reconmap.c index 008044ea0c2..5caeaafa605 100644 --- a/sys/dev/raidframe/rf_reconmap.c +++ b/sys/dev/raidframe/rf_reconmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconmap.c,v 1.2 1999/01/26 02:34:01 oster Exp $ */ +/* $NetBSD: rf_reconmap.c,v 1.3 1999/01/26 04:40:03 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -37,9 +37,6 @@ #include <sys/time.h> #include "rf_general.h" #include "rf_utils.h" -#if RF_DEMO > 0 -#include "rf_demo.h" -#endif /* RF_DEMO > 0 */ #include "rf_sys.h" /* special pointer values indicating that a reconstruction unit @@ -372,16 +369,7 @@ void rf_PrintReconSchedule(mapPtr, starttime) if (new_pctg != old_pctg) { RF_GETTIME(tv); RF_TIMEVAL_DIFF(starttime, &tv, &diff); -#if RF_DEMO > 0 - if (rf_demoMode) { - rf_update_recon_meter(new_pctg); - } - else { - printf("%d %d.%06d\n",new_pctg, diff.tv_sec, diff.tv_usec); - } -#else /* RF_DEMO > 0 */ printf("%d %d.%06d\n",(int)new_pctg, (int)diff.tv_sec, (int)diff.tv_usec); -#endif /* RF_DEMO > 0 */ old_pctg = new_pctg; } } diff --git a/sys/dev/raidframe/rf_reconstruct.c b/sys/dev/raidframe/rf_reconstruct.c index 3c41115986e..049778ea089 100644 --- a/sys/dev/raidframe/rf_reconstruct.c +++ b/sys/dev/raidframe/rf_reconstruct.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconstruct.c,v 1.2 1999/01/26 02:34:01 oster Exp $ */ +/* $NetBSD: rf_reconstruct.c,v 1.3 1999/01/26 04:40:03 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -54,10 +54,6 @@ #include "rf_shutdown.h" #include "rf_sys.h" -#if RF_DEMO > 0 -#include "rf_demo.h" -#endif /* RF_DEMO > 0 */ - #include "rf_kintf.h" /* setting these to -1 causes them to be set to their default values if not set by debug options */ @@ -333,13 +329,7 @@ int rf_ReconstructFailedDiskBasic(raidPtr, row, col) return(ENOSPC); } -#if RF_DEMO > 0 - if (!rf_demoMode) { -#endif /* RF_DEMO > 0 */ printf("RECON: initiating reconstruction on row %d col %d -> spare at row %d col %d\n",row, col, srow, scol); -#if RF_DEMO > 0 - } -#endif /* RF_DEMO > 0 */ } RF_UNLOCK_MUTEX(raidPtr->mutex); @@ -353,13 +343,6 @@ int rf_ReconstructFailedDiskBasic(raidPtr, row, col) reconDesc->reconExecTimerRunning = 0; reconDesc->reconExecTicks = 0; reconDesc->maxReconExecTicks = 0; -#if RF_DEMO > 0 && !defined(SIMULATE) - if (rf_demoMode) { - char cbuf[10]; - printf("About to start reconstruction, hit return to continue:"); - gets(cbuf); - } -#endif /* RF_DEMO > 0 && !SIMULATE */ rc = rf_ContinueReconstructFailedDisk(reconDesc); return(rc); } @@ -418,13 +401,6 @@ int rf_ContinueReconstructFailedDisk(reconDesc) RF_UNLOCK_MUTEX(raidPtr->mutex); RF_GETTIME(raidPtr->reconControl[row]->starttime); -#if RF_DEMO > 0 - if (rf_demoMode) { - rf_demo_update_mode(RF_DEMO_RECON); - rf_startup_recon_demo(rf_demoMeterVpos, raidPtr->numCol, - raidPtr->Layout.numDataCol+raidPtr->Layout.numParityCol, 0); - } -#endif /* RF_DEMO > 0 */ /* now start up the actual reconstruction: issue a read for each surviving disk */ rf_start_cpu_monitor(); @@ -460,11 +436,7 @@ int rf_ContinueReconstructFailedDisk(reconDesc) if (ProcessReconEvent(raidPtr, row, event)) reconDesc->numDisksDone++; raidPtr->reconControl[row]->percentComplete = 100 - (rf_UnitsLeftToReconstruct(mapPtr) * 100 / mapPtr->totalRUs); -#if RF_DEMO > 0 - if (rf_prReconSched || rf_demoMode) -#else /* RF_DEMO > 0 */ if (rf_prReconSched) -#endif /* RF_DEMO > 0 */ { rf_PrintReconSchedule(raidPtr->reconControl[row]->reconMap, &(raidPtr->reconControl[row]->starttime)); } @@ -494,11 +466,7 @@ int rf_ContinueReconstructFailedDisk(reconDesc) (void) ProcessReconEvent(raidPtr, row, event); /* ignore return code */ raidPtr->reconControl[row]->percentComplete = 100 - (rf_UnitsLeftToReconstruct(mapPtr) * 100 / mapPtr->totalRUs); -#if RF_DEMO > 0 - if (rf_prReconSched || rf_demoMode) -#else /* RF_DEMO > 0 */ if (rf_prReconSched) -#endif /* RF_DEMO > 0 */ { rf_PrintReconSchedule(raidPtr->reconControl[row]->reconMap, &(raidPtr->reconControl[row]->starttime)); } @@ -544,12 +512,6 @@ int rf_ContinueReconstructFailedDisk(reconDesc) rf_ResumeNewRequests(raidPtr); -#if RF_DEMO > 0 - if (rf_demoMode) { - rf_finish_recon_demo(&elpsd); - } - else { -#endif /* RF_DEMO > 0 */ printf("Reconstruction of disk at row %d col %d completed and spare disk reassigned\n", row, col); xor_s = raidPtr->accumXorTimeUs/1000000; xor_resid_us = raidPtr->accumXorTimeUs%1000000; @@ -564,9 +526,6 @@ int rf_ContinueReconstructFailedDisk(reconDesc) printf("Total head-sep stall count was %d\n", (int)reconDesc->hsStallCount); #endif /* RF_RECON_STATS > 0 */ -#if RF_DEMO > 0 - } -#endif /* RF_DEMO > 0 */ rf_FreeReconControl(raidPtr, row); RF_Free(raidPtr->recon_tracerecs, raidPtr->numCol * sizeof(RF_AccTraceEntry_t)); FreeReconDesc(reconDesc); diff --git a/sys/dev/raidframe/rf_states.c b/sys/dev/raidframe/rf_states.c index 7adfed54e01..5d4a66e0a19 100644 --- a/sys/dev/raidframe/rf_states.c +++ b/sys/dev/raidframe/rf_states.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_states.c,v 1.4 1999/01/26 02:34:02 oster Exp $ */ +/* $NetBSD: rf_states.c,v 1.5 1999/01/26 04:40:03 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -160,9 +160,6 @@ void rf_ContinueDagAccess (RF_DagList_t *dagList) /* when a dag fails, mark desc status as bad and allow all other dags * in the desc to execute to completion. then, free all dags and start over */ desc->status = 1; /* bad status */ -#if RF_DEMO > 0 - if (!rf_demoMode) -#endif /* RF_DEMO > 0 */ { printf("[%d] DAG failure: %c addr 0x%lx (%ld) nblk 0x%x (%d) buf 0x%lx\n", desc->tid, desc->type, (long)desc->raidAddress, |
