Re: [PATCH 1/2] firmware, fix request_firmware_nowait() freeze withno uevent

From: Prarit Bhargava
Date: Thu Oct 24 2013 - 08:06:21 EST




On 10/24/2013 07:17 AM, Henrique de Moraes Holschuh wrote:
> On Wed, 23 Oct 2013, Prarit Bhargava wrote:
>> After all this I completely forgot the problem I'm trying to solve here. The
>> issue is that with HOTPLUG & request_microcode_nowait(), if the microcode image
>> is not found (that is the file is not found on disk), then EACH cpu waits 1
>> minute and it takes 2 hours for a 120 cpu box to load the microcode module.
>
> The proper fix seems to be teaching the concept of negative caching to the
> microcode core/drivers, as it was pointed out elsewhere in the thread.
> Negative caching should have a lifetime of "the current update-all-cores
> request".
>

Yes, I'm implementing v2 to do this already; caching the microcode is obvious.
I was actually looking at the code to see if there was a reason that each
processor needs to do a load request but cannot see one. I'm modifying the
microcode driver to do this, as I said, in v2.

> This would fix the absurd compound timeout delays, as on most systems it
> will result in just one timeout (the first one).
>
> That first timeout can be fixed by the user if they disable the userspace
> firmware loader helper. IMHO that might well be the best choice, as it is
> already the way forward.

The problem with that is I may have a configuration which depends on having the
userspace firmware loader helper for a device, but not the processors so IMO it
isn't a complete solution.

I've also toyed with the idea that there should be a request_firmware_timeout()
in which a timeout for HOTPLUG can be specified.

P.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/