Re: GC Parameters & Emergency Collection

Posted by Robert G. Jakabosky on
URL: http://elua-development.15.s1.nabble.com/GC-Parameters-Emergency-Collection-tp2846858p2853520.html

I finally got a working i686-elf toolchain compiled and eLua to boot in a VirualBox instance.

Also I found out that eLua will not start when using the Lilo boot loader. I was trying Lilo first since it is smaller then grub and I thought it would be easier to install eLua on a floppy. Turned out that it was much easier to install grub on a floppy and there was enough room for eLua too.

On Saturday 09, jbsnyder@fanplastic.org wrote:

>

> <[hidden email]> wrote:

> >

> > Many, many thanks for this !!! I wanted to do this for quite a while

> > now, but didn't find the time to do it. Your patch is excellent for

> > eLua and its goals, so it's a Great Thing to have it running on our

> > targets. Thanks again.

>

> Ditto. Thanks for getting this up and going. I will do some testing

> with this, this weekend if I get a chance. I'm curious if this might

> allow pushing limits a bit more where we would previously run out of

> memory where the problem could be helped by emergency gc.

With the patch you can now set a memory limit when starting a Lua script from the eLua shell.

eLua# lua -m 51 /rom/life.lua

The '-m' option lets you set the memory limit in Kbytes.

51Kbytes was the lowwest I was able to get life.lua to run at with eLua. On my linux host vanilla Lua with the EGC patch can only run life.lua with a minimal memory limit of 60Kbytes. Looks like the ROTables in eLua saved about 9Kbytes here.

The attached patch is for stress testing the EGC only. It forces a full GC cycle on every allocation, so it is very slow (life.lua required over 30 minutes to run, compared to 4 minutes). I was able to run all the Lua scripts that eLua includes by default with that stress testing enabled.

Normally I would also run the stress testing under valgrind to test for any bad memory accesses, but that is only possible if eLua is run as an app. under a host OS.

> > And I couldn't agree with you more, and this why I feel so excited

> > for having EGC in eLua. I'll have to think of a good batch of tests

> > for making your patch shine in its full potential :)

>

> Would the torture tests for the egc patch work in really low memory

> conditions like with 64k of SRAM?

>

> I think we should also have a general test suite for to simplify the

> verification of builds across our multiple platforms. I think I may

> start after luarpc is working with eLua.

It should be possible to pick torture tests that will work with just 64k of memory.

I normally run the Lua scripts from:

http://shootout.alioth.debian.org/

when stress testing the EGC patch. Some of those scripts will require more then 64k for that dataset that they process.

--

Robert G. Jakabosky


_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

full_gc_on_alloc.patch (319 bytes) Download Attachment