From owner-freebsd-current@freebsd.org Sun Apr 22 15:04:09 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 0497DFA69DE for ; Sun, 22 Apr 2018 15:04:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 5D59C8683F; Sun, 22 Apr 2018 15:04:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w3MF3vct020882 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 22 Apr 2018 18:04:00 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w3MF3vct020882 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w3MF3vCg020881; Sun, 22 Apr 2018 18:03:57 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 22 Apr 2018 18:03:57 +0300 From: Konstantin Belousov To: Tijl Coosemans Cc: jeff@FreeBSD.org, "freebsd-current@freebsd.org" Subject: Re: i386 hangs during halt "vnodes remaining... 0 time out" Message-ID: <20180422150357.GV6887@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> <20180422165513.711579c3@kalimero.tijl.coosemans.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180422165513.711579c3@kalimero.tijl.coosemans.org> User-Agent: Mutt/1.9.5 (2018-04-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home 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 15:04:09 -0000 On Sun, Apr 22, 2018 at 04:55:13PM +0200, Tijl Coosemans wrote: > 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? I do not see why not.