Discussion:
Add DragonFly BSD port
Robin Hahling
2014-10-01 21:22:16 UTC
Permalink
Hi,

As an attachment, you will find a patch that adds DragonFly BSD support.
The patch is from John Marino and has been in use for quite some time now in
official DragonFly BSD packages without any user reporting issues.

However, it seems to me that an adjustment should be made to src/lj_gdbjit.c
and src/jit/bcsave.lua. "dragonfly" should be need in map_os in the latter and
I'm not sure about .eosabit in the former.

Please, feel free to ask if you have any question.

Cheers,

Robin Hahling
Mike Pall
2014-10-03 12:04:42 UTC
Permalink
Post by Robin Hahling
As an attachment, you will find a patch that adds DragonFly BSD support.
The patch is from John Marino and has been in use for quite some time now in
official DragonFly BSD packages without any user reporting issues.
I'm pretty sure the code doesn't work in the general case with a
fragmented memory map. It attempts to do a linear scan, but it
only performs a single retry.

Please refactor this to use the already existing code for mmap()
allocation hinting. This already includes a special case for a
near-exhaustive linear scan.
Post by Robin Hahling
However, it seems to me that an adjustment should be made to src/lj_gdbjit.c
and src/jit/bcsave.lua. "dragonfly" should be need in map_os in the latter and
I'm not sure about .eosabit in the former.
You can find out by looking at the header of any binary on the
target OS.

--Mike
Robin Hahling
2014-10-05 17:05:16 UTC
Permalink
Post by Mike Pall
Post by Robin Hahling
As an attachment, you will find a patch that adds DragonFly BSD support.
The patch is from John Marino and has been in use for quite some time now
in official DragonFly BSD packages without any user reporting issues.
I'm pretty sure the code doesn't work in the general case with a
fragmented memory map. It attempts to do a linear scan, but it
only performs a single retry.
Please refactor this to use the already existing code for mmap()
allocation hinting. This already includes a special case for a
near-exhaustive linear scan.
You can find attached a new patch which uses the existing code for mmap.
As a simple test, I ran the scimark test[1]. Please, feel free to ask if I
need to do more exhaustive testing.
Post by Mike Pall
Post by Robin Hahling
However, it seems to me that an adjustment should be made to
src/lj_gdbjit.c and src/jit/bcsave.lua. "dragonfly" should be need in
map_os in the latter and I'm not sure about .eosabit in the former.
You can find out by looking at the header of any binary on the
target OS.
DragonFly actually uses UNIX/SYS V. and thus the version number for this is 0.
I thus changed the sources to make it clear even though the default case is 0.

Cheers,

Robin

[1]: http://luajit.org/download/scimark.lua
Mike Pall
2014-10-07 14:20:04 UTC
Permalink
Post by Robin Hahling
You can find attached a new patch which uses the existing code for mmap.
Added to the git repository with some fixes. Thanks!

--Mike

Continue reading on narkive:
Loading...