Subject: Re: adventures in pmap
To: None <>
From: Chris Gilbert <>
List: port-arm
Date: 08/12/2002 09:18:23
----- Original Message -----
From: "Chris Gilbert" <>
Sent: Monday, August 12, 2002 3:12 AM

> Evening (or rather morning)
> While looking over the pmap code I noticed that every time we fork a
> we pretty much bzero most of the 16k L1 table, thinking this was
> I decided to fiddle with the code in pmap, mostly with a view to start
> on freeing ptp's when we're finished with them, which means that on
> exit the only pages in the L1 would be the kernel ones, as the rest are
> pmap_removed, which means that the l1pt will have been cleanded up, and
> wouldn't need to be bzero'd, reducing the process creation overhead
> (especially as most processes have maybe 3 ptp's, so only have 12 entries
> the l1pt, so 16k is rather overkill if only 48 bytes had to be cleared.)
> However I stumbled at the first block, it seems that some processes
> (savecore, gdb, fsck) are mapping memory in somehow, but not creating a
> manged ptp for it, I'm wondering if anyone can suggest how?

Of course given some sleep, I suddenly see what's wrong, a ptp maps 4 x 1MB
sections, IE I think the diff should do:
ptp = pmap_get_ptp(pmap, va & (L1_S_FRAME << 2));

gah, that's what I get for late night hacking 8)