From owner-freebsd-current@freebsd.org Sun Apr 22 14:55:22 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3019CFA5E18 for ; Sun, 22 Apr 2018 14:55:22 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay105.isp.belgacom.be (mailrelay105.isp.belgacom.be [195.238.20.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76E90860F9; Sun, 22 Apr 2018 14:55:21 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes IronPort-PHdr: =?us-ascii?q?9a23=3Ai4P2TxfahRkGaAIvXLX04mNtlGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxcu5YR7h7PlgxGXEQZ/co6odzbaO6Oa4ASQp2tWoiDg6aptCVhsI24?= =?us-ascii?q?09vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7?= =?us-ascii?q?Ovr6GpLIj8Swyuu+54Dfbx9HiTahb75+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYe?= =?us-ascii?q?RWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZ?= =?us-ascii?q?TAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v6bpgRh31hy?= =?us-ascii?q?cdLzM3/mHZhNJtgqxYoh2hqRNwzJLbboyOKPpzfL/Rcc8GSWZdQMpcUTFKDIOm?= =?us-ascii?q?b4sICuoMJfhWr4j/p1sKsBCzGw6sBOT0yjBWg3/5x6s60/88GgzBwAwgHtAOsH?= =?us-ascii?q?DPodv1LqcdT/66wbTVwzvNdf9W3i396IfRfx0nvPqCXqpwfNLSxEUyDQ/JkFqd?= =?us-ascii?q?pZH/Mz+LyugBrXKX4/dgWO+hjWMstht/rSK1xsg2j4nEnocVylfZ+ipn2Is1Pt?= =?us-ascii?q?i4SFJjYd6jDZtQqzmWN4toTcMmRGFloCU6xacCuZ66eSgF1o4nxxnFZ/ybcoiI?= =?us-ascii?q?4BbjWPyNLjd/g3JlY6ywhxOo/kim0e3wTM600ExFriZdk9nMsG4C1wDL58WEV/?= =?us-ascii?q?dx5Fmt1DmS2wzJ9O1IPV44mbDGJ5MhzLM8jp8Tvl7CHi/ylkX2lqiWdkA89+i0?= =?us-ascii?q?6uTnYLHmq4SSN49ulA7xLL8hmteiDugiNQgORWeb9fym1LL/5U35XKlKjvoun6?= =?us-ascii?q?nat5DaPtgbpq+6AwBOzIkj7w2yDzij0NsCnHkHKEhJdw6Aj4jsaBnyJ6XbCvGk?= =?us-ascii?q?n12qjDZtj9rLOrr8GZLTZizAl6z9fLV35kp0xw86zNQZ7JVRXOIvOvX2D3Pwtt?= =?us-ascii?q?iQJRg+KAGxyuD8QIFh14EacUyVD6KzC4+UtkWHsLF8a9KQbZMY7W6uY8Mu4OTj?= =?us-ascii?q?2Cc0?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2A0HAADodxa/5nK8VFcg0krU4EIKIxKj?= =?us-ascii?q?BcBAYFzMQFdhmyODIR2AoJEIjcVAQIBAQEBAQECAWsogjUigkwBBTocIxALDgo?= =?us-ascii?q?JJQ8SGB4GE4R3AxmpLYcGDYErgi6KH4Qagk+HeAKXRywIiCyDF4JyaItxiXaHX?= =?us-ascii?q?DIigVJNMAiCfoMxAQiNFj0wkE0BAQ?= X-IPAS-Result: =?us-ascii?q?A2A0HAADodxa/5nK8VFcg0krU4EIKIxKjBcBAYFzMQFdhmy?= =?us-ascii?q?ODIR2AoJEIjcVAQIBAQEBAQECAWsogjUigkwBBTocIxALDgoJJQ8SGB4GE4R3A?= =?us-ascii?q?xmpLYcGDYErgi6KH4Qagk+HeAKXRywIiCyDF4JyaItxiXaHXDIigVJNMAiCfoM?= =?us-ascii?q?xAQiNFj0wkE0BAQ?= Received: from 153.202-241-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.241.202.153]) by relay.skynet.be with ESMTP; 22 Apr 2018 16:55:15 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id w3MEtDOL062720; Sun, 22 Apr 2018 16:55:13 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Sun, 22 Apr 2018 16:55:13 +0200 From: Tijl Coosemans To: Konstantin Belousov Cc: jeff@FreeBSD.org, "freebsd-current@freebsd.org" Subject: Re: i386 hangs during halt "vnodes remaining... 0 time out" Message-ID: <20180422165513.711579c3@kalimero.tijl.coosemans.org> In-Reply-To: <20180422132855.GU6887@kib.kiev.ua> References: <20180421234934.10d7dfab@kalimero.tijl.coosemans.org> <20180422120521.GS6887@kib.kiev.ua> <20180422151500.1608af96@kalimero.tijl.coosemans.org> <20180422132855.GU6887@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2018 14:55:22 -0000 On Sun, 22 Apr 2018 16:28:55 +0300 Konstantin Belousov wrote: > On Sun, Apr 22, 2018 at 03:15:00PM +0200, Tijl Coosemans wrote: >> Thanks for the review. There's just one concern I have. With this patch >> the bufspace_daemon threads appear to shutdown after the buf_daemon and >> after the syncer because the event handlers are registered later. Are >> there any dependencies between these processes that require the bufspace >> threads to be stopped earlier? > > I think for correctness bufdaemon must stop after the syncer, since syncer > operation can cause a situation where bufdaemon help is needed to proceed. > Other than this, the stop order is irrelevant, because after syncer > finished, there should be no any further filesystem activity. A quick way to do that would be to use SHUTDOWN_PRI_LAST + 100 for the event handlers in the patch, like shutdown_conf in kern_shutdown.c already does. Is that acceptable here as well?