Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1480759 > unrolled thread

Re: [PATCH 3/3] drivers: Add visorbus to the drivers/virt directory

Started by'Greg KH' <gregkh@linuxfoundation.org>
First post2016-09-11 11:20 +0200
Last post2016-09-11 17:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 3/3] drivers: Add visorbus to the drivers/virt directory 'Greg KH' <gregkh@linuxfoundation.org> - 2016-09-11 11:20 +0200
    RE: [PATCH 3/3] drivers: Add visorbus to the drivers/virt directory "Sell, Timothy C" <Timothy.Sell@unisys.com> - 2016-09-11 17:20 +0200

#1480759 — Re: [PATCH 3/3] drivers: Add visorbus to the drivers/virt directory

From'Greg KH' <gregkh@linuxfoundation.org>
Date2016-09-11 11:20 +0200
SubjectRe: [PATCH 3/3] drivers: Add visorbus to the drivers/virt directory
Message-ID<sg95D-4nu-5@gated-at.bofh.it>
On Tue, Aug 30, 2016 at 04:29:07PM +0000, Sell, Timothy C wrote:
> E.g., so even though no obvious error-recovery occurs above in-response to
> kzalloc() failures, the fact that -CONTROLVM_RESP_ERROR_KMALLOC_FAILED is
> provided to bus_epilog() is in-fact sufficient to report the error.
> 
> Is this making sense?

Yes, it does a bit more, but, you should make this more explicit.

> Can you suggest how we might modify our code to make this error-handling /
> recovery strategy clearer?

Have a real error be returned by the function, and then have the caller
handle the error by propagating it back to the firmware through the
message.  That might save you a lot of boiler-plate error handling logic
as well, right?

That will make it obvious that if an error happens, it is caught, and
how it is handled correctly.

Does that help?

thanks,

greg k-h

[toc] | [next] | [standalone]


#1480830

From"Sell, Timothy C" <Timothy.Sell@unisys.com>
Date2016-09-11 17:20 +0200
Message-ID<sgeI1-7Pe-1@gated-at.bofh.it>
In reply to#1480759
On Sun, 11 Sep 2016 02:17:10 -0700, Greg KH wrote:
> On Tue, Aug 30, 2016 at 04:29:07PM +0000, Sell, Timothy C wrote:
>> E.g., so even though no obvious error-recovery occurs above in-response to
>> kzalloc() failures, the fact that -CONTROLVM_RESP_ERROR_KMALLOC_FAILED is
>> provided to bus_epilog() is in-fact sufficient to report the error.
>> 
>> Is this making sense?

> Yes, it does a bit more, but, you should make this more explicit.

Agreed.  I believe your recommendation below is the right way to accomplish
this.

>> Can you suggest how we might modify our code to make this error-handling /
>> recovery strategy clearer?

> Have a real error be returned by the function, and then have the caller
> handle the error by propagating it back to the firmware through the
> message.  That might save you a lot of boiler-plate error handling logic
> as well, right?

> That will make it obvious that if an error happens, it is caught, and
> how it is handled correctly.

> Does that help?

Yes it does.  We'll work out a scheme where all of these functions in fact
return their status code to a common dispatch function, whose job it will
be to send this status code back to the firmware.  This might even let us
consolidate/eliminate a few of the other functions we have that deal with
various ways of formatting firmware responses, by encompassing their logic
into this common dispatch function.

That strategy should make it clearer and more explicit as to what is
going on here.

Thanks!

Tim Sell

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web