From owner-freebsd-stable@FreeBSD.ORG Tue Dec 6 05:33:24 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EE57106566B for ; Tue, 6 Dec 2011 05:33:24 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id B48288FC17 for ; Tue, 6 Dec 2011 05:33:23 +0000 (UTC) Received: by bkat2 with SMTP id t2so9546095bka.13 for ; Mon, 05 Dec 2011 21:33:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=kBd1wWTbFB7rOLHXRusZOfVsaNtGAyltqdLLvau5mio=; b=hAl6z4WGSRa5Ardx5LjBTG4opD1qp+ZFYgCIwX6BqeVhq0P1S7NtVUB6IMPRd6gHrx g2KCqPKVBJhZ9auGEGgo8CvMJk9chkaAPlGyjLejjcgohG2B/y8EOSOrnF1ds1MvOHUB +l7TvwDAPK9VAv6zqKXU+wY62eV+43s9275GA= MIME-Version: 1.0 Received: by 10.180.108.114 with SMTP id hj18mr16498514wib.2.1323149602479; Mon, 05 Dec 2011 21:33:22 -0800 (PST) Received: by 10.180.94.2 with HTTP; Mon, 5 Dec 2011 21:33:22 -0800 (PST) In-Reply-To: References: Date: Tue, 6 Dec 2011 00:33:22 -0500 Message-ID: From: Arnaud Lacombe To: alc@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-stable Subject: Re: PAE broken on 7-STABLE X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Dec 2011 05:33:24 -0000 Hi, On Mon, Dec 5, 2011 at 10:02 PM, Alan Cox wrote: > On Mon, Dec 5, 2011 at 4:15 PM, Arnaud Lacombe wrote= : >> >> Hi, >> >> A FreeBSD 7-STABLE miserably crashes on the following: >> >> Fatal trap 12: page fault while in kernel mode >> cpuid =3D 0; apic id =3D 00 >> fault virtual address =3D 0xbfef0000 >> fault code =A0 =A0 =A0 =A0 =A0 =A0=3D supervisor read, page not present >> instruction pointer =A0 =3D 0x20:0xc05fd1c2 >> stack pointer =A0 =A0 =A0 =A0 =3D 0x28:0xc0af6c7c >> frame pointer =A0 =A0 =A0 =A0 =3D 0x28:0xc0af6cc0 >> code segment =A0 =A0 =A0 =A0 =A0=3D base 0x0, limit 0xfffff, type 0x1b >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=3D DPL 0, pres 1, def32 1, g= ran 1 >> processor eflags =A0 =A0 =A0=3D interrupt enabled, resume, IOPL =3D 0 >> current process =A0 =A0 =A0 =3D 0 () >> trap number =A0 =A0 =A0 =A0 =A0 =3D 12 >> panic: page fault >> cpuid =3D 0 >> KDB: stack >> backtrace: >> db_trace_self_wrapper(c0662728,0,c062b78b,c0af6b28,0,...) at >> db_trace_self_wrapper+0x26panic(c062b78b,c06639cc,c06c1de4,1,1,...) at >> panic+0x106trap_fatal(c0c74388,c065b897,c064d922,10,c0c74000,...) at >> trap_fatal+0x270 >> trap_pfault(c06d4e40,c0c74380,c0af6c40,3,c06c1bc0,...) at >> trap_pfault+0x2aa >> trap(c0af6c3c) at trap+0x36ecalltrap() at calltrap+0x6 >> --- trap 0xc, eip =3D 0xc05fd1c2, esp =3D 0xc0af6c7c, ebp =3D 0xc0af6cc0= --- >> pmap_map(c0af6d68,3f6ba000,6,3fef8000,6,...) at pmap_map+0x72 >> vm_page_startup(c0d3e000,a,c0af6d88,c03f8f26,0,...) at >> vm_page_startup+0x35a >> vm_mem_init(0,af0000,af0020,af0000,0,...) at vm_mem_init+0x18 >> mi_startup() at mi_startup+0x56begin() at begin+0x2c >> >> on a machine with 24GB of RAM, while PAE is meant to support up to 64GB. >> >> =A0- Arnaud >> >> ps: this is just a report, I'm not really expecting anything, any >> longer, from the FreebSD "community". >> > > At this early stage in the boot process, the page table pages for the ker= nel > address space must be statically allocated.=A0 When PAE was still activel= y > used, it was unusual to find machines that had more than about 16GB of RA= M. > So, the static allocation of page table pages was set accordingly.=A0 For > larger machines, it is necessary to increase NKPT.=A0 The following comme= nt > appears in i386/include/pmap.h: > > /* Initial number of kernel page tables. */ > #ifndef NKPT > #ifdef PAE > /* 152 page tables needed to map 16G (76B "struct vm_page", 2M page table= s). > */ > #define NKPT=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 240 > #else > /* 18 page tables needed to map 4G (72B "struct vm_page", 4M page tables)= . > */ > #define NKPT=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 30 > #endif > #endif > > That said, a machine with 24GB of RAM is likely not going to be usable fo= r > many workloads unless you also increase the size of the kernel virtual > address space (and thereby reduce the size of the user virtual address > space). > this might be a silly question to ask, but why FreeBSD's VM (or at least seems to) performs so badly compared to Linux' VM ? Thanks, - Arnaud