linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Ido Yariv <ido@wizery.com>
Cc: Luciano Coelho <luciano.coelho@nokia.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH v3 3/4] wl1271: Allocate TX descriptors more efficiently
Date: Tue, 12 Oct 2010 14:56:28 +0200	[thread overview]
Message-ID: <1286888188.3753.4.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1286887752-19321-4-git-send-email-ido@wizery.com>

On Tue, 2010-10-12 at 14:49 +0200, Ido Yariv wrote:

> +	id = find_first_zero_bit(wl->tx_frames_map, ACX_TX_DESCRIPTORS);
> +	if (id >= ACX_TX_DESCRIPTORS)
> +		return -EBUSY;
> +
> +	set_bit(id, wl->tx_frames_map);
> +	wl->tx_frames[id] = skb;
> +	wl->tx_frames_cnt++;

This is all under some lock, right? (If that isn't the case, it's racy)
Therefore, you need not use atomic bitops which will be fairly
expensive...

Have you actually measured this? It seems that it con't have a huge
effect, and the atomic bitops you use now might even negate it.

> +	if (test_and_clear_bit(id, wl->tx_frames_map)) {

There too.

johannes


  reply	other threads:[~2010-10-12 12:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-12 12:49 [PATCH v3 0/4] wl1271: TX optimizations & fixes Ido Yariv
2010-10-12 12:49 ` [PATCH v3 1/4] wl1271: TX aggregation optimization Ido Yariv
2010-10-12 12:49 ` [PATCH v3 2/4] wl1271: Fix TX starvation Ido Yariv
2010-10-12 12:49 ` [PATCH v3 3/4] wl1271: Allocate TX descriptors more efficiently Ido Yariv
2010-10-12 12:56   ` Johannes Berg [this message]
2010-10-12 14:15     ` Ido Yariv
2010-10-12 14:20     ` [PATCH v4 " Ido Yariv
2010-10-12 12:49 ` [PATCH v3 4/4] wl1271: Fix TX queue low watermark handling Ido Yariv
2010-10-18 13:51 ` [PATCH v3 0/4] wl1271: TX optimizations & fixes Luciano Coelho

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=1286888188.3753.4.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=ido@wizery.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@nokia.com \
    /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).