Subject: Re: wd.c patch to reduce kernel stack usage
To: None <bouyer@antioche.lip6.fr>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 06/29/2002 00:48:57
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
Subject: Re: wd.c patch to reduce kernel stack usage
Date: Fri, 28 Jun 2002 11:05:29 +0200
> On Thu, Jun 27, 2002 at 03:46:02PM -0700, Jason R Thorpe wrote:
> > On Thu, Jun 27, 2002 at 11:48:26PM +0200, Manuel Bouyer wrote:
> > 
> >  > This looks OK, although I'm not sure calling malloc here (from interrupt
> >  > context) is really better.
> > 
> > malloc() is safe for interrupt context use, so long as the interrupt
> > is blocked by splvm() (which IPL_BIO interrupts are).
> 
> Yes. I was just wondering the malloc overhead here was worth it for 256
> bytes, and if a better solution could not be found.

i think printing two-line messages per an error,
one from diskerr and another from wd.c itsself
can be alternative. doing like this, no buffer is
needed. (ie. just do printf)

like following:
wd0d: error reading fsbn 40000000 of 40000000-40000003 (wd0 bn 40000000; cn 39682 tn 8 sn 40)
wd0d: (id not found)

---
YAMAMOTO Takashi<yamt@mwd.biglobe.ne.jp>