summaryrefslogtreecommitdiff
path: root/drivers/cpuquiet
AgeCommit message (Collapse)Author
2013-07-16cpuquiet: Remove compiler warning on unused variablePhilip Rakity
Change-Id: I41ddc91b81cf07ed71964d232da3c7e71e4dfdce Signed-off-by: Philip Rakity <prakity@nvidia.com> Reviewed-on: http://git-master/r/245838 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Scott Peterson <speterson@nvidia.com>
2013-03-15ARM: tegra: cpuquiet: make userspace governor actions synchronousPeter De Schrijver
Userspace expects changes to happen synchronously. Implement this by waiting with a (configureable) timeout for the action to happen. Bug 1220065 Change-Id: I81301719707e4baf2b3aea62c38fc771ffe1205d Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> (cherry picked from commit 9de8f56142e64ebf388b5427ef7fd142078dfa87) Reviewed-on: http://git-master/r/#change,200013 Reviewed-on: http://git-master/r/206802 Tested-by: Ilan Aelion <iaelion@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2013-03-15cpuquiet: Make stats optionalPeter De Schrijver
Make the per CPU statistics a configureable option. bug 1049625 Change-Id: I28b248bbbad89a19e8d8d69400733dfd4a2cf052 Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> (cherry picked from commit 94ade9be87aeda9353808d0f9331acf3e3639d3a) Reviewed-on: http://git-master/r/#change,168749 Reviewed-on: http://git-master/r/206801 Tested-by: Ilan Aelion <iaelion@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2013-02-14cpuquiet: Remove synchronization from runnables_work_func()Peter Boonstoppel
runnables_stop() can deadlock when cancel_work_sync() waits for the work function to end and the work function blocks on the same lock held by runnables_stop(). Removing the locks from runnables_work_func() fixes this. This should be safe because runnables_lock protects runnables_state and runnables_work_func() only reads runnables_state. Also, the functions that change state to DISABLED do a cancel_work_sync() to guarantee the work function stopped running. Bug 1215668 Change-Id: I70617b3b0fc81db8555869e67e3b11652af8d94c Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-on: http://git-master/r/195797 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> Tested-by: Sang-Hun Lee <sanlee@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-12-13cpuquiet: Fix race in runnable governorPeter Boonstoppel
Fixed a race where the cpuquiet driver would call device_free() before the governor was started, which would lead to a kernel panic because runnables_timer was not initialized. Introduced RUNNING state, so states are: - DISABLED: truly disabled - IDLE: enabled, but not polling upon request from the driver - RUNNING: actively polling Bug 1189042 Change-Id: I45b9ce40e61e1cfddde74ff7b2691722204045bb Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-on: http://git-master/r/168803 (cherry picked from commit 097e9b869eda242b4f19ffe486422b048ea7f3ef) Reviewed-on: http://git-master/r/170254 Reviewed-by: Sang-Hun Lee <sanlee@nvidia.com> Tested-by: Sang-Hun Lee <sanlee@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-11-30cpuquiet: Update runnable gov param 20/100ms (1.25/2.25/2.5 +.5)Peter Boonstoppel
Sampling interval: 20ms Window size: 100ms Thresholds: 1.25/2.25/2.5 thread Hysteresis: .5 thread Bug 1050445 Change-Id: I5138bed06e6f3548ec440d2b9ee17460fc37adfb Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-on: http://git-master/r/163105 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-11-30Revert "Revert "cpuquiet: Update averaging of nr_runnables""Peter Boonstoppel
This reverts commit 3bca5808dcc371ea4e1d6ce555e3eae76fbe0e7e. Bug 1050445 Bug 1050721 Change-Id: I6d51de129a10236e43c9ce262f879aa0f8361c77 Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-on: http://git-master/r/163096 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Ilan Aelion <iaelion@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-09-26Revert "cpuquiet: Update averaging of nr_runnables"Puneet Saxena
This reverts commit 8bd999a85354485af3cbee872816a9921d8bfffc. bug 1050721 Change-Id: I29fcff431e5427dfaa2524a12c5702154037018a Signed-off-by: Puneet Saxena <puneets@nvidia.com> Reviewed-on: http://git-master/r/134307 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-09-14cpuquiet: initialize runnable threads first as the default governorPeter De Schrijver
Add the necessary code to initialize the runnable threads governor first when selected as the default governor. Change-Id: Iebbf304f3934b429d8a217011b3cb45ecddfd558 Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-on: http://git-master/r/131438 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-09-14cpuquiet: balanced governor requires cpufreqPeter De Schrijver
The balanced governor relies on cpufreq for some of its decisions. Fail initialization if there are no cpufreq OPP tables available. Change-Id: I5d64215d56f50d5df52c1433208b1eb40440c812 Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-on: http://git-master/r/131437 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-09-14cpuquiet: cleanup Kconfig and MakefilePeter De Schrijver
Add options to enable/disable individual governors and adjust the Makefile to only build the selected governors. Change-Id: Ia3d36afd0f1d2e8cc622956fa0dc16c23cc9904d Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-on: http://git-master/r/131436 Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-09-14cpuquiet: Update averaging of nr_runnablesSai Charan Gurrappadi
Doing a Exponential moving average per nr_running++/-- does not guarantee a fixed sample rate which induces errors if there are lots of threads being enqueued/dequeued from the rq (Linpack mt). Instead of keeping track of the avg, the scheduler now keeps track of the integral of nr_running and allows the readers to perform filtering on top. Implemented a proper exponential moving average for the runnables governor and a straight 100ms average for the balanced governor. Tweaked the thresholds for the runnables governor to minimize latency. Also, decreased sample_rate for the runnables governor to the absolute minimum of 10msecs. Updated to K3.4 Change-Id: Ia25bf8baf2a1a015ba188b2c06e551e89b16c5f8 Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com> Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-on: http://git-master/r/131147 Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-09-11cpuquiet: Add GCOV_PROFILEJuha Tukkinen
Include cpuquiet in GCOV profiling when enabled by defconfig. Change-Id: I448602d2c79f4113b99e6546743585e629fa726e Signed-off-by: Juha Tukkinen <jtukkinen@nvidia.com> Reviewed-on: http://git-master/r/131127 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2012-08-24cpuquiet: Add notifiers for the runnables governorSai Charan Gurrappadi
The governor stops sampling whenever the device is busy and starts its sampling loop when the device is free. Change-Id: Ifdae4a84e56c2734be48e49f6112b537602a02da Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com> Reviewed-on: http://git-master/r/124680 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2012-08-24cpuquiet: Runnable threads governorSai Charan Gurrappadi
[perf] The runnable threads governor only looks at the average number of runnables in the system to make a decision when bringing cores offline/online. First pass; tweaks thresholds and delays to reduce decision latency to about ~50-70ms per core (from ~100-150ms per core) Change-Id: Idd3b268a74a8f56ad3fc0e5c7f388174d1b6611f Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com> Reviewed-on: http://git-master/r/124679 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-08-23cpuquiet: Adding runnable thread knobsXiao Bo Zhao
Ported the knobs that select runnable thread profiles from autohotplug into cpuquiet. Change-Id: I6858731e238404d33c772767d066cd6d467267a8 Signed-off-by: Xiao Bo Zhao <xiaoboz@nvidia.com> Reviewed-on: http://git-master/r/123852 Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Tested-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-08-23cpuquiet: Enable cpuquiet by defaultSai Charan Gurrappadi
Enable cpuquiet by default if autohotplug is enabled. Cpuquiet will now replace autohotplug as the hotplugging infrastructure. The down_delay in the balanced governor has also been increased to 2s from 500ms to match a similar patch for autohotplug. Change-Id: I36747af67c55547b3dee95f7d435f9ebc075d393 Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com> Reviewed-on: http://git-master/r/123851 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2012-08-23cpuquiet: Fix cpuquiet for k3.4Sai Charan Gurrappadi
Change-Id: I75d8dba6c9c4c43152c819e08beeccb1e3c07c0c Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com> Reviewed-on: http://git-master/r/123850 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2012-07-30ARM: tegra: cpuquiet: Notify the cpuquiet governor when the driver is busySai Charan Gurrappadi
Added generic busy/free notifiers that the driver can invoke to let the governor know that it cannot process further core online/offline requests (invoked in our case whenever we switch to the LP cluster). Change-Id: I5e3f7f28f38806a7f87050e8d0c8d2f2cf7521aa Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com> Reviewed-on: http://git-master/r/114807 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com>
2012-07-16cpuquiet: Account for the corner case frequency when setting stateSai Charan Gurrappadi
Now consider frequency greater than or equal to idle_top_freq as UP Change-Id: I1332d46d1e42a00b3b31897b158eaf4ccfbaf8f5 Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com> Reviewed-on: http://git-master/r/113678 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> GVS: Gerrit_Virtual_Submit
2012-07-12cpuquiet: Fix compiler warningSai Charan Gurrappadi
Change-Id: I03c11c295b40ebd500a715974f7fdca560d9a43a Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com> Reviewed-on: http://git-master/r/111286 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
2012-07-12cpuquiet: Update stats only on successful operationsSai Charan Gurrappadi
Change-Id: I0584fba7458b3a860f9ab3751a8eb5f0345864ad Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com> Reviewed-on: http://git-master/r/111285 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
2012-07-12cpuquiet: Properly return the first registered governorSai Charan Gurrappadi
Change-Id: I8a21a15d5cf8e4c91a166810387b5d8f1dd7cdb6 Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com> Reviewed-on: http://git-master/r/111284 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
2012-07-12ARM: tegra: add sysfs support for tegra cpuquiet driverPeter De Schrijver
Change-Id: I215c5de8e98d139a93113978e1e27adb5a6b252c Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com> Reviewed-on: http://git-master/r/111283 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-07-12cpuquiet: Makefile for cpuquiet frameworkPeter De Schrijver
Change-Id: Ia071b03c6073c514b99457e35ebbd65ef32a6906 Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-on: http://git-master/r/105273 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Tested-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-07-12cpuquiet: Updated balanced governor to use the runnable threads patchSai Charan Gurrappadi
The balanced governor now looks at the average number of runnable threads when bringing cores online and offline. The balanced governor parameters have also been updated to reflect a similar patch for autohotplug. Change-Id: I8dac26659ba43d95a68830c6cc268591a7f03f80 Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com> Reviewed-on: http://git-master/r/111282 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
2012-07-12drivers: cpuquiet: fix error messagePeter De Schrijver
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Change-Id: If04c699e002542bd8ce4b37b2367d7ec496c284e Reviewed-on: http://git-master/r/107959 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Tested-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Reviewed-by: Peter De Schrijver <pdeschrijver@nvidia.com> Tested-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-by: Matthew Longnecker <mlongnecker@nvidia.com> Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-06-07cpuquiet: Makefile for governorsPeter De Schrijver
Change-Id: I33018bb5db39f2881a3defc55758681cfb1d6284 Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-on: http://git-master/r/105272 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Tested-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-06-07cpuquiet: balanced governorPeter De Schrijver
This is a port of the existing governor logic in cpu-tegra3.c. Change-Id: Id79e6fc697dd0de85242fb2471bbed3d10101693 Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-on: http://git-master/r/105271 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Tested-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-06-07cpuquiet: userspace governorPeter De Schrijver
Change-Id: If9830d423b1751cbe9493eda0a85f88e7003173f Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-on: http://git-master/r/105270 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Tested-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-06-07cpuquiet: governor supportPeter De Schrijver
Change-Id: I05b9dedc04bb3b2ddba6202a002c1e5514ec4777 Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-on: http://git-master/r/105269 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Tested-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-06-07cpuquiet: sysfs interfacesPeter De Schrijver
Change-Id: Idb454f7380c48e2f4bab20e6ae51fef577b0f6c5 Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-on: http://git-master/r/105267 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Tested-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-06-07cpuquiet: driver supportPeter De Schrijver
Change-Id: I4f3f67d4459eeda519efdfd80e1283bef2d597e3 Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-on: http://git-master/r/105266 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Tested-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-06-07cpuquiet: KconfigSai Charan Gurrappadi
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com> Change-Id: I930dedaa3bf7b2c64bc61f28c3461f125cca2f44 Reviewed-on: http://git-master/r/105264 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Tested-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Reviewed-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-06-07cpuquiet: base filesPeter De Schrijver
Change-Id: I611b72a2e63fffc788bc6c7594c738d5ad65e06f Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-on: http://git-master/r/105263 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Tested-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>