Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Dec 2011 00:33:22 -0500
From:      Arnaud Lacombe <lacombar@gmail.com>
To:        alc@freebsd.org
Cc:        freebsd-stable <freebsd-stable@freebsd.org>
Subject:   Re: PAE broken on 7-STABLE
Message-ID:  <CACqU3MVH-Y_ybfdopbEQSvo3=8%2BpCEQfeoDsUeoiGHyiBKBbLQ@mail.gmail.com>
In-Reply-To: <CAJUyCcPRCndT%2B8RuSrC64kbJPUhFA0f9bCvGNcmbajstkX8CRg@mail.gmail.com>
References:  <CACqU3MXqSG5PUY_iVFmk8agV0qnHqtZqqi1Qn7LT6Lrp1DTH2w@mail.gmail.com> <CAJUyCcPRCndT%2B8RuSrC64kbJPUhFA0f9bCvGNcmbajstkX8CRg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Mon, Dec 5, 2011 at 10:02 PM, Alan Cox <alan.l.cox@gmail.com> wrote:
> On Mon, Dec 5, 2011 at 4:15 PM, Arnaud Lacombe <lacombar@gmail.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACqU3MVH-Y_ybfdopbEQSvo3=8%2BpCEQfeoDsUeoiGHyiBKBbLQ>