[Mesa-dev] [PATCH 3/3] anv: Handle the device loss abort in anv_device_set_lost

Emil Velikov emil.l.velikov at gmail.com
Tue Oct 30 15:38:46 UTC 2018


On Tue, 30 Oct 2018 at 15:07, Jason Ekstrand <jason at jlekstrand.net> wrote:
>
> On Tue, Oct 30, 2018 at 10:04 AM Emil Velikov <emil.l.velikov at gmail.com> wrote:
>>
>> On Thu, 25 Oct 2018 at 17:47, Jason Ekstrand <jason at jlekstrand.net> wrote:
>> >
>> > ---
>> >  src/intel/vulkan/anv_device.c | 11 +++++++++++
>> >  src/intel/vulkan/anv_util.c   |  4 ----
>> >  2 files changed, 11 insertions(+), 4 deletions(-)
>> >
>> > diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
>> > index 79d3f052113..d62bdde078c 100644
>> > --- a/src/intel/vulkan/anv_device.c
>> > +++ b/src/intel/vulkan/anv_device.c
>> > @@ -2053,6 +2053,17 @@ void
>> >  anv_device_set_lost(struct anv_device *device, const char *msg, ...)
>> >  {
>> >     device->_lost = true;
>> > +
>> > +   if (env_var_as_boolean("ANV_ABORT_ON_DEVICE_LOSS", false)) {
>>
>> If you're interested in shaving a micro second or two, you can do the
>> env_var_as_boolean once per device/instance/other.
>> Admittedly if the developer hits this path they have far greater
>> problems to deal with ;-)
>
>
> I don't think I care too much about aborting couple us faster. :P

The env. variable is read again and again, even if one doesn't abort.
But as said... quite a meh suggestion.

-Emil


More information about the mesa-dev mailing list