Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jun 1997 09:09:32 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        tom@sdf.com (Tom Samplonius)
Cc:        terry@lambert.org, jkh@time.cdrom.com, hackers@FreeBSD.ORG
Subject:   Re: LINT and GENERIC - between a rock and a generic place.
Message-ID:  <199706021609.JAA14593@phaeton.artisoft.com>
In-Reply-To: <Pine.BSF.3.95q.970531173527.5274A-100000@misery.sdf.com> from "Tom Samplonius" at May 31, 97 05:41:18 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > Jordan is speaking to hard limits.  The login.conf speaks to soft
> > limits, and is still limited to what it can set by the hard limits.
> 
>   Well, login.conf does allow you set hard and soft limits, at least in
> the language of setrlimit()

A hard limit is a limit imposed by system limits.  A quota limit is
a limit imposed by the system on a particular user.  A soft limit or
"working set" is the limit imposed on the user by himself, or by his
acceptance of less-than-quota-limit defaults for soft limits.

It's not my fault that the man pages don't make the distinction so
that it's clear that a kernel recompile is needed to raise quota
limits above hard limits.  Talk to the documentation people.


> > The hard limits are the result of static allocations, general at
> > initialization time before the kernel is really running, like
> > globally declared arrays.
> 
>   The only two things I can think of is the maximum number of open files,
> and mbufs clusters.  
> 
>   Why can't these be handled like setting device setttings (IRQs,
> baseports, etc)?  Boot with a "-c" to change them, before the kernel is
> really running, and then write the changes into kernel after boot with
> dset.

Because they are used as static initializers in the code; the areas
are not allocated so much as they are staked out in the kernel data
segment via declaration.

It is somewhat faster to reference a statically declared area (no
pointer dereference).  I think the utility outweighs the penalty,
however.


> > AIX was probably right when it made all this stuff dynamic.  Then you
> > could at least sysctl the "hard limit" after the machine was up.
> 
>   I guess there is performance penalty?

Additional pointer dereference per access (as above).


					Regards,
					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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