Date: Fri, 3 Apr 1998 11:50:25 -0500 (EST) From: "Alok K. Dhir" <adhir@worldbank.org> To: ache@nagual.pp.ru Cc: current@FreeBSD.ORG, phk@FreeBSD.ORG, adkin003@tc.umn.edu Subject: Re: More info RE: X slowdown in -current Message-ID: <Pine.BSF.3.96.980403114954.338A-100000@shadow.worldbank.org> In-Reply-To: <2256FE13FEDE4CAE852565DA00770025.0076EF7B852565DA@worldbank.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This patch worked great. Is there any reason why it shouldn't be committed? On Thu, 2 Apr 1998 ache@nagual.pp.ru wrote: > > > On Thu, Apr 02, 1998 at 10:57:44PM +0400, Андрей Чернов wrote: > > On Thu, Apr 02, 1998 at 01:43:48PM -0500, Alok K. Dhir wrote: > > > > > > In case it helps debug the problem, the apps most affected (i.e. > > > visibily) by this slowdown are Netscape and xterm. None of my other > > > "staple" apps are visibly affected. Even rxvt is fine... > > > > > > ---------- Forwarded message ---------- > > > Date: Thu, 2 Apr 1998 13:14:37 -0500 (EST) > > > From: "Alok K. Dhir" <adhir@worldbank.org> > > > To: current@freebsd.org > > > Subject: X slowdown in -current > > > > > > The slowdown still exists on a kernel and its world supped and made at > > > 11:30am today. I saw a commit go by from phk that I thought was > supposed > > > to fix this problem, but it doesn't seem to have worked for me. > > > > > > The reason is that phk's fix really _not_ fix anything, try the patch > > posted in current recently instead, it works! > > > > This one (related to latest -current) really works, maybe because > splhigh() removed: > > *** sys_generic.c.orig Thu Apr 2 11:22:17 1998 > --- sys_generic.c Fri Apr 3 01:22:00 1998 > *************** > *** 538,545 **** > */ > fd_mask s_selbits[howmany(2048, NFDBITS)]; > fd_mask *ibits[3], *obits[3], *selbits, *sbp; > ! struct timeval atv; > ! int s, ncoll, error, timo, term; > u_int nbufbytes, ncpbytes, nfdbits; > > if (uap->nd < 0) > --- 538,545 ---- > */ > fd_mask s_selbits[howmany(2048, NFDBITS)]; > fd_mask *ibits[3], *obits[3], *selbits, *sbp; > ! struct timeval atv, ctv; > ! int s, ncoll, error, timo; > u_int nbufbytes, ncpbytes, nfdbits; > > if (uap->nd < 0) > *************** > *** 600,627 **** > error = EINVAL; > goto done; > } > ! term = ticks + tvtohz(&atv); > } else > ! term = 0; > retry: > ncoll = nselcoll; > p->p_flag |= P_SELECT; > error = selscan(p, ibits, obits, uap->nd); > if (error || p->p_retval[0]) > goto done; > ! s = splhigh(); > ! if (term && term <= ticks) { > ! splx(s); > goto done; > } > - timo = term ? term - ticks : 0; > if ((p->p_flag & P_SELECT) == 0 || nselcoll != ncoll) { > - splx(s); > goto retry; > } > p->p_flag &= ~P_SELECT; > error = tsleep((caddr_t)&selwait, PSOCK | PCATCH, "select", timo); > - splx(s); > if (error == 0) > goto retry; > done: > --- 600,627 ---- > error = EINVAL; > goto done; > } > ! getmicrotime(&ctv); > ! timevaladd(&atv, &ctv); > ! timo = hzto(&atv); > } else > ! timo = 0; > retry: > ncoll = nselcoll; > p->p_flag |= P_SELECT; > error = selscan(p, ibits, obits, uap->nd); > if (error || p->p_retval[0]) > goto done; > ! getmicrotime(&ctv); > ! /* this should be timercmp(&time, &atv, >=) */ > ! if (uap->tv && (ctv.tv_sec > atv.tv_sec || > ! (ctv.tv_sec == atv.tv_sec && ctv.tv_usec >= atv.tv_usec))) { > goto done; > } > if ((p->p_flag & P_SELECT) == 0 || nselcoll != ncoll) { > goto retry; > } > p->p_flag &= ~P_SELECT; > error = tsleep((caddr_t)&selwait, PSOCK | PCATCH, "select", timo); > if (error == 0) > goto retry; > done: > *************** > *** 701,708 **** > { > caddr_t bits; > char smallbits[32 * sizeof(struct pollfd)]; > ! struct timeval atv; > ! int s, ncoll, error = 0, timo, term; > size_t ni; > > if (SCARG(uap, nfds) > p->p_fd->fd_nfiles) { > --- 701,708 ---- > { > caddr_t bits; > char smallbits[32 * sizeof(struct pollfd)]; > ! struct timeval atv, ctv; > ! int s, ncoll, error = 0, timo; > size_t ni; > > if (SCARG(uap, nfds) > p->p_fd->fd_nfiles) { > *************** > *** 724,751 **** > error = EINVAL; > goto done; > } > ! term = ticks + tvtohz(&atv); > } else > ! term = 0; > retry: > ncoll = nselcoll; > p->p_flag |= P_SELECT; > error = pollscan(p, (struct pollfd *)bits, SCARG(uap, nfds)); > if (error || p->p_retval[0]) > goto done; > ! s = splhigh(); > ! if (term && term <= ticks) { > ! splx(s); > goto done; > } > - timo = term ? term - ticks : 0; > if ((p->p_flag & P_SELECT) == 0 || nselcoll != ncoll) { > - splx(s); > goto retry; > } > p->p_flag &= ~P_SELECT; > error = tsleep((caddr_t)&selwait, PSOCK | PCATCH, "poll", timo); > - splx(s); > if (error == 0) > goto retry; > done: > --- 724,749 ---- > error = EINVAL; > goto done; > } > ! getmicrotime(&ctv); > ! timevaladd(&atv, &ctv); > ! timo = hzto(&atv); > } else > ! timo = 0; > retry: > ncoll = nselcoll; > p->p_flag |= P_SELECT; > error = pollscan(p, (struct pollfd *)bits, SCARG(uap, nfds)); > if (error || p->p_retval[0]) > goto done; > ! getmicrotime(&ctv); > ! if (timo && timercmp(&ctv, &atv, >=)) { > goto done; > } > if ((p->p_flag & P_SELECT) == 0 || nselcoll != ncoll) { > goto retry; > } > p->p_flag &= ~P_SELECT; > error = tsleep((caddr_t)&selwait, PSOCK | PCATCH, "poll", timo); > if (error == 0) > goto retry; > done: > > > > -- > Andrey A. Chernov > http://www.nagual.pp.ru/~ache/ > MTH/SH/HE S-- W-- N+ PEC>+ D A a++ C G>+ QH+(++) 666+>++ Y > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > > -------------------------------------------------------------------- \||/_ Alok K. Dhir Phone: +1.202.473.2446 oo \ S13-069, ITSMC Email: adhir@worldbank.org L_ The World Bank Group Washington, DC \/ ------------------------------------------------------------------------| "Unix _is_ user friendly - it just chooses friends selectively..." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980403114954.338A-100000>