From owner-svn-src-head@freebsd.org Mon Dec 25 19:52:36 2017 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 3D1B8EA3034; Mon, 25 Dec 2017 19:52:36 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk0-x244.google.com (mail-qk0-x244.google.com [IPv6:2607:f8b0:400d:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E989370CFA; Mon, 25 Dec 2017 19:52:35 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk0-x244.google.com with SMTP id q14so29141802qke.7; Mon, 25 Dec 2017 11:52:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=VVOgGleJDvSciMN/tIvCGuz1kEYQ4Mp3V7pIWDr8YQQ=; b=hDa291hHeX6feoa1tgGXHyekewZNJA7MRyijuf5sriOZrePfDHikvG55Ty/n+ZckrW UeYNHOK8NeCaZpI1ETQbdYDGNfZWbovQy/Ledaaor2ze6IIYi9sH81pdDd6tNSRaeZ99 NFS6WUM18iWxviv0sy9ZvObNuc36JRbEO4tEaBQliWGD0WHZpFeq9RsH/DUAuI4fxceE NMOkpUsqO2+91u6a5vnd7UxFbESPUqn1Bzr2ibp2ECKIN2S6kWoyhP3BMaLilJYF910A DEzHwv7tKIlnri+XAT8I6NwYIAyFO/7CdiDpes44PakDsQGgELmo8LY7rhh4NIIUz7L8 gV0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=VVOgGleJDvSciMN/tIvCGuz1kEYQ4Mp3V7pIWDr8YQQ=; b=Hex7LN3SG0riXOK/MjFRW4/rsZ695KSHXhPutgAWzq8qqPYJdTmFom9BZAC4ceSnxN SdkGKBmebE9Z7ygJHZRtXHUfXxReXx3I6DTnaNa71R6JEHK2TJa3Yaxf69bEqFOaUPSz W5+ChIEaGdoMADZDzc0DHuRp7CZRfrBI4I13/Zsm4zUxkeZbeOxblyJ+IelHpd3xjuZX PhxLm5B9NJyANbiKOdHTrGbTpqjfI4F0rRf9XtWWnuTgn+3Zk6Hufs4JaVyCvCvrzGe9 nNg2UEmHhjKBo2q+GKmZcOwVulKiONZGLoEaTYS3pGdwNNu5WyiWZchCJA4/16DuUDHN 9SYg== X-Gm-Message-State: AKGB3mLj14CARmSApyqEPaovYIMRF/hBjhmWVRmFIKA0N8dCvfGq3Npv /Q80x5kWl0u1LRnEFp0maf4TBQ== X-Google-Smtp-Source: ACJfBoswreQVH5qBghLSISZxXzQjPZ6w8Jyo7rI+n+F6LuVOsawzfmIFImeHG3rFD/xVhr5ohs7pqg== X-Received: by 10.233.222.71 with SMTP id s68mr30693255qkf.82.1514231554942; Mon, 25 Dec 2017 11:52:34 -0800 (PST) Received: from wkstn-mjohnston.west.isilon.com (c-76-104-203-143.hsd1.wa.comcast.net. [76.104.203.143]) by smtp.gmail.com with ESMTPSA id u26sm18870919qtb.1.2017.12.25.11.52.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Dec 2017 11:52:33 -0800 (PST) Sender: Mark Johnston Date: Mon, 25 Dec 2017 11:51:17 -0800 From: Mark Johnston To: Peter Holm Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327168 - head/sys/vm Message-ID: <20171225195117.GA68801@wkstn-mjohnston.west.isilon.com> References: <201712241945.vBOJjGV5051696@repo.freebsd.org> <20171225174946.GA9941@x2.osted.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171225174946.GA9941@x2.osted.lan> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 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: Mon, 25 Dec 2017 19:52:36 -0000 On Mon, Dec 25, 2017 at 06:49:46PM +0100, Peter Holm wrote: > On Sun, Dec 24, 2017 at 07:45:16PM +0000, Mark Johnston wrote: > > Author: markj > > Date: Sun Dec 24 19:45:16 2017 > > New Revision: 327168 > > URL: https://svnweb.freebsd.org/changeset/base/327168 > > > > Log: > > Fix two problems with the page daemon control loop. > > > > Both issues caused the page daemon to erroneously go to sleep when > > applications are consuming free pages at a high rate, leaving the > > application threads blocked in VM_WAIT. > > > > 1) After completing an inactive queue scan, concurrent allocations may > > have prevented the page daemon from meeting the v_free_min threshold. > > In this case, the page daemon was going to sleep even when the > > inactive queue contained plenty of clean pages. > > 2) pagedaemon_wakeup() may be called without the free queues lock held. > > This can lead to a lost wakeup if a call occurs after the page daemon > > clears vm_pageout_wanted but before going to sleep. > > > > Fix 1) by ensuring that we start a new inactive queue scan immediately > > if v_free_count < v_free_min after a prior scan. > > > > Fix 2) by adding a new subroutine, pagedaemon_wait(), called from > > vm_wait() and vm_waitpfault(). It wakes up the page daemon if either > > vm_pages_needed or vm_pageout_wanted is false, and atomically sleeps > > on v_free_count. > > > > Reported by: jeff > > Reviewed by: alc > > MFC after: 2 weeks > > Differential Revision: https://reviews.freebsd.org/D13424 > > > > Modified: > > head/sys/vm/vm_page.c > > head/sys/vm/vm_pageout.c > > head/sys/vm/vm_pageout.h > > > > I now see threads blocked in VM_WAIT? > > https://people.freebsd.org/~pho/stress/log/mark013.txt Hmm, I don't see anything obviously wrong here. v_free_count is 38, well below the minimum threshold at which threads will block in VM_WAIT. The page daemon was running and vm_pages_needed is 1, which is expected. This just looks like a case of the page daemon failing to keep up with memory pressure. Do you not see threads entering VM_WAIT with this revision reverted?