From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 07:25:41 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 298C4718; Sat, 13 Sep 2014 07:25:41 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F2AB4831; Sat, 13 Sep 2014 07:25:40 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s8D7PWnN086006 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Sep 2014 00:25:33 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s8D7PWgP086005; Sat, 13 Sep 2014 00:25:32 -0700 (PDT) (envelope-from jmg) Date: Sat, 13 Sep 2014 00:25:32 -0700 From: John-Mark Gurney To: d@delphij.net Subject: Re: svn commit: r269964 - head/sys/kern Message-ID: <20140913072532.GV82175@funkthat.com> References: <201408140531.s7E5VeWw077792@svn.freebsd.org> <5413C6C1.7090308@delphij.net> <20140913052241.GU82175@funkthat.com> <5413DEBE.7060301@delphij.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5413DEBE.7060301@delphij.net> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Sat, 13 Sep 2014 00:25:33 -0700 (PDT) Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , Xin LI , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 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: Sat, 13 Sep 2014 07:25:41 -0000 Xin Li wrote this message on Sat, Sep 13, 2014 at 14:05 +0800: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 9/13/14 1:22 PM, John-Mark Gurney wrote: > > Xin Li wrote this message on Sat, Sep 13, 2014 at 12:23 +0800: > >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 > >> > >> On 9/13/14 3:41 AM, Adrian Chadd wrote: > >>> Hi guys, > >>> > >>> Both r269963 and r269964 have broken the MIPS platforms with > >>> smaller amounts of RAM (< 64MB.) > >>> > >>> Sean noticed it and filed a bug: > >>> > >>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193465 > >>> > >>> Can we please figure out what changed? Otherwise I'm going to > >>> revert these two changes until we figure out what happened. > >> > >> Could you please try if this would mitigate the issue? > >> > >> Index: sys/kern/kern_malloc.c > >> =================================================================== > >> > >> > - - --- sys/kern/kern_malloc.c (revision 271494) > >> +++ sys/kern/kern_malloc.c (working copy) @@ -717,6 +717,8 > >> @@ kmeminit(void) * a given architecture. */ mem_size = > >> vm_cnt.v_page_count; + if (mem_size <= 32768) /* delphij > >> XXX 128MB */ + kmem_zmax = PAGE_SIZE; > >> > >> if (vm_kmem_size_scale < 1) vm_kmem_size_scale = > >> VM_KMEM_SIZE_SCALE; > >> > > > > Has more research been done on this? My 64MB AVILA board boots > > fine, and ath attaches fine... > > It's theoretically possible that my change brings a regression for > small system, as the larger allocation units now "caches" the > allocation instead of returning them immediately. Sean also confirms > that reverting the two changes only would fix the issue, so I think we > should use some autotune here. I agree that it could possibly bring a regression for small memory systems, but I'm not seeing that w/ mine... and it looks like we have zone draining in the case of low memory, though it looks like we don't have a "target" for how much memory to free, nor do we order which zones we should free from (like remembering where we stopped, so we don't flush all memory, or target zones/buckets)... I'm also concerned that your patch prevents people from using a larger max if they'd like by setting a tunable... Your patch just hard sets it, preventing the tunable to doing anything useful on these smaller systems, so if someone wants the additional zones, they'd need to modify the source... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."