[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150813.172655.794541030036505262.davem@davemloft.net>
Date: Thu, 13 Aug 2015 17:26:55 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: johannes@...solutions.net
Cc: linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
johannes.berg@...el.com
Subject: Re: [PATCH 1/2] average: provide macro to create static EWMA
From: Johannes Berg <johannes@...solutions.net>
Date: Thu, 13 Aug 2015 11:11:48 +0200
> From: Johannes Berg <johannes.berg@...el.com>
>
> Having the EWMA parameters stored in the runtime struct imposes
> memory requirements for the constant values that could just be
> inlined in the code. This particularly makes sense if there are
> a lot of such structs, for example in mac80211 in the station
> table where each station has a number of these in an array, and
> there can be many stations.
>
> Provide a macro DECLARE_EWMA() that declares the necessary struct
> and inline functions to access it with the parameters hard-coded;
> using this also means the user no longer needs to 'select AVERAGE'
> as it's entirely self-contained.
>
> In the mac80211 case, on x86-64, this actually slightly *reduces*
> code size, while also saving 80 bytes of runtime memory per sta.
>
> Signed-off-by: Johannes Berg <johannes.berg@...el.com>
> ---
> As the next patch relies on this, I'll take this through my tree
> unless I hear objections.
This looks fine to me.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists