From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper Date: Mon, 30 May 2011 17:50:59 +0300 Message-ID: <4DE3AED3.7070405@redhat.com> References: <1306753954.14564.92.camel@lappy> <20110530202646.eff0ea28.yoshikawa.takuya@oss.ntt.co.jp> <4DE381DB.8040804@redhat.com> <20110530114949.GD22324@elte.hu> <1306756681.14564.95.camel@lappy> <20110530122027.GJ22324@elte.hu> <4DE38C50.404@redhat.com> <20110530141058.GA12360@elte.hu> <4DE3A9E8.4010307@redhat.com> <20110530144303.GA13966@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Sasha Levin , Pekka Enberg , Takuya Yoshikawa , kvm@vger.kernel.org, asias.hejun@gmail.com, gorcunov@gmail.com, prasadjoshi124@gmail.com, "Paul E. McKenney" , takuya.yoshikawa@gmail.com To: Ingo Molnar Return-path: Received: from mx1.redhat.com ([209.132.183.28]:61174 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757214Ab1E3Ove (ORCPT ); Mon, 30 May 2011 10:51:34 -0400 In-Reply-To: <20110530144303.GA13966@elte.hu> Sender: kvm-owner@vger.kernel.org List-ID: 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