Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jun 2000 04:44:10 +0900
From:      "Daniel C. Sobral" <dcs@newsguy.com>
To:        Marc Slemko <marcs@znep.com>
Cc:        John-Mark Gurney <gurney_j@resnet.uoregon.edu>, Alfred Perlstein <alfred@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern uipc_socket.c uipc_socket2.c  src/sys/syssocket.h
Message-ID:  <394A838A.F3417365@newsguy.com>
References:  <Pine.GSO.4.21.0006152200020.14352-100000@redfish>

next in thread | previous in thread | raw e-mail | index | archive | help
Marc Slemko wrote:
> 
> Actually, no, it should not be a generalized to be fully able to grok
> all possible requests.  While I agree that this sort of hardcoded gunk
> isn't necessarily appropriate where it is (or even useful for
> performance, outside of very constrained benchmark situations), if you
> are going to add special code to the kernel, then you want to keep a
> small fast path in the kernel that covers the common case.  You can

Look at the code. It won't matter.

bcmp(..., "GET ") || bcmp(..., "POST ")

Additional || conditions won't be evaluated if the previous succeed.
Since the point here is avoiding context switches, the fail path is of
little consequence performance-wise. If it were otherwise, a case could
be made of using a BM compare instead of the straight-forward stuff
above.

After seeing the code, I can't see why can't userland provide the
strings to be matched.

-- 
Daniel C. Sobral			(8-DCS)
dcs@newsguy.com
dcs@freebsd.org
capo@the.great.underground.bsdconpiracy.org

		"He is my minion, so he doesn't need a name."


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?394A838A.F3417365>