Revision 209887

Alan Cox alc at cs.rice.edu
Tue Jul 13 19:16:57 UTC 2010


Mark Tinguely wrote:
> pmap_qenter() is pretty expensive on the ARM processor with VIPT 
> caches, because remapping a KVA can potentially cause the shared 
> mappings to have their cache turned back on and then immediately 
> turned back off and force a cache flush. Revision 209887 makes 
> amd64/i386 pmap_qenter() make smart decisions on the remapping which 
> would help the ARM.
>
> Looking at the buffer code 2 or 3 weeks ago, and  noticed that most of 
> the pmap_qenter() calls were done wisely. At that time, I was 
> wondering if we could/should fix the few places that involved a page 
> by page loop doing bogus_page substitutions and then calling 
> pmap_qenter() for a full buffer re-map instead of the changed page. It 
> appeared to me that we call pmap_qenter() L*B times where L is the 
> number of pages in the buffer and B is the number of bogus pages in 
> the buffer. We only need to change B pages. I can understand it would 
> not be worth the change if typically the number of pages in a buffer 
> and the number of bogus pages in the buffer is small.

I think that vfs_unbusy_pages(), which is used exclusively by NFS, is 
the only remaining case.  I see no reason not to change it.  Go for it.

Alan



More information about the freebsd-arm mailing list