Subject: Re: CVS commit: src/sys/dev
To: Manuel Bouyer <bouyer@netbsd.org>
From: Daniel Carosone <dan@geek.com.au>
List: source-changes
Date: 09/04/2006 10:20:29
--DITGHUV3p5DjDsXt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Sun, Sep 03, 2006 at 07:49:34PM +0000, Manuel Bouyer wrote:
>=20
> Modified Files:
> src/sys/dev: vnd.c
>=20
> Log Message:
> Back out rev 1.149.
> Unfortunably this reopens PR/10731, PR/12189, PR/20296, PR/34293
>=20
> Also, others stacked block device drivers may also have this issue.
Yes, and cgd/dk_subr has a solution to essentially the same issue,
=66rom a different cause. In that case, the encryption routines need to
allocate a buffer to copy the ciphertext into, and this can fail in
interrupt context (when trying to start the next request from a
completion interrupt of the previous). If that happens, the strategy
routine just queues the request, which will be restarted later (and we
keep a single static buffer around to ensure we can always make
progress). Perhaps it's time to reiterate my suggestion that vnd be
restructured similarly.
I took a quick look at this before you made these changes last time,
and the changes were fairly large in terms of lines touched, but
mostly mechanical: mostly, code needed to move from strategy to the
thread part that runs behind start, and start needed to be split into
a small part that does the wakeup, and the part that gets woken. I
think in the more recent context, this means moving more work into the
thread you added and making the normal driver entry points just queue
requests and send wakeups.
--
Dan.
--DITGHUV3p5DjDsXt
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (NetBSD)
iD8DBQFE+3FNEAVxvV4N66cRAnpkAJ4kjWC7tDd3+mQ31b91cDK1oRmzwQCgjim/
PcB8fzTEKujjEWWVfpSu328=
=+fBG
-----END PGP SIGNATURE-----
--DITGHUV3p5DjDsXt--