All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Antonio Quartulli <antonio@open-mesh.com>,
	Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	Thomas Pedersen <thomas@cozybit.com>,
	Marek Lindner <marek@open-mesh.com>
Subject: Re: [RFC] design discussion: Collecting information for (non-peer) stations
Date: Mon, 18 Feb 2013 20:36:11 +0100	[thread overview]
Message-ID: <512282AB.40604@fokus.fraunhofer.de> (raw)
In-Reply-To: <1361206302.8555.36.camel@jlt4.sipsolutions.net>

On 02/18/2013 05:51 PM, Johannes Berg wrote:
> On Mon, 2013-02-18 at 17:07 +0100, Antonio Quartulli wrote:
>> On Mon, Feb 18, 2013 at 07:58:18 -0800, Johannes Berg wrote:
>>> On Mon, 2013-02-18 at 16:49 +0100, Antonio Quartulli wrote:
>>>> On Mon, Feb 18, 2013 at 07:43:26 -0800, Johannes Berg wrote:
>>>>>> I did not like this approach because the sta_info struct is so big that
>>>>>> when we want to fill the stats substruct only we will waste a lot of bytes.
>>>>>
>>>>> I don't understand your point.
>>>>>
>>>>> struct sta_info {
>>>>>     ...
>>>>>     struct stats stats;
>>>>> };
>>>>
>>>> My concern is about those "..." that we are allocating within the sta_info struct
>>>> that we will never use for every non-peer station.
>>>>
>>>> While if we used the struct below (with its own hash table), we would allocate
>>>> only the space needed for the stats.
>>>>
>>>>>
>>>>> struct stats_entry {
>>>>>     struct hash/list/whatever;
>>>>>     struct stats stats;
>>>>> };
>>>>>
>>>>
>>>>
>>>> no?
>>>> Maybe I misunderstood your idea?
>>>
>>> But I'm not saying that these are mutually exclusive, I'm saying both
>>> should exist.
>>
>> Ah ok..Sorry, but I did not take this as an option :)
>>
>> So, if I understood correctly, this means one table lookup for peer stations,
>> while two table lookups for non peers (first in sta_hash, which will fail). Right?
>>
>> This would save one look up for each peer, since we have to do perform one of
>> them anyway (now I fully understood your previous statement!).
>
> Right... But the failing sta lookup has to happen anyway, so it really
> adds practically no cost in the peer case, and a singe lookup in the
> "non-peer already exists" case.

IMHO, this is the most efficient implementation for most practical use 
cases, where 'peer' traffic accounts more the majority of the traffic. 
Hence it should be in the 'fast path', while the extra lookup for 'non 
peer' traffic should be tolerable.

My five cents,

Mathias

> johannes
>


-- 
Fraunhofer FOKUS - RESourCe Optimised Networks
Dr. Mathias Kretschmer
Schloss Birlinghoven; D-53754 Sankt Augustin
T +49-2241-14-3466, F +49-2241-14-1050,
E mathias.kretschmer@fokus.fraunhofer.de
http://www.fokus.fraunhofer.de/en/rescon

  reply	other threads:[~2013-02-18 19:44 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-15 17:19 [RFC] design discussion: Collecting information for (non-peer) stations Simon Wunderlich
2013-02-18 14:30 ` Johannes Berg
2013-02-18 14:33   ` Johannes Berg
2013-02-18 14:46     ` Antonio Quartulli
2013-02-18 15:29       ` Johannes Berg
2013-02-18 15:38         ` Antonio Quartulli
2013-02-18 15:43           ` Johannes Berg
2013-02-18 15:49             ` Antonio Quartulli
2013-02-18 15:58               ` Johannes Berg
2013-02-18 16:07                 ` Antonio Quartulli
2013-02-18 16:51                   ` Johannes Berg
2013-02-18 19:36                     ` Mathias Kretschmer [this message]
2013-02-20 17:19                     ` Simon Wunderlich
2013-02-20 19:10                       ` Thomas Pedersen
2013-02-21 17:19                         ` Simon Wunderlich
2013-02-19  9:32 ` Thomas Hühn
2013-02-20 17:49   ` Simon Wunderlich
2013-02-20 18:04   ` Mathias Kretschmer
2013-02-22 10:07 ` Zefir Kurtisi
2013-02-22 11:43   ` Simon Wunderlich
2013-02-22 12:34     ` Zefir Kurtisi
2013-02-22 16:21 ` Felix Fietkau
2013-02-22 16:36   ` Antonio Quartulli
2013-02-22 17:03     ` Felix Fietkau
2013-02-22 17:42       ` Adrian Chadd
2013-02-25 10:28         ` Simon Wunderlich
2013-03-08 14:13           ` Simon Wunderlich
2013-03-11 12:01             ` Zefir Kurtisi
2013-03-25 14:43               ` Simon Wunderlich
2013-02-22 17:42       ` Thomas Pedersen

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=512282AB.40604@fokus.fraunhofer.de \
    --to=mathias.kretschmer@fokus.fraunhofer.de \
    --cc=antonio@open-mesh.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=marek@open-mesh.com \
    --cc=simon.wunderlich@s2003.tu-chemnitz.de \
    --cc=thomas@cozybit.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.