Thread (25 messages) 25 messages, 5 authors, 2016-06-08

Re: [PATCH V3 9/9] cpufreq: drivers: Free frequency tables after being used

From: "Rafael J. Wysocki" <rafael@kernel.org>
Date: 2016-06-06 22:45:31
Also in: linux-mips, lkml

On Fri, Jun 3, 2016 at 3:35 PM, Viresh Kumar [off-list ref] wrote:
The cpufreq core doesn't use these tables anymore after
cpufreq_table_validate_and_show() has returned.  And so these can be
freed early.
That doesn't look particularly efficient.

The driver has to allocate memory first and populate it and then the
core needs to allocate more memory again to store the same information
in it, but perhaps in a different order and then the driver can free
the memory allocated before right away.  It looks like there's one
excessive memory allocation here, so maybe the core can simply sort
the frequency table in place and overwrite the invalid entries in the
process?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help