From owner-svn-src-all@FreeBSD.ORG Wed Jun 25 17:12:48 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 ADD91BB; Wed, 25 Jun 2014 17:12:48 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 02A382F30; Wed, 25 Jun 2014 17:12:47 +0000 (UTC) Received: from Julian-MBP3.local (etroy.elischer.org [121.45.232.70]) (authenticated bits=0) by vps1.elischer.org (8.14.8/8.14.8) with ESMTP id s5PHCZEg003635 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 25 Jun 2014 10:12:38 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <53AB02FD.20502@freebsd.org> Date: Thu, 26 Jun 2014 01:12:29 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Alfred Perlstein , 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> <53AAE7D0.2090508@freebsd.org> In-Reply-To: <53AAE7D0.2090508@freebsd.org> 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 17:12:48 -0000 On 6/25/14, 11:16 PM, Alfred Perlstein wrote: > 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? these pages are the VM equivalent of memory pages that were 'found to be flaky and taken out of service" I think "wired" is a bad description for those.