Subject: Re: splx() optimization [was Re: SMP re-eetrancy in "bottom half" drivers]
To: Jonathan Stone <jonathan@dsg.stanford.edu>
From: Tonnerre <tonnerre@thundrix.ch>
List: tech-kern
Date: 06/02/2005 20:38:57
--ReaqsoxgOBHFXBhH
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Salut,

On Thu, Jun 02, 2005 at 11:27:03AM -0700, Jonathan Stone wrote:
> My first (and second) thought is that whatever document you saw does
> not apply to NetBSD (or any BSD from UC Berkeley CRSG, for that matter).
>=20
> The classic BSD TCP stack has _no_ locking in the networking stack:
> none whatsoever. The only synchronization is via SPLs: for TCP, that's
> via splsoftnet(), from ip_intrq processing upward.  Therefore If two
> CPUs attempt to process at splsoftnet at the same time, they *will*
> run into race conditions all through the stack.

That's why we introduce locking, no? I'm not talking about the current
state here.

> #2: Alternatively, we need to add real explicit synchronization
> primitives around all access to, and manipulation of, socket state and
> socket buffers.  That's a lot of work (though I expect we could get a
> long way by reusing the work done in FreeBSD-5).
>=20
> I'd very much like to see #2, but (as I said), you are biting off
> a lot more work than one might have thought at first sight.

I know, but I chose to follow this route..

I know it's a hell of a lot of work, but if we just keep saying this it won=
't
get done. I know you want evolutionary steps, but I think we could even
split the revolutionary step into several tiny evolutionary ones when it's
done.

				Tonnerre

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

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

iD8DBQFCn1JBXUVlAbfmNMIRAiPyAJ42WVIq0JLpiNlgwMvv5ssa6uONjQCfbhFC
1TisBAVbrE0DX8IPseclkwM=
=uiRX
-----END PGP SIGNATURE-----

--ReaqsoxgOBHFXBhH--