From owner-freebsd-net@FreeBSD.ORG Thu Feb 13 20:42:48 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBFBD464; Thu, 13 Feb 2014 20:42:48 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 58C6011A7; Thu, 13 Feb 2014 20:42:48 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id s1DKghYA068199; Thu, 13 Feb 2014 22:42:43 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua s1DKghYA068199 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id s1DKghQw068198; Thu, 13 Feb 2014 22:42:43 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 13 Feb 2014 22:42:43 +0200 From: Konstantin Belousov To: John Baldwin Subject: Re: Use of contiguous physical memory in cxgbe driver Message-ID: <20140213204243.GT24664@kib.kiev.ua> References: <21216.22944.314697.179039@hergotha.csail.mit.edu> <201402121446.19278.jhb@freebsd.org> <6154054.5G06XIekg6@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5fM1MC9alg+yIaL4" Content-Disposition: inline In-Reply-To: <6154054.5G06XIekg6@ralph.baldwin.cx> User-Agent: Mutt/1.5.22 (2013-10-16) 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 version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: FreeBSD Net X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 20:42:48 -0000 --5fM1MC9alg+yIaL4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 13, 2014 at 03:16:54PM -0500, John Baldwin wrote: > On Wednesday, February 12, 2014 03:36:38 PM Adrian Chadd wrote: > > On 12 February 2014 11:46, John Baldwin wrote: > > > Is this because UMA keeps lots of mbufs cached in your workload? The > > > physmem buddy allocator certainly seeks to minimize fragmentation.=20 > > > However, it can't go yank memory out of UMA caches to do so. > >=20 > > I'll ask you on irc, but where's that happening? My read of the code > > is that once it grabs a larger page and fragments it, it's lost. >=20 > It seeks to use the smallest size possible however. It is true that we d= on't=20 > attempt to move a busy page elsewhere to free up memory (e.g. if you had = a 2MB=20 > free chunk with one busy 4k page in the middle), but we can't really do t= hat=20 > safely. Given the existence of the direct map, we can't relocate a page = and=20 > be sure that we have also relocated all possible pointers to it. Well, this depends on the current use of the page. We would be unable to page-out if the statement is completely true. We could relocate the 'user' pages, i.e. pages belonging to active or inactive queues, which are not hold/busy/wired. But I agree that for the load discussed, this is a minority and we indeed cannot relocate the content of the unmanaged page. --5fM1MC9alg+yIaL4 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJS/S5CAAoJEJDCuSvBvK1B4gUP/24FZG7RrtEkA8KrsHu+1zol NPlfki66NBnQ0uNdh/KJB/9hJK0ZLQEQhK9B6Z9TkaH54msrAEP+2g8Hr6o3zqdj gV2d6TL4suhvDH1KBkohjaCGRDAGNaPUDgkgEPy4QeJOB57Yr3MVAjR3XhYDLyAa E8RtA1CuswA8xTIlZlaX0iZcZSbFXVqK/rGiC01X2FzsVhbhl5Pl5zcPg25xn162 ZycAZ4saWHipepoCXonk87LzKQeTB5XCZfer2nUra/ZAAjmvgpmYQq1pkLMj0WGi GC1pSM+RhvXvVvAVrSbsS6Axhc1nfYw2I9TPiFoQ3XK8qXAO3JXoHxarEw68QzVZ hZkRw5KTkUSkOC12MdOOJCiWIdWY7zqnhXHTVzeaTKIjSUEA+C3dmvZqMcp+EWhA pTDCZv36wjfCZc4ytFgt+P6viMZpMBj11g2eZgAp0mD0NFbuhRxcDaZTDl593E9W nTmDuE7uEvphH2mx3QR4GToPnCp5BBhrpo3EfPSkrkyaJjjHmtcFjOezXHlAZkJ0 rVDX8vwF6RTrEnf+CWowDPkjnpBmGzTbZJ64nMbZWNNwCY8974e7gCnOLkmZVME3 Fo5aNzmg4WescCrOZePAmi6td6drsT36Fr9UNEVzehZYPbajvMKGV7o3d/eK16Ev SJvznEgF93vnB4hq9lTe =Zsai -----END PGP SIGNATURE----- --5fM1MC9alg+yIaL4--