Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754905AbbL0XsM (ORCPT ); Sun, 27 Dec 2015 18:48:12 -0500 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:43238 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752690AbbL0XsH (ORCPT ); Sun, 27 Dec 2015 18:48:07 -0500 X-Original-SENDERIP: 156.147.1.125 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 165.244.98.204 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.223.161 X-Original-MAILFROM: minchan@kernel.org Date: Mon, 28 Dec 2015 08:49:10 +0900 From: Minchan Kim To: Konstantin Khlebnikov CC: Rafael Aquini , "linux-mm@kvack.org" , Andrew Morton , Konstantin Khlebnikov , Linux Kernel Mailing List Subject: Re: KVM: memory ballooning bug? Message-ID: <20151227234910.GA26512@bbox> References: <20151223052228.GA31269@bbox> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB08/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2015/12/28 08:48:02, Serialize by Router on LGEKRMHUB08/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2015/12/28 08:48:02, Serialize complete at 2015/12/28 08:48:02 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1450 Lines: 31 On Sun, Dec 27, 2015 at 08:23:03PM +0300, Konstantin Khlebnikov wrote: > On Wed, Dec 23, 2015 at 8:22 AM, Minchan Kim wrote: > > During my compaction-related stuff, I encountered some problems with > > ballooning. > > > > Firstly, with repeated inflating and deflating cycle, guest memory(ie, > > cat /proc/meminfo | grep MemTotal) decreased and couldn't recover. > > > > When I review source code, balloon_lock should cover release_pages_balloon. > > Otherwise, struct virtio_balloon fields could be overwritten by race > > of fill_balloon(e,g, vb->*pfns could be critical). > > I guess, in original design fill and leak could be called only from single > kernel thread which manages balloon. Seems like lock was added > only for migration. So, locking scheme should be revisited for sure. > Probably it's been broken by some of recent changes. When I read git log, it seems to be broken from introdcuing balloon_compaction. Anyway, ballooning is out of my interest. I just wanted to go ahead my test for a long time without any problem. ;-) If you guys want to redesign the locking scheme fully, please do. Until that, I can go with my test with my patches I just sent. Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/