Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys



Lourival Pereira Vieira Neto wrote:
> Module Name:  src
> Committed By: lneto
> Date:         Sat Jul 19 17:13:22 UTC 2014
> 
> Modified Files:
>       src/sys/modules/lua: lua.c
>       src/sys/sys: lua.h
> 
> Log Message:
> lua(4): added support for running Lua scripts in intr context

Please revert this. You can't make a mechanical change
(s/kmem_/kmem_intr_/g and so on) to enable lua in softintr
context. You need to design it.

What if GC kicks-in in softintr? What if the code tries to
load a chunk of new code in softintr? And there are other
questions.

softint(9):

     Since software interrupts are a limited resource and run with higher
     priority than most other LWPs in the system, all block-and-resume
     activity by a software interrupt must be kept short to allow further
     processing at that level to continue.  By extension, code running with
     process context must take care to ensure that any lock that may be taken
     from a software interrupt can not be held for more than a short period of
     time.

     The kernel does not allow software interrupts to use facilities or
     perform actions that are likely to block for a significant amount of
     time.  This means that it's not valid for a software interrupt to sleep
     on condition variables or to wait for resources to become available (for
     example, memory).

Alex


Home | Main Index | Thread Index | Old Index