From owner-svn-src-all@FreeBSD.ORG Wed Jun 25 15:16:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9ADAC4E2; Wed, 25 Jun 2014 15:16:32 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 8175A22F8; Wed, 25 Jun 2014 15:16:32 +0000 (UTC) Received: from Alfreds-MacBook-Pro-9.local (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id 2EE181A3C19; Wed, 25 Jun 2014 08:16:32 -0700 (PDT) Message-ID: <53AAE7D0.2090508@freebsd.org> Date: Wed, 25 Jun 2014 08:16:32 -0700 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: attilio@FreeBSD.org, Gleb Smirnoff Subject: Re: svn commit: r267858 - in head/sys/dev: virtio/balloon xen/balloon References: <201406250951.s5P9p8YR017159@svn.freebsd.org> <20140625120932.GM28199@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Alan Cox , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , =?UTF-8?B?Um9nZXIgUGF1IE1vbm7DqQ==?= , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 15:16:32 -0000 On 6/25/14 5:41 AM, Attilio Rao wrote: > On Wed, Jun 25, 2014 at 2:09 PM, Gleb Smirnoff wrote: >> On Wed, Jun 25, 2014 at 01:58:29PM +0200, Attilio Rao wrote: >> A> > Log: >> A> > xen/virtio: fix balloon drivers to not mark pages as WIRED >> A> > >> A> > Prevent the Xen and VirtIO balloon drivers from marking pages as >> A> > wired. This prevents them from increasing the system wired page count, >> A> > which can lead to mlock failing because of hitting the limit in >> A> > vm.max_wired. >> A> >> A> This change is conceptually wrong. >> A> The pages balloon is allocating are unmanaged and they should be wired >> A> by definition. Alan and I are considering enforcing this (mandatory >> A> wired pages for unmanaged pages allocation) directly in the KPI. >> A> This in practice just seem an artifact to deal with scarce wired >> A> memory limit. I suggest that for the XEN case this limit gets bumped >> A> rather relying on similar type of hacks. >> >> Proper limit would be to count pages wired by userland via mlock(2) >> and enforce limit only on those pages. Pages wired by kernel should >> be either unlimited or controled by a separate limit. > FWIW, I mostly agree with this. I think that the kernel and userland > limits should be split apart. But for the time being, rising the limit > is better. > > Attilio > > Can you explain? I would think that if you were designing some kind of embedded device you would want to know exactly how much locked pages there are overall, not just in userland. Meaning you would not want to overcommit and have too many locked pages due to kernel+user. Perhaps that needs an API as well?