From owner-svn-src-all@FreeBSD.ORG Thu May 2 17:16:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 57DB91000; Thu, 2 May 2013 17:16:56 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pp1.rice.edu (proofpoint1.mail.rice.edu [128.42.201.100]) by mx1.freebsd.org (Postfix) with ESMTP id 287991B28; Thu, 2 May 2013 17:16:55 +0000 (UTC) Received: from pps.filterd (pp1.rice.edu [127.0.0.1]) by pp1.rice.edu (8.14.5/8.14.5) with SMTP id r42AnAI9020295; Thu, 2 May 2013 12:16:54 -0500 Received: from mh3.mail.rice.edu (mh3.mail.rice.edu [128.42.199.10]) by pp1.rice.edu with ESMTP id 1c3847gh73-1; Thu, 02 May 2013 12:16:54 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh3.mail.rice.edu, auth channel Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh3.mail.rice.edu (Postfix) with ESMTPSA id 3EBF14041F; Thu, 2 May 2013 12:16:53 -0500 (CDT) Message-ID: <51829F82.6050402@rice.edu> Date: Thu, 02 May 2013 12:16:50 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:17.0) Gecko/20130127 Thunderbird/17.0.2 MIME-Version: 1.0 To: David Xu Subject: Re: svn commit: r249605 - head/sys/vm References: <201304180534.r3I5YXK4015577@svn.freebsd.org> <5181E1E7.3090708@freebsd.org> In-Reply-To: <5181E1E7.3090708@freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Alan Cox , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 02 May 2013 17:16:56 -0000 On 05/01/2013 22:47, David Xu wrote: > On 2013/04/18 13:34, Alan Cox wrote: >> Author: alc >> Date: Thu Apr 18 05:34:33 2013 >> New Revision: 249605 >> URL: http://svnweb.freebsd.org/changeset/base/249605 >> >> Log: >> When calculating the number of reserved nodes, discount the pages >> that will >> be used to store the nodes. >> >> Sponsored by: EMC / Isilon Storage Division >> >> Modified: >> head/sys/vm/vm_radix.c >> >> Modified: head/sys/vm/vm_radix.c >> ============================================================================== >> >> --- head/sys/vm/vm_radix.c Thu Apr 18 05:12:11 2013 (r249604) >> +++ head/sys/vm/vm_radix.c Thu Apr 18 05:34:33 2013 (r249605) >> @@ -360,10 +360,17 @@ vm_radix_node_zone_init(void *mem, int s >> static void >> vm_radix_prealloc(void *arg __unused) >> { >> + int nodes; >> >> - if (!uma_zone_reserve_kva(vm_radix_node_zone, cnt.v_page_count)) >> + /* >> + * Calculate the number of reserved nodes, discounting the pages >> that >> + * are needed to store them. >> + */ >> + nodes = ((vm_paddr_t)cnt.v_page_count * PAGE_SIZE) / (PAGE_SIZE + >> + sizeof(struct vm_radix_node)); >> + if (!uma_zone_reserve_kva(vm_radix_node_zone, nodes)) >> panic("%s: unable to create new zone", __func__); >> - uma_prealloc(vm_radix_node_zone, cnt.v_page_count); >> + uma_prealloc(vm_radix_node_zone, nodes); >> } >> SYSINIT(vm_radix_prealloc, SI_SUB_KMEM, SI_ORDER_SECOND, >> vm_radix_prealloc, >> NULL); >> > > FYI, after this change, my network card no longer works, the > driver /sys/dev/if_msk.c reports watchdog timeout, backing out > this change works again for me. The only effect of this change should be to reduce the amount of kernel virtual and physical memory preallocated for radix tree nodes by a few percent. I really can't imagine how that impacts the operation of the if_msk.c driver. Can you send me additional info on the affected machine off list? Also, if possible, I'd like to know the values of "nodes" and "cnt.v_page_count". Alan