Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jul 2002 04:21:49 -0700
From:      Mike Makonnen <makonnen@pacbell.net>
To:        freebsd-smp@freebsd.org
Subject:   Getting resource limits out from under Giant
Message-ID:  <20020710042149.26b39b62.makonnen@pacbell.net>

next in thread | raw e-mail | index | archive | help
Hello folks,

I took a stab at getting resource limits out from under Giant.
The patch is at http://home.pacbell.net/makonnen/limits.giant.patch

Comments?

One thing I would like feedback on is the unconditional allocation
of memory in fork1() to avoid allocating memory while holding the
proc lock. Resource limits are copy-on-write by
default and since the copy doesn't happen very often this
leads to most times allocating a new struct plimit and just
deallocating it a few lines later. I suspect that's probably not what
we want. I can see a couple of ways to solve it, like keeping a
preallocated pool or dropping, allocating the memory, and then
re-aquiring the proc lock.

Cheers,
Mike Makonnen

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020710042149.26b39b62.makonnen>