2008-02-22 13:55:10

by Johannes Berg

[permalink] [raw]
Subject: mac80211: STA info size

Hi,

I was just reorganising struct sta_info to clarify the locking (will
send another mail about that) and noticed that due to the HT stuff, each
STA info struct currently (after my reorg) takes 2432 bytes. Almost 2000
of those are in struct sta_ampdu_mlme which is most likely not used for
most STAs.

Do you think that is too much memory per station? It'd probably be
possible to allocate the sta_ampdu_mlme dynamically when needed, no?

johannes


Attachments:
signature.asc (828.00 B)
This is a digitally signed message part

2008-02-22 15:07:20

by John W. Linville

[permalink] [raw]
Subject: Re: mac80211: STA info size

On Fri, Feb 22, 2008 at 11:15:07AM +0100, Johannes Berg wrote:

> I was just reorganising struct sta_info to clarify the locking (will
> send another mail about that) and noticed that due to the HT stuff, each
> STA info struct currently (after my reorg) takes 2432 bytes. Almost 2000
> of those are in struct sta_ampdu_mlme which is most likely not used for
> most STAs.
>
> Do you think that is too much memory per station? It'd probably be
> possible to allocate the sta_ampdu_mlme dynamically when needed, no?

My count was closer to 1.5k, but I may have missed something.
Either way, that seems a little big to me. A dynamic allocation
strategy seems appropriate to me. Anyone disagree?

John
--
John W. Linville
[email protected]

2008-02-22 15:16:12

by Johannes Berg

[permalink] [raw]
Subject: Re: mac80211: STA info size


> > STA info struct currently (after my reorg) takes 2432 bytes. Almost 2000
> > of those are in struct sta_ampdu_mlme which is most likely not used for
> > most STAs.
> >
> > Do you think that is too much memory per station? It'd probably be
> > possible to allocate the sta_ampdu_mlme dynamically when needed, no?
>
> My count was closer to 1.5k, but I may have missed something.

You need to get pahole :P

http://lwn.net/Articles/206805/

johannes


Attachments:
signature.asc (828.00 B)
This is a digitally signed message part

2008-03-04 10:06:07

by Ron Rindjunsky

[permalink] [raw]
Subject: Re: mac80211: STA info size

> > > STA info struct currently (after my reorg) takes 2432 bytes. Almost 2000
> > > of those are in struct sta_ampdu_mlme which is most likely not used for
> > > most STAs.
> > >
> > > Do you think that is too much memory per station? It'd probably be
> > > possible to allocate the sta_ampdu_mlme dynamically when needed, no?
> >
> > My count was closer to 1.5k, but I may have missed something.
>

I did the check myself and your numbers are correct. i also think
dynamic allocation is the way to go. unless something i skipped will
pop up i'll do the changes.

Ron