Subject: Re: splx() optimization [was Re: SMP re-eetrancy in "bottom half" drivers]
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 06/01/2005 23:35:35
--yVhtmJPUSI46BTXb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jun 01, 2005 at 03:01:11PM +0900, YAMAMOTO Takashi wrote:
> hi,
>=20
> > If we start going down route of making the network stack even partially
> > SMP-safe, then I think the consensus on tech-kern is that we'll also
> > need to head in the direction of making all interrupts ordered; with
> > associated, hierarchically-ordered (spin)locks at each level.
>=20
> i didn't notice such a consensus.  can you give me a pointer?
>=20
> i don't see any needs to have all interrupts ordered.
> i won't object if you want to make them ordered as
> a transient convention, tho.

I thought the point was that interrupt handlers now will use spin locks to=
=20
protect their data. When an interrupt handler runs, it will run with SPL=20
set to block its interrupt on the CPU it's on, and it will also grab a=20
spinlock so that no other CPU services this interrupt (and also keep other=
=20
processing that would now block interrupts out of the data).

The locks will need to be ordered to avoid deadlock. As there will be a=20
correspondence between locks and SPL, we will then need to order SPL to=20
avoid deadlock.

Thus we will have a hierarchy to SPL levels.

Am I missing something?

Take care,

Bill

--yVhtmJPUSI46BTXb
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFCnqi3Wz+3JHUci9cRAm1KAKCHQL5QsOgA5RqkxKsky7JJh3DNJgCfSxbl
B1BsnovDVOcvGeoE5eQFtZ4=
=BWNJ
-----END PGP SIGNATURE-----

--yVhtmJPUSI46BTXb--