Date: Thu, 13 Jan 2011 21:11:58 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 187777 for review Message-ID: <201101132111.p0DLBwNc026080@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@187777?ac=10 Change 187777 by trasz@trasz_victim on 2011/01/13 21:11:37 The "log" action needs to be rate-limited. Affected files ... .. //depot/projects/soc2009/trasz_limits/sys/kern/kern_rctl.c#3 edit Differences ... ==== //depot/projects/soc2009/trasz_limits/sys/kern/kern_rctl.c#3 (text+ko) ==== @@ -186,6 +186,11 @@ rctl_deferred_psignal(struct proc *p, int signum) { int need_lock; + static int curtime = 0; + static struct timeval lasttime; + + if (!ppsratecheck(&lasttime, &curtime, 10)) + return; /* * XXX: This is ugly. Either turn it into a real taskqueue,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101132111.p0DLBwNc026080>