From owner-svn-src-all@freebsd.org Wed Aug 10 15:55:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25BF0BB40E9; Wed, 10 Aug 2016 15:55:42 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E66DB16B7; Wed, 10 Aug 2016 15:55:41 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 9510D1FE024; Wed, 10 Aug 2016 17:55:09 +0200 (CEST) Subject: Re: svn commit: r303426 - in head/sys: ddb kern sys To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201607280909.u6S99t01066655@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <73c3a522-b83e-46b2-6bc7-1987f8ebb449@selasky.org> Date: Wed, 10 Aug 2016 17:59:33 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <201607280909.u6S99t01066655@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2016 15:55:42 -0000 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