From owner-freebsd-stable@freebsd.org Fri Dec 22 15:36:00 2017 Return-Path: Delivered-To: freebsd-stable@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 7F2FDEA04C1 for ; Fri, 22 Dec 2017 15:36:00 +0000 (UTC) (envelope-from pho@holm.cc) Received: from relay01.pair.com (relay01.pair.com [209.68.5.15]) (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 5BDCB7B4FC for ; Fri, 22 Dec 2017 15:35:59 +0000 (UTC) (envelope-from pho@holm.cc) Received: from x2.osted.lan (87-58-223-204-dynamic.dk.customer.tdc.net [87.58.223.204]) by relay01.pair.com (Postfix) with ESMTP id C3E17D00428; Fri, 22 Dec 2017 10:35:57 -0500 (EST) Received: from x2.osted.lan (localhost [127.0.0.1]) by x2.osted.lan (8.14.9/8.14.9) with ESMTP id vBMFZsrT041094 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 22 Dec 2017 16:35:54 +0100 (CET) (envelope-from pho@x2.osted.lan) Received: (from pho@localhost) by x2.osted.lan (8.14.9/8.14.9/Submit) id vBMFZrPF041093; Fri, 22 Dec 2017 16:35:53 +0100 (CET) (envelope-from pho) Date: Fri, 22 Dec 2017 16:35:53 +0100 From: Peter Holm To: Konstantin Belousov Cc: Peter Jeremy , freebsd-stable@freebsd.org Subject: Re: Unkillable process in "vm map (user)" Message-ID: <20171222153553.GA41052@x2.osted.lan> References: <20171210200931.GS23931@server.rulingia.com> <20171210204217.GC2272@kib.kiev.ua> <20171222092607.GA35523@x2.osted.lan> <20171222124521.GR12785@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171222124521.GR12785@kib.kiev.ua> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2017 15:36:00 -0000 On Fri, Dec 22, 2017 at 02:45:21PM +0200, Konstantin Belousov wrote: > On Fri, Dec 22, 2017 at 10:26:07AM +0100, Peter Holm wrote: > > Here's some more info, using the original scenario: > > https://people.freebsd.org/~pho/stress/log/kostik1070.txt > > This is somewhat weird but also not too puzzling. > > The vmdaemon (pid 41) is running, it tries to reduce the count of resident > pages in some pmap, most likely the one from the pid 20655. This process > seems to be huge: according to the v_stats, there is 15681264 inactive pages, > and the pagedaemon tries to obtain a vm object lock which is owned by > vmdaemon, resident count for that object is 15897170 (~64Gb). > > So basically almost all memory belongs to the single object and vmdaemon > processing it. Since the object' queue is huge, the map and the object > locks are taken for long time, preventing other processes touching them > from making a progress. > > Might be try this (it combines new changes with the OOM patch). I am not > sure that should_yield() in the vm_swapout_object_deactivate_pages() is > a good idea unconditionally, but it might be better than the current > situation. > > diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c > index ece496407c2..ce6208569c6 100644 > --- a/sys/vm/vm_fault.c The patch fixes the problem I got with this scenario. - Peter