On Wednesday 12 September 2007 11:49, David Chinner wrote:
But you don't do a very good job. When you go above 64 cached mappings,
you purge _all_ of them. fsblock's vmap cache can have a much higher number
(if you want), and purging can just unmap a batch which is decided by a simple
LRU (thus important metadata gets saved).
It also could do a lot better at unmapping. Currently you're just calling
vunmap a lot of times in sequence. That still requires global IPIs and TLB
flushing every time.
This simple patch should easily be able to reduce that number by 2 or 3
orders of magnitude (maybe more on big systems).
http://www.mail-archive.com/linux-arch@vger.kernel.org/msg03956.html
vmap area locking and data structures could also be made a lot better
quite easily, I suspect.
fsblock_memcpy(fsblock *src, int soff, fsblock *dst, int doff, int size); ?
I don't think you've looked nearly far enough with all this low hanging
fruit.
I just gave 4 things which combined might easily reduce xfs vmap overhead
by several orders of magnitude, all without changing much code at all.
-