Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys
Alex,
Alexander Nasonov <alnsn%yandex.ru@localhost> wrote:
> 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.
I have explained to Lourival that softint context is a very constrained
environment and he should seek for a better design, e.g. have per-CPU
Lua state while keeping such Lua programs mostly stateless and sharing no
global state. Ideally, we should have deterministic behaviour and memory
pre-allocation with such programs (whether it is Lua or not).
This is tricky with Lua, but I think he understands the implications and
issues. The change is more of an initial step to (inefficiently) support
the capability. Meanwhile, those interested can research and experiment
with NPF+Lua. Such use of Lua is not really meant to be production-ready
at this point.
--
Mindaugas
Home |
Main Index |
Thread Index |
Old Index