From owner-svn-src-head@freebsd.org Wed Nov 2 20:57:21 2016 Return-Path: Delivered-To: svn-src-head@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 9DB34C2BF91; Wed, 2 Nov 2016 20:57:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 591BB15EA; Wed, 2 Nov 2016 20:57:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uA2KvK5B093228; Wed, 2 Nov 2016 20:57:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uA2KvKIb093227; Wed, 2 Nov 2016 20:57:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201611022057.uA2KvKIb093227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 2 Nov 2016 20:57:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308228 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2016 20:57:21 -0000 Author: kib Date: Wed Nov 2 20:57:20 2016 New Revision: 308228 URL: https://svnweb.freebsd.org/changeset/base/308228 Log: Remove remnants of the recursive sleep support. Instead assert that we never try to sleep while the thread is on a sleepqueue. Reviewed by: jhb Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D8422 Modified: head/sys/kern/kern_synch.c Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Wed Nov 2 19:18:24 2016 (r308227) +++ head/sys/kern/kern_synch.c Wed Nov 2 20:57:20 2016 (r308228) @@ -170,13 +170,7 @@ _sleep(void *ident, struct lock_object * catch = priority & PCATCH; pri = priority & PRIMASK; - /* - * If we are already on a sleep queue, then remove us from that - * sleep queue first. We have to do this to handle recursive - * sleeps. - */ - if (TD_ON_SLEEPQ(td)) - sleepq_remove(td, td->td_wchan); + KASSERT(!TD_ON_SLEEPQ(td), ("recursive sleep")); if ((uint8_t *)ident >= &pause_wchan[0] && (uint8_t *)ident <= &pause_wchan[MAXCPU - 1])