Performance of SheevaPlug on 8-stable

Mark Tinguely tinguely at casselton.net
Mon Mar 15 17:50:57 UTC 2010


On Fri, 12 Mar 2010 18:51, Maks Verver said:
>  On 03/10/2010 04:53 PM, Rafal Jaworowski wrote:
>  > Mark, Can you confirm this worsening over time happens with a fresh
>  > (from scratch) kernel build (with Mark T. patch applied)? Please
>  > provide the scenario / steps which lead to this behaviour.
>
>  Was this directed at me? If so, I've rebuilt the distribution from
>  CURRENT sources (previously, I used 8-STABLE with some patches applied)
>  which I believe includes Mark Tinguely's patches.
>
>  With these patches, the problem doesn't occur for tests that I run
>  immediately after booting. However, if I create a new binary (either by
>  recompiling, which is what I did before, or simply by copying, as I
>  found out) then this new binary executes slowly:
>
>  elysium# time ./test
>  9.000u 0.000s 0:09.07 99.6%     40+1324k 1+0io 0pf+0w
>  elysium# cp test test2
>  elysium# time ./test2
>  287.000u 0.000s 4:48.54 99.5%   40+1322k 0+0io 0pf+0w
>
>  9 seconds is still slower than it should be (Linux runs this test
>  program in 5.4 s) but this may well be a completely separate issue.
>
>  I also added the KASSERT line that Mark Tinguely suggested, but I forgot
>  to enable the INVARIANT option when rebuilding the kernel. I'll have to
>  get back to you on that one.
>
>  Kind regards,
>  Maks Verver.

As a FYI to everyone else, I ask Maks to include a printf statement
in vm_hold_free_pages(); it ensures the vm_page and the KVA are in sync
on the pages that are freed. I also added a printf statement in the
pmap_remove_pages() and pmap_remove_all() routines to make sure they
are not being called before freeing the page.

pmap_remove_pages() is for a memory map being removed. Kernel maps
are global, so we can't go and clear them.

pmap_remove_all() removes all references to a particular page. We
cannot remove the pte entry in pmap_remove_all(), but we might be able
to remove the md.pv_kva value. It seems to me that that kernel allocator
should still call the pmap_[kq]remove() for this page.

Worse case, we can clean the md.pv_kva and md.pv_flags when we free the
page. We might get some objections from the VM people about this.

--Mark Tinguely.


More information about the freebsd-arm mailing list