From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <5d1347dfd611729cd82ac5bc0ca79c92@coraid.com> References: <5d1347dfd611729cd82ac5bc0ca79c92@coraid.com> Date: Tue, 8 Dec 2009 11:35:26 -0800 Message-ID: Subject: Re: [9fans] etherigbe.c using _xinc? From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: ac9ee7a8-ead5-11e9-9d60-3106f5b1d025 > because it's not a Ref. =C2=A0unfortunately, if it were > a Ref, it would be much faster. =C2=A0_xinc is deadly > slow even if there is no contention on x86. do you have numbers to back up this claim? you are claiming that the locked XCHGL in tas (pc/l.s) called from lock (port/taslock.c) called from incref (port/chan.c) is "much faster" than the locked INCL in _xinc (pc/l.s). it seems to me that a locked memory bus is a locked memory bus. also, when up !=3D nil (a common condition), lock does a locked INCL and DECL (_xinc and _xdec) in addition to the tas, which seems like strictly more work than a single _xinc. russ