On 07/28/16 11:09, Konstantin Belousov wrote:
Author: kib
Date: Thu Jul 28 09:09:55 2016
New Revision: 303426
URL: https://svnweb.freebsd.org/changeset/base/303426
Log:
Rewrite subr_sleepqueue.c use of callouts to not depend on the
specifics of callout KPI. Esp., do not depend on the exact interface
of callout_stop(9) return values.
The main change is that instead of requiring precise callouts, code
maintains absolute time to wake up. Callouts now should ensure that a
wake occurs at the requested moment, but we can tolerate both run-away
callout, and callout_stop(9) lying about running callout either way.
As consequence, it removes the constant source of the bugs where
sleepq_check_timeout() causes uninterruptible thread state where the
thread is detached from CPU, see e.g. r234952 and r296320.
Patch also removes dual meaning of the TDF_TIMEOUT flag, making code
(IMO much) simpler to reason about.
Tested by: pho
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 month
Differential revision: https://reviews.freebsd.org/D7137
Modified:
head/sys/ddb/db_ps.c
head/sys/kern/kern_thread.c
head/sys/kern/subr_sleepqueue.c
head/sys/sys/proc.h
Hi,
I think that:
#define SWT_SLEEPQTIMO 5 /* Sleepq timeout wait. */
in sys/proc.h can also be marked "available" after this change.
--HPS
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"