From owner-freebsd-hackers@FreeBSD.ORG Sun May 20 23:29:52 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E4F31065675; Sun, 20 May 2012 23:29:52 +0000 (UTC) (envelope-from zec@fer.hr) Received: from mail.zvne.fer.hr (mail.zvne.fer.hr [161.53.66.5]) by mx1.freebsd.org (Postfix) with ESMTP id 159248FC14; Sun, 20 May 2012 23:29:51 +0000 (UTC) Received: from munja.zvne.fer.hr (161.53.66.248) by mail.zvne.fer.hr (161.53.66.5) with Microsoft SMTP Server id 14.2.298.4; Mon, 21 May 2012 01:29:50 +0200 Received: from sluga.fer.hr ([161.53.66.244]) by munja.zvne.fer.hr with Microsoft SMTPSVC(6.0.3790.4675); Mon, 21 May 2012 01:29:20 +0200 Received: from localhost ([161.53.19.8]) by sluga.fer.hr with Microsoft SMTPSVC(6.0.3790.4675); Mon, 21 May 2012 01:29:20 +0200 From: Marko Zec To: Alan Cox Date: Mon, 21 May 2012 01:29:14 +0200 User-Agent: KMail/1.9.10 References: <201205200901.32613.zec@fer.hr> <201205210048.16877.zec@fer.hr> <4FB97A41.70405@rice.edu> In-Reply-To: <4FB97A41.70405@rice.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <201205210129.14718.zec@fer.hr> X-OriginalArrivalTime: 20 May 2012 23:29:20.0682 (UTC) FILETIME=[61E898A0:01CD36E0] Cc: alc@freebsd.org, freebsd-hackers@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: superpages and kmem on amd64 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2012 23:29:52 -0000 On Monday 21 May 2012 01:12:01 Alan Cox wrote: ... > >>> BTW, apparently malloc(size, M_TEMP, M_NOWAIT) requests fail for size> > >>> 1G, even at boot time. Any ideas how to circumvent that (8.3-STABLE, > >>> amd64, 4G physical RAM)? > >> > >> I suspect that you need to increase the size of your kmem map. > > > > Huh any hints how should I achieve that? In desperation I placed > > > > vm.kmem_size=8G > > > > in /boot/loader.conf and got this: > > > > vm.kmem_map_free: 8123924480 > > vm.kmem_map_size: 8364032 > > vm.kmem_size_scale: 1 > > vm.kmem_size_max: 329853485875 > > vm.kmem_size_min: 0 > > vm.kmem_size: 8132288512 > > > > but malloc(2G) still fails... > > Here is at least one reason why it fails: > > void * > uma_large_malloc(int size, int wait) > > Note the type of "size". Can you malloc 1GB? Uff, good catch... malloc(1G) works, malloc(1.99G) works, malloc(2G) doesn't! Anyhow, malloc(1G) is big enough for what I want to do ATM, I was just curious why it breaks with bigger requests. Thanks, Marko