Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Sep 2010 07:32:53 -0700 (PDT)
From:      Svatopluk Kraus <onwahe@gmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   page table fault, which should map kernel virtual address space
Message-ID:  <29760054.post@talk.nabble.com>

next in thread | raw e-mail | index | archive | help

Hallo,

this is about 'NKPT' definition, 'kernel_map' submaps,
and 'vm_map_findspace' function.

Variable 'kernel_map' is used to manage kernel virtual address
space. When 'vm_map_findspace' function deals with 'kernel_map'
then 'pmap_growkernel' function is called.

At least in 'i386' architecture, pmap implementation uses
'pmap_growkernel' function to allocate missing page tables.
Missing page tables are problem, because no one checks
'pte' pointer for validity after use of 'vtopte' macro.

'NKPT' definition defines a number of preallocated
page tables during system boot.

Beyond 'kernel_map', some submaps of 'kernel_map' (buffer_map,
pager_map,...) exist as result of 'kmem_suballoc' function call.
When this submaps are used (for example 'kmem_alloc_nofault'
function) and its virtual address subspace is at the end of
used kernel virtual address space at the moment (and above 'NKPT'
preallocation), then missing page tables are not allocated
and double fault can happen.

I have met this scenario and solved it by increasing
page tables preallocation count ('NKPT' definition).
It's temporary solution which works for the present.

Can someone more advanced and sacred in virtual memory module
solve it (in 'vm_map_findspace' function for example)? Or tell
me that the problem is elsewhere...

  Thanks, Svata
-- 
View this message in context: http://old.nabble.com/page-table-fault%2C-which-should-map-kernel-virtual-address-space-tp29760054p29760054.html
Sent from the freebsd-hackers mailing list archive at Nabble.com.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?29760054.post>