Some questions about pager

BERTRAND Joel joel.bertrand at systella.fr
Thu Nov 18 19:04:15 CET 2010


Adam Lackorzynski a écrit :
> Hi,
>
> On Wed Nov 17, 2010 at 11:50:29 +0100, BERTRAND Joel wrote:
>> 	It's my first post on this mailing list. A long time ago, I have
>> started to write a VMS-clone (http://www.freevms.net). This
>> opensourced project was sleeping for a long time because monolithic
>> kernel isn't good enough to write a clone of this system.
>>
>> 	Thus, I have restarted this project with a L4 microkernel (exactly
>> pistachio L4/X2). Now, I have written a roottask that tries to
>> launch VMS$INIT, first thread required to boot all system. I have
>> reuse some works done for iguana project (and fixed some bugs).
>>
>> 	When VMS$INIT is started, this thread sends two IPC to its pager :
>>
>> vms$pagefault(addr:1001730, s:8000) [priv=4]
>> ->  default addresse is $1001730 (start address of VMS$INIT thread)
>> ...
>> vms$pagefault(addr:47fe8, s:2000) [priv=4]
>>
>> 	I'm not sure that I have understand how should work a pager. I have
>> uploaded my pager here :
>>
>> http://www.freevms.net/trac/browser/sources/freevms/vm/vm_pagefault.c
>>
>> 	All sources are available with :
>>
>> git clone git://rayleigh.systella.fr/FreeVMS.git
>>
>> and I have uploaded a disk image that runs with qemu (with a x86/64) :
>>
>> http://www.systella.fr/~bertrand/freevms.img.bz2
>>
>> 	My pager tries to find a physical free page to map virtual memory.
>> I think that memory is correctly mapped and I don't understand why
>> pager receives other request with same virtual address. I suppose I
>> have done a mistake.
>
> Given that the first mapping on the code is ok I'd guess the mapping
> s0->roottask doesn't work and thus no map to the app (check by touching
> the memory in roottask). I'm not an expert on x2 but maybe you could
> check whether the mapitem after the sigma0 map call makes sense.
>
>
> Adam

	I have check in http://hg.l4ka.org/l4ka-pistachio-ref/l4-x2.pdf, and I 
think that mapitem makes sense.

	When a pagefault occurs, I obtain :

vms$pagefault(addr:47fe8, s:2000) [priv=4]
memsection 46000 47fff
1 0
V=46000 P=9c000
s0: got msg from 0x0000003a00000001, (0xffffffffc170, 
0x0000000000000001, 0x0000000000989680)
s0: got msg from 0x0000003a00000001, (0xffffffffffa0, 
0x000000000009c0d7, 0x0000000000000000)
s0: allocate_page (tid: 0x3a00000001, addr: 9c000, log2size: 13)
%MEM-I-ACCMAP, accepting mapping
%MEM-I-ACCMAP, virtual  $0000000000046000 - $0000000000047FFF
%MEM-I-ACCMAP, physical $000000000009C000 - $000000000009DFFF
After vms$sigma0_map

	Thus, virtual region 46000-47FFF is mapped in 9C000-9DFFF memory (and 
mapping is accepted). Mapitem seems to be required.

	I'm working on a new web site (because trac takes too CPU time) and new 
git interface is http://www.freevms.net/gitweb. Trac interface will be 
removed soon.

	Regards,

	JKB




More information about the l4-hackers mailing list