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

Robert N. M. Watson rwatson at FreeBSD.org
Thu Nov 29 10:44:25 UTC 2012


On 29 Nov 2012, at 10:37, Pawel Jakub Dawidek wrote:

>> Just to follow up on some out-of-band communication -- this is a good idea, 
>> but there was some concern about printf() under mutexes.  I'm not actually 
>> that concerned about that case (we do it quite a lot for warnings and kernel 
>> debugging), but it might be useful to consider using log() instead, so that it 
>> ends up in the system log as well as on the console.
> 
> I'm happy with using log(9), but currently when log(9) is used, the
> message is not printed on the console, it only ends up in the system
> log. printf(9) on the other hand is printed on the console and is
> appended to the system logs.
> 
> The only case where log(9) will actually log to the console, AFAIR, is
> when syslogd is not working.
> 
>> For I while I've wondered if we need a spp to complement pps -- that is, 
>> limiting printf()s to every (n) seconds, rather than (n) per second.  For 
>> tunable warnings like this, it would be nice to limit them to once a minute or 
>> similar.
> 
> Or change pps to ppm. I agree that getting these warning every second is
> too aggressive.

It does sound like the underlying primitives require some tweaking of we're going to increase their use in the ways proposed. This is probably overdue anyway.

>> Finally, we should make sure that in all instances where we point at 
>> tuning(7), it has something useful to say about the topic :-).
> 
> Yes, I am aware the warnings proposed in the patch are a bit too
> optimistic:)

The other fix, of course, is not to refer to tuning(7) :-).

In general, providing feedback on tuning problems is a very good idea, and something we should do more of. We should also continue to improve our auto-tuning so that users see the warnings only infrequently.

Robert


More information about the freebsd-arch mailing list