PERFORCE change 187777 for review
Edward Tomasz Napierala
trasz at FreeBSD.org
Thu Jan 13 21:11:59 UTC 2011
http://p4web.freebsd.org/@@187777?ac=10
Change 187777 by trasz at 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,
More information about the p4-projects
mailing list