Preallocate all of our FIBs. This needs more work, but currently avoids

a case where we could need more FIBs and try to allocate them inside an
interrupt handler, which is sub-par--a problem pointed out ages ago by ad@.
This commit is contained in:
briggs 2007-10-20 01:46:30 +00:00
parent 644890e99d
commit 1687b85a45
1 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: aacvar.h,v 1.9 2007/06/05 04:04:14 briggs Exp $ */
/* $NetBSD: aacvar.h,v 1.10 2007/10/20 01:46:30 briggs Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -104,8 +104,11 @@ struct aac_softc;
/*
* FIBs are allocated in page-size chunks and can grow up to the 512
* limit imposed by the hardware.
* XXX -- There should be some way to allocate these as-needed without
* allocating them at interrupt time. For now, though, allocate
* all that we'll ever need up-front.
*/
#define AAC_PREALLOCATE_FIBS 128
#define AAC_PREALLOCATE_FIBS(sc) ((sc)->sc_max_fibs)
/*
* Firmware messages are passed in the printf buffer.