git: d1cbe7908986 - main - Allocating the LinuxKPI current structure from an interrupt thread must be done using the M_NOWAIT flag after 1ae20f7c70ea .

Hans Petter Selasky hps at selasky.org
Thu Mar 11 18:18:07 UTC 2021


On 3/11/21 6:13 PM, John Baldwin wrote:
> On 3/10/21 2:09 AM, Hans Petter Selasky wrote:
>> On 3/10/21 11:04 AM, Konstantin Belousov wrote:
>>> This probably hangs machine instead of panicing.  In low memory 
>>> condition,
>>> you do not handle interrupt, which probably mean that the source is not
>>> silenced, and after EOI the same interrupt will be generated again.
>>
>> Hi,
>>
>> This usually happens during boot. Another possibility is to panic()
>> there. I don't see so many options.
> 
> Is there no way to pre-allocate this?  That is, could we not have all
> ithreads invoke this during their initialization, and have the module
> handler for linuxkpi iterate over ithreads allocating one for
> each ithread during MOD_LOAD?
> 
> I think there are few enough ithreads that allocating "extra" ones
> is probably ok.  Alternatively, you could hook into the path when an
> interrupt is registered perhaps by passing some sort of INTR_LINUX
> flag or the like that causes kern_intr.c to allocate one for the
> associated ithread when the interrupt is registered.
> 

Yes, I have a review for that:
https://reviews.freebsd.org/D29183

--HPS


More information about the dev-commits-src-main mailing list