[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen: arm: add missing flushing dcache to the copy to/clean guest functions



On Sun, 2013-12-01 at 16:21 +0000, Stefano Stabellini wrote:
> On Tue, 26 Nov 2013, Oleksandr Dmytryshyn wrote:
> > Hi to all.
> > 
> > Currently we use Dom0 kernel size about 30 MBytes (on Panda5 board).
> > 
> > I've measured a flushing time in the 2 cases:
> > 1. Flush about 30 MBytes (flush_xen_dcache_va_range() function) -  1280 uS
> > 2. Full dcache flush (I've ported this from u-boot to the hypervisor) - 93 
> > uS
> 
> The difference is huge!
> 
> Does the "full dcache flush" cost 93 uS no matter the address range we
> want to flush?

I assume it uses flushes by set/way so it will depend on the processor's
cache parameters, but will almost certainly require far less individual
operations than doing a page by page flush of even a moderately sized
region.

These timing don't take into account the "collateral damage" of flushing
a bunch of unrelated data out of the cache which will need reloading,
though.

> How long does it take to flush only the kernel, initramfs and DTB using
> flush_xen_dcache_va_range?
> 
> It is probably worth sending a patch with your full dcache flush ported
> from u-boot and start using that.

Yes, license allowing I'd be happy to have such a patch. I suppose this
is mostly code from arch/arm/cpu/armv7/cache_v7.c which is GPL-2.0+.

It would be useful to have such a patch around e.g. for debug and
testing stuff even if it doesn't actually get used in practice...

In the past I've hacked in the Linux kernels asm version of these loops.
I suppose they are more optimal but I am in favour of taking the simpler
C versions unless/until measurement shows that an ASM version is better.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.