Date: Sun, 15 Jul 2012 19:32:02 +0000 (UTC) From: Davide Italiano <davide@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r238499 - projects/calloutng/sys/kern Message-ID: <201207151932.q6FJW24a067935@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: davide Date: Sun Jul 15 19:32:02 2012 New Revision: 238499 URL: http://svn.freebsd.org/changeset/base/238499 Log: Enable execution of callout from hw interrupt context rather than sw interrupt context for kern_nanosleep() and seltdwait(). This change improves precision for select()/poll()/usleep()/nanosleep() services. Modified: projects/calloutng/sys/kern/kern_time.c projects/calloutng/sys/kern/sys_generic.c Modified: projects/calloutng/sys/kern/kern_time.c ============================================================================== --- projects/calloutng/sys/kern/kern_time.c Sun Jul 15 19:10:00 2012 (r238498) +++ projects/calloutng/sys/kern/kern_time.c Sun Jul 15 19:32:02 2012 (r238499) @@ -367,7 +367,7 @@ kern_nanosleep(struct thread *td, struct for (;;) { sleepq_lock(&nanowait); sleepq_add(&nanowait, NULL, "nanslp", PWAIT | PCATCH, 0); - sleepq_set_timeout_bt(&nanowait, &bt, 0); + sleepq_set_timeout_bt(&nanowait, &bt, C_DIRECT_EXEC); error = sleepq_timedwait_sig(&nanowait, PWAIT | PCATCH); binuptime(&bt2); if (error != EWOULDBLOCK) { Modified: projects/calloutng/sys/kern/sys_generic.c ============================================================================== --- projects/calloutng/sys/kern/sys_generic.c Sun Jul 15 19:10:00 2012 (r238498) +++ projects/calloutng/sys/kern/sys_generic.c Sun Jul 15 19:32:02 2012 (r238499) @@ -1723,7 +1723,7 @@ seltdwait(struct thread *td, struct bint error = cv_timedwait_sig(&stp->st_wait, &stp->st_mtx, timo); else if (bt != NULL) error = cv_timedwait_bt_sig(&stp->st_wait, &stp->st_mtx, - bt, 0); + bt, C_DIRECT_EXEC); else error = cv_wait_sig(&stp->st_wait, &stp->st_mtx); mtx_unlock(&stp->st_mtx);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207151932.q6FJW24a067935>