complain when users abuse the pm_qos API
PATCH 1/1 complain when users abuse the pm_qos API
The following patch is to help clean up API abusers of pm_qos where they call update_request before registering a request.
--mgross
--Signed-off-by: markgross <[email protected]>
Quoted 1 line
From
a0813007ddc7b72cb3da7a533fefba9889aab1d8Mon Sep 17 00:00:00 2001
From: mgross <mgross@mgross-desktop.(none)>
Date: Fri, 28 May 2010 21:36:06 -0700
Subject: [PATCH] complain when users abuse the pm_qos API by updating a request that
isn't registered yet.
--- kernel/pm_qos_params.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
kernel/pm_qos_params.c +4 -0
@@ -266,6 +266,10 @@ void pm_qos_update_request(struct pm_qos_request_list *pm_qos_req,spin_unlock_irqrestore (&pm_qos_lock, flags);if (pending_update)update_target (pm_qos_req->pm_qos_class); + }else { +WARN (true,"pm_qos: updating an unregistered request " +"does nothing" ); +dump_stack (); } }EXPORT_SYMBOL_GPL (pm_qos_update_request);
Signature · 1 line
1.7.0.4
Quoted 6 lines · mark gross
The following patch is to help clean up API abusers of
pm_qoswhere they callupdate_requestbefore registering a request.--mgross
--Signed-off-by: markgross <[email protected]>
Will there be a big issue if I push this during the next merge window?
Rafael
Quoted 26 lines
From
a0813007ddc7b72cb3da7a533fefba9889aab1d8Mon Sep 17 00:00:00 2001
From: mgross <mgross@mgross-desktop.(none)>
Date: Fri, 28 May 2010 21:36:06 -0700
Subject: [PATCH] complain when users abuse thepm_qosAPI by updating a request that
isn't registered yet.--- kernel/pm_qos_params.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)kernel/pm_qos_params.c +4
-0@@ -266,6 +266,10 @@ void pm_qos_update_request(struct pm_qos_request_list *pm_qos_req,spin_unlock_irqrestore (&pm_qos_lock, flags);if (pending_update)update_target (pm_qos_req->pm_qos_class); + }else { +WARN (true,"pm_qos: updating an unregistered request " +"does nothing" ); +dump_stack (); } }EXPORT_SYMBOL_GPL (pm_qos_update_request);
Hi.
Quoted 9 lines · Rafael J. Wysocki
Quoted 6 lines · mark gross
The following patch is to help clean up API abusers of
pm_qoswhere they callupdate_requestbefore registering a request.--mgross
--Signed-off-by: markgross<[email protected]>
Will there be a big issue if I push this during the next merge window?
What's the point to the patch? That is: why is calling update_request before registering a request such a big problem that it demands a WARN() and dump stack?
Regards,
Nigel
Hi.
Quoted 9 lines · Rafael J. Wysocki
Quoted 6 lines · mark gross
The following patch is to help clean up API abusers of
pm_qoswhere they callupdate_requestbefore registering a request.--mgross
--Signed-off-by: markgross<[email protected]>
Will there be a big issue if I push this during the next merge window?
What's the point to the patch? That is: why is calling update_request before registering a request such a big problem that it demands a WARN() and dump stack?
Regards,
Nigel
Quoted 9 lines · Nigel Cunningham
Hi.
Quoted 6 lines · Rafael J. Wysocki
Quoted 5 lines · mark gross
The following patch is to help clean up API abusers of
pm_qoswhere they callupdate_requestbefore registering a request.--mgross
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
--Signed-off-by: markgross<[email protected]>
Will there be a big issue if I push this during the next merge window?
What's the point to the patch? That is: why is calling
update_requestbefore registering a request such a big problem that it demands aWARN()and dump stack?
It is an API violation if I understand that correctly.
Rafael
Quoted 12 lines · Rafael J. Wysocki
Quoted 11 lines · Nigel Cunningham
Hi.
Quoted 8 lines · Rafael J. Wysocki
Quoted 6 lines · mark gross
The following patch is to help clean up API abusers of
pm_qoswhere they callupdate_requestbefore registering a request.--mgross
--Signed-off-by: markgross<[email protected]>
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Will there be a big issue if I push this during the next merge window?
What's the point to the patch? That is: why is calling
update_requestbefore registering a request such a big problem that it demands aWARN()and dump stack?It is an API violation if I understand that correctly.
Yeah, it is, but now that I'm thinking clearly perhaps a better fix would be to change the prototype of pm_qos_update_request to return something so callers can check for success.
Lets fix the API rather than use this patch. Please dopt apply it.
--mgross
Quoted 19 lines · mark gross
Quoted 18 lines · Rafael J. Wysocki
Quoted 16 lines · Nigel Cunningham
Hi.
Quoted 9 lines · Rafael J. Wysocki
Quoted 6 lines · mark gross
The following patch is to help clean up API abusers of
pm_qoswhere they callupdate_requestbefore registering a request.--mgross
--Signed-off-by: markgross<[email protected]>
Will there be a big issue if I push this during the next merge window?
What's the point to the patch? That is: why is calling
update_requestbefore registering a request such a big problem that it demands aWARN()and dump stack?
Quoted 7 lines
Quoted 1 line
It is an API violation if I understand that correctly.
Yeah, it is, but now that I'm thinking clearly perhaps a better fix would be to change the prototype of
pm_qos_update_requestto return something so callers can check for success.Lets fix the API rather than use this patch. Please dopt apply it.
OK
Rafael
Quoted 19 lines · mark gross
Quoted 18 lines · Rafael J. Wysocki
Quoted 16 lines · Nigel Cunningham
Hi.
Quoted 9 lines · Rafael J. Wysocki
Quoted 6 lines · mark gross
The following patch is to help clean up API abusers of
pm_qoswhere they callupdate_requestbefore registering a request.--mgross
--Signed-off-by: markgross<[email protected]>
Will there be a big issue if I push this during the next merge window?
What's the point to the patch? That is: why is calling
update_requestbefore registering a request such a big problem that it demands aWARN()and dump stack?
Quoted 7 lines
Quoted 1 line
It is an API violation if I understand that correctly.
Yeah, it is, but now that I'm thinking clearly perhaps a better fix would be to change the prototype of
pm_qos_update_requestto return something so callers can check for success.Lets fix the API rather than use this patch. Please dopt apply it.
OK
Rafael
Quoted 12 lines · Rafael J. Wysocki
Quoted 11 lines · Nigel Cunningham
Hi.
Quoted 8 lines · Rafael J. Wysocki
Quoted 6 lines · mark gross
The following patch is to help clean up API abusers of
pm_qoswhere they callupdate_requestbefore registering a request.--mgross
--Signed-off-by: markgross<[email protected]>
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Will there be a big issue if I push this during the next merge window?
What's the point to the patch? That is: why is calling
update_requestbefore registering a request such a big problem that it demands aWARN()and dump stack?It is an API violation if I understand that correctly.
Yeah, it is, but now that I'm thinking clearly perhaps a better fix would be to change the prototype of pm_qos_update_request to return something so callers can check for success.
Lets fix the API rather than use this patch. Please dopt apply it.
--mgross
Quoted 9 lines · Nigel Cunningham
Hi.
Quoted 6 lines · Rafael J. Wysocki
Quoted 5 lines · mark gross
The following patch is to help clean up API abusers of
pm_qoswhere they callupdate_requestbefore registering a request.--mgross
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
--Signed-off-by: markgross<[email protected]>
Will there be a big issue if I push this during the next merge window?
What's the point to the patch? That is: why is calling
update_requestbefore registering a request such a big problem that it demands aWARN()and dump stack?
It is an API violation if I understand that correctly.
Rafael
Quoted 9 lines · Nigel Cunningham
Hi.
Quoted 6 lines · Rafael J. Wysocki
Quoted 5 lines · mark gross
The following patch is to help clean up API abusers of
pm_qoswhere they callupdate_requestbefore registering a request.--mgross
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
--Signed-off-by: markgross<[email protected]>
Will there be a big issue if I push this during the next merge window?
What's the point to the patch? That is: why is calling
update_requestbefore registering a request such a big problem that it demands aWARN()and dump stack?
If e1000e realy needs the latency set and makes assumptions that its done its part, I would like to let them know that they have not registerd the request they thought they did.
--mgross
Quoted 4 lines
Regards,
Nigel
Quoted 9 lines · Nigel Cunningham
Hi.
Quoted 6 lines · Rafael J. Wysocki
Quoted 5 lines · mark gross
The following patch is to help clean up API abusers of
pm_qoswhere they callupdate_requestbefore registering a request.--mgross
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
--Signed-off-by: markgross<[email protected]>
Will there be a big issue if I push this during the next merge window?
What's the point to the patch? That is: why is calling
update_requestbefore registering a request such a big problem that it demands aWARN()and dump stack?
If e1000e realy needs the latency set and makes assumptions that its done its part, I would like to let them know that they have not registerd the request they thought they did.
--mgross
Quoted 4 lines
Regards,
Nigel
Quoted 9 lines · Rafael J. Wysocki
Quoted 6 lines · mark gross
The following patch is to help clean up API abusers of
pm_qoswhere they callupdate_requestbefore registering a request.--mgross
--Signed-off-by: markgross <[email protected]>
Will there be a big issue if I push this during the next merge window?
No big issue. it can wait.
--mgross
Quoted 31 lines
Rafael
Quoted 26 lines
From
a0813007ddc7b72cb3da7a533fefba9889aab1d8Mon Sep 17 00:00:00 2001
From: mgross <mgross@mgross-desktop.(none)>
Date: Fri, 28 May 2010 21:36:06 -0700
Subject: [PATCH] complain when users abuse thepm_qosAPI by updating a request that
isn't registered yet.--- kernel/pm_qos_params.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)kernel/pm_qos_params.c +4
-0@@ -266,6 +266,10 @@ void pm_qos_update_request(struct pm_qos_request_list *pm_qos_req,spin_unlock_irqrestore (&pm_qos_lock, flags);if (pending_update)update_target (pm_qos_req->pm_qos_class); + }else { +WARN (true,"pm_qos: updating an unregistered request " +"does nothing" ); +dump_stack (); } }EXPORT_SYMBOL_GPL (pm_qos_update_request);
Quoted 9 lines · Rafael J. Wysocki
Quoted 6 lines · mark gross
The following patch is to help clean up API abusers of
pm_qoswhere they callupdate_requestbefore registering a request.--mgross
--Signed-off-by: markgross <[email protected]>
Will there be a big issue if I push this during the next merge window?
No big issue. it can wait.
--mgross
Quoted 31 lines
Rafael
Quoted 26 lines
From
a0813007ddc7b72cb3da7a533fefba9889aab1d8Mon Sep 17 00:00:00 2001
From: mgross <mgross@mgross-desktop.(none)>
Date: Fri, 28 May 2010 21:36:06 -0700
Subject: [PATCH] complain when users abuse thepm_qosAPI by updating a request that
isn't registered yet.--- kernel/pm_qos_params.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)kernel/pm_qos_params.c +4
-0@@ -266,6 +266,10 @@ void pm_qos_update_request(struct pm_qos_request_list *pm_qos_req,spin_unlock_irqrestore (&pm_qos_lock, flags);if (pending_update)update_target (pm_qos_req->pm_qos_class); + }else { +WARN (true,"pm_qos: updating an unregistered request " +"does nothing" ); +dump_stack (); } }EXPORT_SYMBOL_GPL (pm_qos_update_request);
Quoted 6 lines · mark gross
The following patch is to help clean up API abusers of
pm_qoswhere they callupdate_requestbefore registering a request.--mgross
--Signed-off-by: markgross <[email protected]>
Will there be a big issue if I push this during the next merge window?
Rafael
Quoted 26 lines
From
a0813007ddc7b72cb3da7a533fefba9889aab1d8Mon Sep 17 00:00:00 2001
From: mgross <mgross@mgross-desktop.(none)>
Date: Fri, 28 May 2010 21:36:06 -0700
Subject: [PATCH] complain when users abuse thepm_qosAPI by updating a request that
isn't registered yet.--- kernel/pm_qos_params.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)kernel/pm_qos_params.c +4
-0@@ -266,6 +266,10 @@ void pm_qos_update_request(struct pm_qos_request_list *pm_qos_req,spin_unlock_irqrestore (&pm_qos_lock, flags);if (pending_update)update_target (pm_qos_req->pm_qos_class); + }else { +WARN (true,"pm_qos: updating an unregistered request " +"does nothing" ); +dump_stack (); } }EXPORT_SYMBOL_GPL (pm_qos_update_request);