Subject: Re: wd.c patch to reduce kernel stack usage
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-kern
Date: 06/28/2002 17:55:25
On Sat, Jun 29, 2002 at 12:48:57AM +0900, YAMAMOTO Takashi wrote:
> 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)

Hum, yes this looks good. there are already multi-lines error messages for
soft errors.

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--