Search Linux Wireless

Re: [PATCH v3 3/4] wl1271: Allocate TX descriptors more efficiently

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux