Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

Avi Kivity
2011-05-30T14:51:34Z

On 05/30/2011 05:43 PM, Ingo Molnar wrote:
> > I agree that using the cpu to clear memory is not a good idea, it
> > just causes cache pollution.
>
> Yeah, but even cache-neutral clearing (either driven from the CPU
> from the idle thread or by a DMA engine) is not a particularly good
> idea: because it uses up a finite resource: memory bandwidth.

I think that on modern machines it's not such an issue, at least
compared to cpu time.

> Can we
> create 'idle' DMA transactions - once that never get in the way of
> real DMA transactions?

Not to my knowledge.

> Also, a profile of a typical kernel build shows:
>
> 0.69% cc1 [kernel.kallsyms] [k] clear_page_c
> 0.49% cc1 [kernel.kallsyms] [k] page_fault
>
> So while we could improve it, the question is, can we do this without
> accidentally slowing things down by more than 0.69%? And kernel
> builds are a pretty clear_page_c() intense workload.

I usually see much higher clear_page_c, but I'm using a pretty old
system for most of my testing.

--
error compiling committee.c: too many arguments to function