From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] etherigbe.c using _xinc?
Date: Tue, 8 Dec 2009 19:32:56 -0500 [thread overview]
Message-ID: <94720e19021f594c5f0007d2b975d14f@brasstown.quanstro.net> (raw)
In-Reply-To: <<dd6fe68a0912081552s30851f04n109e56479bb423cb@mail.gmail.com>>
> but the former does two operations and the latter
> only one. your claim was that _xinc is slower
> than incref (== lock(), x++, unlock()). but you are
> timing xinc+xdec against incref.
sure. i was looking it as a kernel version of a
semaphore.
back to the original problem, before allocb/freeb
did 2 lock/unlocks. now it does 2 unlock/locks
+ 2 xinc/xdec, and is, in the best case 31% slower.
and in the worst case 90% slower. the reference
counting is a heavy price to pay on every network
block, when it is only used by ip/gre.c.
- erik
next parent reply other threads:[~2009-12-09 0:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <<dd6fe68a0912081552s30851f04n109e56479bb423cb@mail.gmail.com>
2009-12-09 0:32 ` erik quanstrom [this message]
2009-12-09 1:05 ` Russ Cox
[not found] <<dd6fe68a0912081705q6fad8a6cl20ca648397070dae@mail.gmail.com>
2009-12-09 2:04 ` erik quanstrom
2009-12-08 16:25 Venkatesh Srinivas
2009-12-08 16:36 ` erik quanstrom
2009-12-08 19:35 ` Russ Cox
2009-12-08 19:52 ` John Floren
2009-12-08 20:00 ` erik quanstrom
2009-12-08 23:52 ` Russ Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=94720e19021f594c5f0007d2b975d14f@brasstown.quanstro.net \
--to=quanstro@quanstro.net \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).