Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 Sep 2000 22:35:13 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Alfred Perlstein <bright@wintelcom.net>
Cc:        net@freebsd.org, chat@freebsd.org
Subject:   Re: threading tcp/ip is fun.
Message-ID:  <39B9CC11.41C67EA6@elischer.org>
References:  <20000908154320.J12231@fw.wintelcom.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein wrote:
> 
> http://www.wintelcom.net/~bright/thrsock.diff
> 
> Should refresh every two minutes as I progress through the tcp/ip
> code in an attempt to thread it.
> 
> If you have suggestions or works in progress please let me know.


There is a lot of use of "atomic_ad_long()"
nearly always with an increment of '1'.
Would there be any advantage of having an
"atomic_increment_long()"?
 (a_incl())

with the introduction of heavier weight operations at low level 
(e.g."atomic_add_long(a , 1);" vs "a += 1;"
the optimal way if unrolling loops and threading decision
trees may change..

e.g.

if (XXX)
   a_incl(a);
if (YYY)
   a_incl(b);
if (ZZZ)
   a_incl(c);

might be slower than:
small_lock()
if (XXX)a+=1;
if (YYY)b+=1;
if (ZZZ)c+=1;
drop_small_lock();

(in this case not likely, but it's something to keep in mind I guess.)

> 
> --
> -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
> "I have the heart of a child; I keep it in a jar on my desk."
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-net" in the body of the message

-- 
      __--_|\  Julian Elischer
     /       \ julian@elischer.org
    (   OZ    ) World tour 2000
---> X_.---._/  presently in:  Perth
            v


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39B9CC11.41C67EA6>