Subject: Re: genfs_putpages with PGO_SYNCIO
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: enami tsugutomo <enami@sm.sony.co.jp>
List: tech-kern
Date: 01/21/2003 11:15:22
YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp> writes:
> hi.
>
> > > > sure. I agree that struct buf here is overkill.
> > > > maybe we should have stripped version of struct buf.
> > >
> > > i made a new patch, with a new struct (stripped version of buf).
> > > how about this?
> >
> > Hm, what is the benefit of using stripped version of struct buf? At
>
> code sharing with biowait/biodone.
>
> > least you're forced to use slight hack to prevent `done' routine being
> > called by borrowing struct buf related routine for this. Is so much
> > code duplicated without this?
>
> not so much, i think.
>
> do you mean "it's better to introduce a completely different structure
> than abusing a part of struct buf" ?
Yes. IMHO, they (new one vs. struct buf and bio* routine) describe
different thing (the former is just related to GOP_PUTPAGES and
GOP_WRITE). E.g., if one might want to limit the number of async
write issued at a time, the code will wait in the middle of loop in
_putpages routine. For this, not using struct buf will be cleaner.
> > if (async) {...} just above this change isn't necessary anymore.
>
> sure. i preserved it just for UVMHIST_LOG.
Since code path is same now, the logged `flags' value is enough.
BTW, is this change results noticable effect?
enami.