[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1674761.EFBh0AzUve@vostro.rjw.lan>
Date:	Thu, 10 Sep 2015 23:40:16 +0200
From:	"Rafael J. Wysocki" <rjw@...ysocki.net>
To:	Viresh Kumar <viresh.kumar@...aro.org>
Cc:	linaro-kernel@...ts.linaro.org, linux-pm@...r.kernel.org,
	Kristen Carlson Accardi <kristen@...ux.intel.com>,
	open list <linux-kernel@...r.kernel.org>,
	Sudeep Holla <sudeep.holla@....com>
Subject: Re: [PATCH] cpufreq: pass policy to ->get() driver callback
On Thursday, September 10, 2015 06:52:22 AM Viresh Kumar wrote:
> On 10-09-15, 03:41, Rafael J. Wysocki wrote:
[cut]
> > Passing a pointer and dereferencing it is generally less efficient than passing
> > a number.  Before the patch the core has to do the dereference before calling
> > ->get, so it likely doesn't matter here, but the code churn from this change
> > is quite substantial and the benefit from it is in the noise IMO.
> 
> Hmm.. Actually almost every other callback (bios_limit() is another
> one), passes the policy to the driver, and I thought always passing
> the policy will make it more symmetrical. And the expectation that the
> cpufreq drivers wouldn't need to use policy from the ->get() callback
> would be wrong. Even if there are only few users today. One is the
> acpi-cpufreq driver and others are the ones, that are using
> cpufreq_generic_get() :)
So the whole question is whether or not this is worth the whole code churn
related to the exchange of callbacks.
At this point I really don't know.  It depends on the design discussion I'd
like to start.
Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
