9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@coraid.com>
To: 9fans@9fans.net
Subject: Re: [9fans] etherigbe.c using _xinc?
Date: Tue,  8 Dec 2009 11:36:34 -0500	[thread overview]
Message-ID: <5d1347dfd611729cd82ac5bc0ca79c92@coraid.com> (raw)
In-Reply-To: <f75780240912080825y51dda728q283429fa95ab462c@mail.gmail.com>

On Tue Dec  8 11:28:30 EST 2009, me@acm.jhu.edu wrote:
> Hi,
>
> I noticed etherigbe.c (in igberballoc) was recently changed to
> increment the refcount on the block it allocates. Any reason it uses
> _xinc rather than incref?
>
> -- vs

because it's not a Ref.  unfortunately, if it were
a Ref, it would be much faster.  _xinc is deadly
slow even if there is no contention on x86.

i wish the ref counting had at least been isolated to the
case that needs them.  blocks in queues typically
have one owner.  so the owner of the block assumes
it can modify the block whenever with no locking.
ref counting means this assumption is false.
i'm not sure how your supposed to wlock a block.

- erik



  reply	other threads:[~2009-12-08 16:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-08 16:25 Venkatesh Srinivas
2009-12-08 16:36 ` erik quanstrom [this message]
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
     [not found] <<dd6fe68a0912081552s30851f04n109e56479bb423cb@mail.gmail.com>
2009-12-09  0:32 ` erik quanstrom
2009-12-09  1:05   ` Russ Cox
     [not found] <<dd6fe68a0912081705q6fad8a6cl20ca648397070dae@mail.gmail.com>
2009-12-09  2:04 ` erik quanstrom

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=5d1347dfd611729cd82ac5bc0ca79c92@coraid.com \
    --to=quanstro@coraid.com \
    --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).