pkgsrc-Users archive

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

re: updating COMPAT_LINUX for linux 2.6.x support (take 2)



> On Sat, Jun 05, 2010 at 01:02:12PM +1000, matthew green wrote:
> > 
> > >  - fix obreak() to honor RLIMIT_AS as well as RLIMIT_DATA.
> > >    this will affect native processes as well as linux ones,
> > >    but it seems appropriate.
> > 
> > if you're going to do this, you may as well just make RLIMIT_AS and
> > RLIMIT_DATA refer to the same thing (and make that RLIMIT_AS.)
> > 
> > when implementing RLIMIT_AS i was confused about how these would
> > interact, and clearly there was a problem. :)
> > 
> > there's also RLIMIT_STACK, but it has additional semantics that
> > make it different to both _AS and _DATA, further adding to the
> > confusion..
> 
> combining RLIMIT_AS and RLIMIT_DATA sounds confusing.
> 
> I looked at what linux does here: RLIMIT_DATA only affects brk(),
> whereas RLIMIT_AS affects all mappings.  that's what we were trying
> to do too, but I think we just put the check in the wrong place...
> if we move it to uvm_map() instead of uvm_mmap(), that will catch
> brk() and stack usage too.  let me try that and see what breaks.

yeah, that was my intent.

btw, linux also defaults to all of them being unlimited so their
semantics aren't overly clear to me in the cases that matter...


.mrg.


Home | Main Index | Thread Index | Old Index