From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH 0/2] Simplify RCU freeing of shadow pages Date: Fri, 20 Apr 2012 12:05:33 +0800 Message-ID: <4F90E08D.7000903@linux.vnet.ibm.com> References: <1334852797-28167-1-git-send-email-avi@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Marcelo Tosatti To: Avi Kivity Return-path: Received: from e28smtp06.in.ibm.com ([122.248.162.6]:42192 "EHLO e28smtp06.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750724Ab2DTEFs (ORCPT ); Fri, 20 Apr 2012 00:05:48 -0400 Received: from /spool/local by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 20 Apr 2012 09:35:45 +0530 Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q3K45avV2633962 for ; Fri, 20 Apr 2012 09:35:37 +0530 Received: from d28av04.in.ibm.com (loopback [127.0.0.1]) by d28av04.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q3K9ZOxf031845 for ; Fri, 20 Apr 2012 19:35:24 +1000 In-Reply-To: <1334852797-28167-1-git-send-email-avi@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 04/20/2012 12:26 AM, Avi Kivity wrote: > This patchset simplifies the freeing by RCU of mmu pages. > > Xiao, I'm sure you thought of always freeing by RCU. Why didn't you choose > this way? I saves a couple of atomics in the fast path. > Avi, we have discussed it last year: https://lkml.org/lkml/2011/6/29/177 I have optimized/simplified for "write flood" a lot, but, unfortunately, the zapping sp is still frequently. Maybe we can cache the zapped sp in a invalid_sp_list to reduce the frequency. Or, we may use SLAB_DESTROY_BY_RCU to free the shadow page.