From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 9 13:41:10 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E9FDE5E6; Sun, 9 Dec 2012 13:41:10 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 03B8E8FC08; Sun, 9 Dec 2012 13:41:09 +0000 (UTC) Received: by mail-ee0-f54.google.com with SMTP id c13so1306618eek.13 for ; Sun, 09 Dec 2012 05:41:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:in-reply-to:references:x-mailer; bh=OtVI3WYqgnD11J1R2dcQaduYsmP9pvJlYuBwh7SezyQ=; b=J7tGQC/tw3bObX1GnMCkMEnHkw/zrJQJpG8Aln4U1YwFnCmsWYKRUHxqgZIvz8u9EF QiWC15WUq02ed6u0ICKXQX2OVXK8uFvjjR/iX/FQfAEYMdHWVn8jgzOYBA+rp73ij8yE pUBczOXLlmapAK0AvoX44KXtTAVklUwWBsBa98XhEFummM4nveop3gG5wdqEZqmkvGfz UEINAFBd0x0Dvos+GOKfQHcqqt3/dc4B8Xj1ACIj6jDzcgCBF4MYoSswqSXovCpkQMl2 vrm8KngE/heONYZ3eJBZdBthlz1+bY2XeKalwGOFgHXJ8Ig7A/SNqIKWCIyioyeI/CY/ WeUQ== Received: by 10.14.0.3 with SMTP id 3mr38572626eea.16.1355060468882; Sun, 09 Dec 2012 05:41:08 -0800 (PST) Received: from DOMYPC (93-138-86-170.adsl.net.t-com.hr. [93.138.86.170]) by mx.google.com with ESMTPS id f49sm36669901eep.12.2012.12.09.05.41.06 (version=SSLv3 cipher=OTHER); Sun, 09 Dec 2012 05:41:07 -0800 (PST) Message-ID: <20121209.134114.135.1@DOMY-PC> From: rank1seeker@gmail.com To: hackers@freebsd.org, alc@freebsd.org, avg@freebsd.org, davide@freebsd.org Subject: Re: huge ktr buffer Date: Sun, 09 Dec 2012 14:41:14 +0100 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <50C0B763.8000004@FreeBSD.org> X-Mailer: POP Peeper (3.8.1.0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2012 13:41:11 -0000 > As also Alan suggested, a way to workaround the problem is to = increase=0D=0A> NKPT value (e.g. from 32 to 64). Obviously, this is not a = proper fix.=0D=0A> For a proper fix the kernel needs to be able to = dynamically set the=0D=0A> size of NKPT. In this particular case, this = wouldn't be too hard, but=0D=0A> there is a different case, where people = preload a large memory disk=0D=0A> image at boot time that isn't so easy = to fix.=0D=0A> =0D=0A> Thanks,=0D=0A> =0D=0A> Davide=0D=0A=0D=0A=0D=0AHad = a same issue.=0D=0AI use very big preloaded images, with full world + = many compiled ports in it.=0D=0A=0D=0AFix:=0D=0A'sh' code snip = ...=0D=0A----=0D=0A# Get default NKTP value=0D=0Ankpt=3D`cat = "/sys/$arch/include/pmap.h" | sed -En = 's/.+NKPT[[:blank:]]+([0-9]{2})$/\1/p'`=0D=0A=0D=0A# How many additional = NKPT (4 Mb each), for our image, added to amount of NKPT?=0D=0A# = Calculated in Kb=0D=0A: $((nkpt +=3D "$img_size" / = 4096))=0D=0A----=0D=0A=0D=0ABut it loads sooooo slow into the = RAM.=0D=0AThat should be enhanced, too.=0D=0A=0D=0A=0D=0ADomagoj = Smol=E8i=E6