PM_QOS-to-use-handle-based-requests-API-change 1/5
PATCH 1/1 PM_QOS-to-use-handle-based-requests-API-change 1/5
This is the first in a 5 part series that attempts to update PM_QOS to use handles instead of named strings in its kernel api. It seams that some folks are using pm_qos on hot paths and the overhead of the list walks and string compares is a problem.
Most of the changes came from [email protected], and I spent some time cleaning up the API.
Also, I couldn't resist myself in renaming the API's a bit give the fact that the signatures changed enough that I had to touch all the pm_qos users anyway. I changed *requirement* to *request* in keeping with the way PM_QOS really only does best effort. I've felt "requirement" is too strong a word for the way it works.
If folks would rather me do the function re-naming in a separate patch set we can do that too.
diffstat for the series:
drivers/acpi/processor_idle.c | 2 drivers/cpuidle/governors/ladder.c | 2 drivers/cpuidle/governors/menu.c | 2 drivers/net/e1000e/netdev.c | 13 +- drivers/net/igbvf/netdev.c | 5 drivers/net/wireless/ipw2x00/ipw2100.c | 11 + include/linux/pm_qos_params.h | 14 +- include/sound/pcm.h | 3 kernel/pm_qos_params.c | 183 ++++++++++++++------------------- net/mac80211/mlme.c | 2 sound/core/pcm.c | 3 sound/core/pcm_native.c | 14 +- 12 files changed, 116 insertions(+), 138 deletions(-)
--mgross
Quoted 1 line
From
ac8cba64efd086720ce949e46e0839115520be2eMon Sep 17 00:00:00 2001
From: mark gross <mgross@mgross-hp8510w.(none)>
Date: Tue, 1 Dec 2009 12:57:52 -0800
Subject: [PATCH 1/5] PM_QOS to use handle based requests API change
--- include/linux/pm_qos_params.h | 14 ++-- kernel/pm_qos_params.c | 183 ++++++++++++++++++----------------------- 2 files changed, 87 insertions(+), 110 deletions(-)
include/linux/pm_qos_params.h +8 -6
@@ -14,12 +14,14 @@#define PM_QOS_NUM_CLASSES 4#define PM_QOS_DEFAULT_VALUE -1 -int pm_qos_add_requirement (int qos,char *name,s32 value); -int pm_qos_update_requirement (int qos,char *name,s32 new_value); -void pm_qos_remove_requirement (int qos,char *name); +struct pm_qos_request_list ; -int pm_qos_requirement (int qos); +struct pm_qos_request_list *pm_qos_add_request (int pm_qos_class,s32 value); +void pm_qos_update_request (struct pm_qos_request_list *pm_qos_req, +s32 new_value); +void pm_qos_remove_request (struct pm_qos_request_list *pm_qos_req); -int pm_qos_add_notifier (int qos,struct notifier_block *notifier); -int pm_qos_remove_notifier (int qos,struct notifier_block *notifier); +int pm_qos_request (int pm_qos_class); +int pm_qos_add_notifier (int pm_qos_class,struct notifier_block *notifier); +int pm_qos_remove_notifier (int pm_qos_class,struct notifier_block *notifier);
kernel/pm_qos_params.c +79 -104
358 lines not on this page · raw message
Signature · 1 line
1.6.3.3