[OpenAFS-devel] .35 sec rx delay bug?

Roland Kuhn rkuhn@e18.physik.tu-muenchen.de
Fri, 10 Nov 2006 09:51:50 +0100


This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--Apple-Mail-20-157917579
Content-Type: multipart/signed; micalg=sha1; boundary=Apple-Mail-19-157917555; protocol="application/pkcs7-signature"


--Apple-Mail-19-157917555
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

Hi Ken!

On 9 Nov 2006, at 21:21, Ken Hornstein wrote:

>>> Hm, I am wondering if that's a win; that means two extra syscalls.
>>
>> Here two extra syscalls (a few microseconds nowadays?) can save  
>> processing
>> a packet (or more), and incurring network latency (a hundred  
>> microseconds
>> on my Ether).
>
> The syscalls (context switch, a good chunk of cache getting flushed)
> add up.  Why do you think pread() and pwrite() were created?  My point
> was that the extra syscalls may end up killing the advantage you get
> from sendfile() (the Linux sendfile() ... other sendfiles can add
> in header data).  But ... that's just thinking out loud.  Maybe it
> will be fine.
>
I'm not a guru, but I think that's not correct. pread/pwrite are  
there to prevent some races, not to save time. And at least in Linux  
syscalls are _fast_, because there is no context switch (that term is  
reserved for the switch between processes, as that is a _lot_ slower  
than entering/exiting kernel space). That's the whole point of  
mapping kernel address space into each vm (with proper protection, of  
course).

A syscall is of the order of 1usec, which is much shorter than the  
network stack latencies which are being talked about in this thread.

Ciao,
                     Roland

--
TU Muenchen, Physik-Department E18, James-Franck-Str., 85748 Garching
Telefon 089/289-12575; Telefax 089/289-12570
--
CERN office: 892-1-D23 phone: +41 22 7676540 mobile: +41 76 487 4482
--
Any society that would give up a little liberty to gain a little
security will deserve neither and lose both.  - Benjamin Franklin
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GS/CS/M/MU d-(++) s:+ a-> C+++ UL++++ P+++ L+++ E(+) W+ !N K- w--- M 
+ !V Y+
PGP++ t+(++) 5 R+ tv-- b+ DI++ e+++>++++ h---- y+++
------END GEEK CODE BLOCK------



--Apple-Mail-19-157917555
Content-Transfer-Encoding: base64
Content-Type: application/pkcs7-signature;
	name=smime.p7s
Content-Disposition: attachment;
	filename=smime.p7s

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIINxTCCBi4w
ggUWoAMCAQICCmEPqkwAAAAAAAMwDQYJKoZIhvcNAQEFBQAwQTESMBAGCgmSJomT8ixkARkWAmNo
MRQwEgYKCZImiZPyLGQBGRYEY2VybjEVMBMGA1UEAxMMQ0VSTiBSb290IENBMB4XDTA2MTAwMzA5
MzYxM1oXDTE2MTAwMzA5NDYxM1owWTESMBAGCgmSJomT8ixkARkWAmNoMRQwEgYKCZImiZPyLGQB
GRYEY2VybjEtMCsGA1UEAxMkQ0VSTiBUcnVzdGVkIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIB
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwdFGqthhWlgUOSZ6C6hReNEVGzbjf2IQgxo7
/rOfOQHZH3krQPQ37fqFroEr46PrruymZ/U+QAzmESZQ4Z+nCfBhm7cEi0TIhihHd4cEPaPxawGR
T9Ck7BBk9za8TUljF6c/JodnIcmIrpbazEbSAS1KEXwETHDsTrQ7lJ+6SzDP4/oOwrHrgJx+tKsm
gOsFSbBEK4OYx1UYQpYS9OJQk2Sc0q4a/SCSu+xbN8ppmgV3WFytN8NW20n3NpCCWYPzo9rXmPRA
7a/c6mf+RV5gPCnUqeW6KUvix5kz9+X8/4SQV/fU12OPdRvtkqcC+PpiePK7bjMLQJEYwvchJrSz
AwIDAQABo4IDDjCCAwowDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUmMyS0EYwNoyw7ZgNclGp
R0zdviEwCwYDVR0PBAQDAgGGMBAGCSsGAQQBgjcVAQQDAgECMCMGCSsGAQQBgjcVAgQWBBT/Rljl
vgfrVK8GmAaYe+TbiXbJ7DBRBgNVHSAESjBIMEYGCisGAQQBYAoCA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dGVkIENlcnRpZmljYXRpb24gQXV0aG9yaXR5AgpyGYEeAAIAAAJmMHgGCyqGSIb3DQEJ
EAILMWmgZzBZMRIwEAYKCZImiZPyLGQBGRYCY2gxFDASBgoJkiaJk/IsZAEZFgRjZXJuMS0wKwYD
VQQDEyRDRVJOIFRydXN0ZWQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkCCnIZgR4AAgAAAmYwDQYJ
KoZIhvcNAQEBBQAEggEAbkFK+EOZwfNTkUMiO8rwespgHJ6ejQoETcIAcSw1+/9CG14oZtCoTMzQ
SLmxUVxPjEQYlqnn6umz7LVdjiBWPwqWxAJ6jGqgmZjyWBCQe9USDfhRRuMGv4Lk1AcVtge6PNOX
akPj6CoP1figHZCQFEwrj14qnq1tumr9dQccgSa0jdAaAT1TiyYQ50gAh/7wWPy6k7KIJgTXCkR7
NpGelkzHVRNjc7UG85pbLo5A9vwzM8dpOCKUbXyRV9Vf4qugkpNKwiR0/n0SUpbp+ZTOP+52VZSE
PpuMiq7twTx0Wngm1W1pPbpVd+PCPYA05lKwdEAzadRJ2kQMgoLTNvwBWQAAAAAAAA==

--Apple-Mail-19-157917555--

--Apple-Mail-20-157917579
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFVD2qI4MWO8QIRP0RAn9TAKCw7RDv7Col30GUi29TEi7eUee2CwCfXVXs
LacclIFWGwetc+jAS3sxo/0=
=Q1ZS
-----END PGP SIGNATURE-----

--Apple-Mail-20-157917579--