Print a (rate-limited) warning when UMA zone is full.

Pawel Jakub Dawidek pjd at FreeBSD.org
Fri Nov 30 07:30:49 UTC 2012


On Fri, Nov 30, 2012 at 09:53:41AM +1100, Bruce Evans wrote:
> >> When UMA zone is created, one can add configure a warning that should be 
> >> printed when UMA zone is full by calling:
> >> 
> >> 	uma_zone_set_warning(socket_zone,
> >> 	    "kern.ipc.maxsockets limit exceeded, please see tuning(7).");
> 
> Please don't clone messages of this form.  It has bad grammar, bad
> style and a garbage pointer.  Many of these were cloned from previous
> messages of this form.
> 
> Bad grammar:
> 1. Redundant "limit".  kern.ipc.maxsockets is already a limit.

I don't think I can agree here. kern.ipc.maxsockets is not only a limit
- it is a string, a sysctl, a tunable... being specific that we are
talking about kern.ipc.maxsockets limit is a good thing, IMHO.

> 2. Wrong object.  The thing not being exceeded is the number of sockets,
>     not the limit on the number of sockets.
> 3. Wrong verb.  It is impossible to exceed an enforcible, enforced limit
>     This seems hard to fix without making the message too verbose.  A full
>     description would say something to the effect that that the limit would
>     be exeeded if exceeding it were possible and permitted.  Or some
>     conventional wording for this situation could be used.  The above has
>     conventional wording, but has too many errors for me.

I agree 'exceeded' is wrong word here, I copied the message from
kern.maxfiles warning, but really the messages in the patch were just
examples how the new function can be used.

How about this:

	The kern.ipc.maxsockets limit has be reached.

The message is short. It tells what to tune. It gives sysctl name, so
hopefully sysctl description will tell more about this limit. I'm not a
native English speaker, so I'm open to other suggestions of course.

> 6. termination with a ".'.  Error messages are conventionally not terminated

We probably won't reach an agreement here. In my opinion every sentence
should be terminated with a period. Also it is a warning not an error
message.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://tupytaj.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20121130/82b025e5/attachment.sig>


More information about the freebsd-arch mailing list