* [PATCH] drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer()
@ 2017-10-24 12:25 SF Markus Elfring
2017-10-24 12:52 ` Jani Nikula
2017-10-24 18:56 ` [PATCH] " Wang, Zhi A
0 siblings, 2 replies; 12+ messages in thread
From: SF Markus Elfring @ 2017-10-24 12:25 UTC (permalink / raw)
To: dri-devel, intel-gfx, intel-gvt-dev, David Airlie, Jani Nikula,
Joonas Lahtinen, Rodrigo Vivi, Zhenyu Wang, Zhi Wang
Cc: kernel-janitors, LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 24 Oct 2017 14:20:06 +0200
Add a jump target so that a call of the function "gvt_vgpu_err" is stored
only once at the end of this function implementation.
Replace two calls by goto statements.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/gpu/drm/i915/gvt/cmd_parser.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c
index 2c0ccbb817dc..caa181380958 100644
--- a/drivers/gpu/drm/i915/gvt/cmd_parser.c
+++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c
@@ -2640,10 +2640,9 @@ static int shadow_workload_ring_buffer(struct intel_vgpu_workload *workload)
if (gma_head > gma_tail) {
ret = copy_gma_to_hva(vgpu, vgpu->gtt.ggtt_mm,
gma_head, gma_top, shadow_ring_buffer_va);
- if (ret < 0) {
- gvt_vgpu_err("fail to copy guest ring buffer\n");
- return ret;
- }
+ if (ret < 0)
+ goto report_failure;
+
shadow_ring_buffer_va += ret;
gma_head = workload->rb_start;
}
@@ -2651,11 +2650,14 @@ static int shadow_workload_ring_buffer(struct intel_vgpu_workload *workload)
/* copy head or start <-> tail */
ret = copy_gma_to_hva(vgpu, vgpu->gtt.ggtt_mm, gma_head, gma_tail,
shadow_ring_buffer_va);
- if (ret < 0) {
- gvt_vgpu_err("fail to copy guest ring buffer\n");
- return ret;
- }
+ if (ret < 0)
+ goto report_failure;
+
return 0;
+
+report_failure:
+ gvt_vgpu_err("fail to copy guest ring buffer\n");
+ return ret;
}
int intel_gvt_scan_and_shadow_ringbuffer(struct intel_vgpu_workload *workload)
--
2.14.3
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer()
2017-10-24 12:25 [PATCH] drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer() SF Markus Elfring
@ 2017-10-24 12:52 ` Jani Nikula
2017-10-24 13:17 ` SF Markus Elfring
2017-10-24 18:56 ` [PATCH] " Wang, Zhi A
1 sibling, 1 reply; 12+ messages in thread
From: Jani Nikula @ 2017-10-24 12:52 UTC (permalink / raw)
To: SF Markus Elfring, dri-devel, intel-gfx, intel-gvt-dev,
David Airlie, Joonas Lahtinen, Rodrigo Vivi, Zhenyu Wang,
Zhi Wang
Cc: kernel-janitors, LKML
On Tue, 24 Oct 2017, SF Markus Elfring <elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Tue, 24 Oct 2017 14:20:06 +0200
>
> Add a jump target so that a call of the function "gvt_vgpu_err" is stored
> only once at the end of this function implementation.
> Replace two calls by goto statements.
>
> This issue was detected by using the Coccinelle software.
I don't think this is an issue or an improvement.
BR,
Jani.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/gpu/drm/i915/gvt/cmd_parser.c | 18 ++++++++++--------
> 1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c
> index 2c0ccbb817dc..caa181380958 100644
> --- a/drivers/gpu/drm/i915/gvt/cmd_parser.c
> +++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c
> @@ -2640,10 +2640,9 @@ static int shadow_workload_ring_buffer(struct intel_vgpu_workload *workload)
> if (gma_head > gma_tail) {
> ret = copy_gma_to_hva(vgpu, vgpu->gtt.ggtt_mm,
> gma_head, gma_top, shadow_ring_buffer_va);
> - if (ret < 0) {
> - gvt_vgpu_err("fail to copy guest ring buffer\n");
> - return ret;
> - }
> + if (ret < 0)
> + goto report_failure;
> +
> shadow_ring_buffer_va += ret;
> gma_head = workload->rb_start;
> }
> @@ -2651,11 +2650,14 @@ static int shadow_workload_ring_buffer(struct intel_vgpu_workload *workload)
> /* copy head or start <-> tail */
> ret = copy_gma_to_hva(vgpu, vgpu->gtt.ggtt_mm, gma_head, gma_tail,
> shadow_ring_buffer_va);
> - if (ret < 0) {
> - gvt_vgpu_err("fail to copy guest ring buffer\n");
> - return ret;
> - }
> + if (ret < 0)
> + goto report_failure;
> +
> return 0;
> +
> +report_failure:
> + gvt_vgpu_err("fail to copy guest ring buffer\n");
> + return ret;
> }
>
> int intel_gvt_scan_and_shadow_ringbuffer(struct intel_vgpu_workload *workload)
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer()
2017-10-24 12:52 ` Jani Nikula
@ 2017-10-24 13:17 ` SF Markus Elfring
2017-10-24 13:54 ` Garry Hurley
0 siblings, 1 reply; 12+ messages in thread
From: SF Markus Elfring @ 2017-10-24 13:17 UTC (permalink / raw)
To: Jani Nikula, dri-devel, intel-gfx, intel-gvt-dev
Cc: David Airlie, Joonas Lahtinen, Rodrigo Vivi, Zhenyu Wang,
Zhi Wang, LKML, kernel-janitors
>> Add a jump target so that a call of the function "gvt_vgpu_err" is stored
>> only once at the end of this function implementation.
>> Replace two calls by goto statements.
>>
>> This issue was detected by using the Coccinelle software.
>
> I don't think this is an issue or an improvement.
Do you care for the detail how often an error message is stored in the code?
Regards,
Markus
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer()
2017-10-24 13:17 ` SF Markus Elfring
@ 2017-10-24 13:54 ` Garry Hurley
2017-10-24 14:26 ` Dan Carpenter
0 siblings, 1 reply; 12+ messages in thread
From: Garry Hurley @ 2017-10-24 13:54 UTC (permalink / raw)
To: SF Markus Elfring
Cc: intel-gfx, Joonas Lahtinen, kernel-janitors, LKML, dri-devel,
Rodrigo Vivi, intel-gvt-dev, Zhi Wang
Markus,
I normally keep quiet on threads like this. I half agree with you. Yes, perhaps a reportError function would be a good idea, but it seems that what you are suggesting is trading an inline subroutine call for a spaghetti-code vondition. The goto is used only if you do not have any code that follows, and what you are taking out is a function call that DOES return execution flow to the calling block. You are replacing it with a goto call which does not return execution flow. The risks of process termination during a goto call make it a bad idea. In this case, the subroutine call is the right move. If the reuse of the error message bothers you, perhaps it is a good candidate for a static string definition, so that if it is changed it can be changed in one location in the code. The tradeoff there is that the static string definition will eat a few bytes of memory from the variable storage. Just my perspective. I could be wrong.
Sent from my iPhone
On Oct 24, 2017, at 9:17 AM, SF Markus Elfring <elfring@users.sourceforge.net> wrote:
>>> Add a jump target so that a call of the function "gvt_vgpu_err" is stored
>>> only once at the end of this function implementation.
>>> Replace two calls by goto statements.
>>>
>>> This issue was detected by using the Coccinelle software.
>>
>> I don't think this is an issue or an improvement.
>
> Do you care for the detail how often an error message is stored in the code?
>
> Regards,
> Markus
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer()
2017-10-24 13:54 ` Garry Hurley
@ 2017-10-24 14:26 ` Dan Carpenter
2017-10-24 14:40 ` SF Markus Elfring
2017-10-24 14:42 ` Joe Perches
0 siblings, 2 replies; 12+ messages in thread
From: Dan Carpenter @ 2017-10-24 14:26 UTC (permalink / raw)
To: Garry Hurley
Cc: intel-gfx, Joonas Lahtinen, kernel-janitors, LKML, dri-devel,
Rodrigo Vivi, intel-gvt-dev, SF Markus Elfring, Zhi Wang
The point of unwind code is to undo what was done earlier. If a
function allocates a list of things, using standard unwind style makes
it simpler, safer and more readable.
This isn't the case here. Instead of making the code more readable,
we're making it more convoluted. It's just that two out of three error
messages happened to be the same and Markus wants to save a bit of
memory by using the same string. The memory savings is not so big that
it's worth making the code less readable.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer()
2017-10-24 14:26 ` Dan Carpenter
@ 2017-10-24 14:40 ` SF Markus Elfring
2017-10-24 14:42 ` Joe Perches
1 sibling, 0 replies; 12+ messages in thread
From: SF Markus Elfring @ 2017-10-24 14:40 UTC (permalink / raw)
To: Dan Carpenter, dri-devel, intel-gfx, intel-gvt-dev
Cc: Garry Hurley, kernel-janitors, LKML, Rodrigo Vivi
> This isn't the case here.
I find your view interesting for further clarification somehow.
> Instead of making the code more readable, we're making it more convoluted.
Can the shown software refactoring usually help here?
> It's just that two out of three error messages happened to be the same
This is true.
> and Markus wants to save a bit of memory by using the same string.
And also the same executable code (besides an identical error message).
> The memory savings is not so big that it's worth making the code less readable.
How does such a feedback fit to information for the deletion of questionable
messages at other source code places?
Regards,
Markus
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer()
2017-10-24 14:26 ` Dan Carpenter
2017-10-24 14:40 ` SF Markus Elfring
@ 2017-10-24 14:42 ` Joe Perches
2017-10-24 14:51 ` SF Markus Elfring
1 sibling, 1 reply; 12+ messages in thread
From: Joe Perches @ 2017-10-24 14:42 UTC (permalink / raw)
To: Dan Carpenter, Garry Hurley
Cc: intel-gfx, kernel-janitors, LKML, dri-devel, Rodrigo Vivi,
intel-gvt-dev, SF Markus Elfring
On Tue, 2017-10-24 at 17:26 +0300, Dan Carpenter wrote:
> The point of unwind code is to undo what was done earlier. If a
> function allocates a list of things, using standard unwind style makes
> it simpler, safer and more readable.
>
> This isn't the case here. Instead of making the code more readable,
> we're making it more convoluted. It's just that two out of three error
> messages happened to be the same and Markus wants to save a bit of
> memory by using the same string. The memory savings is not so big that
> it's worth making the code less readable.
I agree with Dan.
It doesn't save any real memory either as the compiler/linker
reuses the repeated string.
It might, depending on the compiler, save a few bytes of
object code as the compiler may not optimize the repeated
call away though. But a good compiler could do that too.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer()
2017-10-24 14:42 ` Joe Perches
@ 2017-10-24 14:51 ` SF Markus Elfring
2017-10-24 14:56 ` Joe Perches
0 siblings, 1 reply; 12+ messages in thread
From: SF Markus Elfring @ 2017-10-24 14:51 UTC (permalink / raw)
To: Joe Perches, dri-devel, intel-gfx, intel-gvt-dev
Cc: Garry Hurley, kernel-janitors, LKML, Dan Carpenter, Rodrigo Vivi
>> … It's just that two out of three error
>> messages happened to be the same and Markus wants to save a bit of
>> memory by using the same string. The memory savings is not so big that
>> it's worth making the code less readable.
>
> I agree with Dan.
>
> It doesn't save any real memory either as the compiler/linker
> reuses the repeated string.
It might depend on passing appropriate parameters.
> It might, depending on the compiler, save a few bytes of
> object code as the compiler may not optimize the repeated
> call away though.
I am trying to show corresponding change possibilities.
> But a good compiler could do that too.
Do you prefer to delegate the proposed software refactoring
only to a corresponding optimiser?
Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer()
2017-10-24 14:51 ` SF Markus Elfring
@ 2017-10-24 14:56 ` Joe Perches
2017-10-24 15:01 ` SF Markus Elfring
0 siblings, 1 reply; 12+ messages in thread
From: Joe Perches @ 2017-10-24 14:56 UTC (permalink / raw)
To: SF Markus Elfring, dri-devel, intel-gfx, intel-gvt-dev
Cc: Garry Hurley, kernel-janitors, LKML, Dan Carpenter, Rodrigo Vivi
On Tue, 2017-10-24 at 16:51 +0200, SF Markus Elfring wrote:
> Do you prefer to delegate the proposed software refactoring
> only to a corresponding optimiser?
yes.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer()
2017-10-24 14:56 ` Joe Perches
@ 2017-10-24 15:01 ` SF Markus Elfring
2017-10-24 15:14 ` Daniele Nicolodi
0 siblings, 1 reply; 12+ messages in thread
From: SF Markus Elfring @ 2017-10-24 15:01 UTC (permalink / raw)
To: Joe Perches, dri-devel, intel-gfx, intel-gvt-dev
Cc: Garry Hurley, kernel-janitors, LKML, Dan Carpenter, Rodrigo Vivi
>> Do you prefer to delegate the proposed software refactoring
>> only to a corresponding optimiser?
>
> yes.
Will any applications around the semantic patch language
(Coccinelle software) fit also in the preferred tool category?
Regards,
Markus
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer()
2017-10-24 15:01 ` SF Markus Elfring
@ 2017-10-24 15:14 ` Daniele Nicolodi
0 siblings, 0 replies; 12+ messages in thread
From: Daniele Nicolodi @ 2017-10-24 15:14 UTC (permalink / raw)
To: SF Markus Elfring, Joe Perches, dri-devel, intel-gfx,
intel-gvt-dev
Cc: Dan Carpenter, Garry Hurley, Jani Nikula, Joonas Lahtinen,
Rodrigo Vivi, Zhi Wang, kernel-janitors, LKML
On 10/24/17 9:01 AM, SF Markus Elfring wrote:
>>> Do you prefer to delegate the proposed software refactoring
>>> only to a corresponding optimiser?
>>
>> yes.
>
> Will any applications around the semantic patch language
> (Coccinelle software) fit also in the preferred tool category?
What do you think of quantum computing as a solution instead?
Cheers,
Dan
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH] drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer()
2017-10-24 12:25 [PATCH] drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer() SF Markus Elfring
2017-10-24 12:52 ` Jani Nikula
@ 2017-10-24 18:56 ` Wang, Zhi A
1 sibling, 0 replies; 12+ messages in thread
From: Wang, Zhi A @ 2017-10-24 18:56 UTC (permalink / raw)
To: SF Markus Elfring, dri-devel@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org,
intel-gvt-dev@lists.freedesktop.org, David Airlie, Jani Nikula,
Joonas Lahtinen, Vivi, Rodrigo, Zhenyu Wang
Cc: kernel-janitors@vger.kernel.org, LKML
VGhhbmtzIGZvciB0aGUgcGF0Y2ghIEFjdHVhbGx5IEkgd291bGQgcHJlZmVyIHRoYXQgd2UgY2Fu
IGhhdmUgZGlmZmVyZW50IGVycm9yIG1lc3NhZ2VzIGhlcmUuIEUuZy4gbGlrZSBjb3B5X2dtYV90
b19odmEgZmFpbCBpbiB3aGljaCBwYXJ0IG9mIHJpbmcgYnVmZmVyLiBPciB3ZSBjYW4gZGlyZWN0
bHkgcmVtb3ZlIHRoZSBlcnJvciBtZXNzYWdlIHNpbmNlIHVzdWFsbHkgaWYgaXQgZmFpbHMgaXQg
bWVhbnMgYSBidWcgb2YgTVBUIG1vZHVsZSB3aGVuIEdWVC1nIGlzIGFjY2Vzc2luZyB0aGUgZ3Vl
c3QgbWVtb3J5IGJ5IFhlbi9LVk0gZnVuY3Rpb25zIGFuZCBpdCBzaG91bGRu4oCZdCBoYXBwZW4g
dW5sZXNzIE1QVCBtb2R1bGVzIGhhcyBhIGJ1ZywgOiggc28gSSB3aXNoIHRoZSBlcnJvciBtZXNz
YWdlIGNhbiBiZSByZXBvcnRlZCBpbiBNUFQgbW9kdWxlLiA6KQ0KDQpUaGFua3MgZm9yIHRoZSBw
YXRjaC4gIDopDQoNClRoYW5rcywNClpoaS4NCg0KLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0N
CkZyb206IFNGIE1hcmt1cyBFbGZyaW5nIFttYWlsdG86ZWxmcmluZ0B1c2Vycy5zb3VyY2Vmb3Jn
ZS5uZXRdIA0KU2VudDogVHVlc2RheSwgT2N0b2JlciAyNCwgMjA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thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-24 12:25 [PATCH] drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer() SF Markus Elfring
2017-10-24 12:52 ` Jani Nikula
2017-10-24 13:17 ` SF Markus Elfring
2017-10-24 13:54 ` Garry Hurley
2017-10-24 14:26 ` Dan Carpenter
2017-10-24 14:40 ` SF Markus Elfring
2017-10-24 14:42 ` Joe Perches
2017-10-24 14:51 ` SF Markus Elfring
2017-10-24 14:56 ` Joe Perches
2017-10-24 15:01 ` SF Markus Elfring
2017-10-24 15:14 ` Daniele Nicolodi
2017-10-24 18:56 ` [PATCH] " Wang, Zhi A
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox