From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Liu Subject: Re: [PATCH] xen/tmem: Fix uses of unmatched __map_domain_page() Date: Fri, 06 Dec 2013 14:45:02 +0800 Message-ID: <52A1726E.2090901@oracle.com> References: <1385564104-4254-1-git-send-email-andrew.cooper3@citrix.com> <20131203210014.GA19994@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20131203210014.GA19994@phenom.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: Andrew Cooper , Keir Fraser , Jan Beulich , Xen-devel List-Id: xen-devel@lists.xenproject.org On 12/04/2013 05:00 AM, Konrad Rzeszutek Wilk wrote: > On Wed, Nov 27, 2013 at 02:55:04PM +0000, Andrew Cooper wrote: >> I noticed this while looking through tmem_xen.h with regards to the >> recently-discovered Coverity issues. As the issue was not noticed or >> referenced in Bob's cleanup series, I figured it was fair game, given its >> severity. >> >> __map_domain_page() *must* be matched with an unmap_domain_page(). These five >> static inline functions each map a page (or two), then throw away the context >> needed to unmap it. > > I was trying to figure out how it worked before. I had been running with > tze enabled (I hope!) and I did not trigger any mapcache exhaustion. > > Ah wait, I had been on my nighly regression system - which has some > guests that use tmem but they don't create any load fast enough. > > Let me queue this up and test it. Bob, would appreciate you testing > it too - just in case. > I've done the testing with this patch on trunk and I didn't see any problem. Both dedup and tze are enabled in my testing and I'm sure they were in use. [root@ca-test65 bob.liu]# xm tmem-list --long --all | /usr/sbin/xen-tmem-list-parse WARNING: xend/xm is deprecated. total tmem ops=4139783 (errors=5461) -- tmem pages avail=20918 datastructs: objs=1039 (max=2130) pgps=32422 (max=53149) nodes=1994 (max=2803) pages=26709 (max=46611) pcds=13776 (max=35691) deduped: avg=6.35% (curr=35.47%) tze savings=4.34% Thanks, -Bob