Date: Sat, 7 Apr 2001 04:36:45 +0800 From: "ªL^¶W" <r88074@csie.ntu.edu.tw> To: "Freebsd-Hackers" <freebsd-hackers@FreeBSD.ORG> Subject: Is the solution correct ?? Message-ID: <200104062037.EAA09216@cslab.csie.ntu.edu.tw>
index | next in thread | raw e-mail
Dear all :
I am trying to run Web proxy server , squid , on FreeBSD using
Async-io
and I modified the FreeBSD source file "vfs_aio.c" ,
but when I run "squid" , it was killed by the SIGPROF or SIGVTALRM
signal
I knew the the two signal was produced by hardclock() in kern_clock()
by the following coding
if (CLKF_USERMODE(frame) &&
timevalisset(&pstats->p_timer[ITIMER_VIRTUAL].it_value)
&&
itimerdecr(&pstats->p_timer[ITIMER_VIRTUAL], tick) == 0)
{
psignal(p,SIGVTALRM);
}
if (timevalisset(&pstats->p_timer[ITIMER_PROF].it_value) &&
itimerdecr(&pstats->p_timer[ITIMER_PROF], tick) == 0)
{
psignal(p, SIGPROF);
}
so I try to add time interval in the file "vfs_aio.c"
to let p->p_stats->p_timer[ITIMER_VIRTUAL] > 0
and p->p_stats->p_timer[ITIMER_PROF] >0
if(p->p_stats->p_timer[ITIMER_VIRTUAL].it_value.tv_sec < 50)
{
getmicrouptime(&ctv);
timevaladd(&aitv.it_value, &ctv);
p->p_stats->p_timer[ITIMER_VIRTUAL]=aitv;
}
if(p->p_stats->p_timer[ITIMER_PROF].it_value.tv_sec < 50)
{
getmicrouptime(&ctv);
timevaladd(&aitv.it_value, &ctv);
p->p_stats->p_timer[ITIMER_PROF]=aitv;
}
Is the solution correct ?
how many timeval should I add ??
Thanks in Advance
Richard_Lin
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200104062037.EAA09216>
