From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hildenbrand Subject: Re: [RFC][Patch v8 0/7] KVM: Guest Free Page Hinting Date: Tue, 19 Feb 2019 15:45:58 +0100 Message-ID: <6f61a9ce-a85f-aae6-57ad-adfe90e50950@redhat.com> References: <20190204201854.2328-1-nitesh@redhat.com> <20190218114601-mutt-send-email-mst@kernel.org> <44740a29-bb14-e6e6-2992-98d0ae58e994@redhat.com> <93c78cb7-5dc9-39ae-83bf-a4d6426b5221@redhat.com> <20190219093000-mutt-send-email-mst@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Alexander Duyck , Nitesh Narayan Lal , kvm list , LKML , Paolo Bonzini , lcapitulino@redhat.com, pagupta@redhat.com, wei.w.wang@intel.com, Yang Zhang , Rik van Riel , dodgen@google.com, Konrad Rzeszutek Wilk , dhildenb@redhat.com, Andrea Arcangeli To: "Michael S. Tsirkin" Return-path: In-Reply-To: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org >>>> >>>> Also one reason why I am not a fan of working with anything less than >>>> PMD order is because there have been issues in the past with false >>>> memory leaks being created when hints were provided on THP pages that >>>> essentially fragmented them. I guess hugepaged went through and >>>> started trying to reassemble the huge pages and as a result there have >>>> been apps that ended up consuming more memory than they would have >>>> otherwise since they were using fragments of THP pages after doing an >>>> MADV_DONTNEED on sections of the page. >>> >>> I understand your concerns, but we should not let bugs in the hypervisor >>> dictate the design. Bugs are there to be fixed. Interesting read, >>> though, thanks! >> >> Right but if we break up a huge page we are then creating >> more work for hypervisor to reassemble it. > > Yes, but the hypervisor can decide what to do. E.g. on s390x there are > no THP, so nothing to break up. To clarify as that might be confusing: No THP in a KVM guest mapping for now. > > It is all very complicated :) > -- Thanks, David / dhildenb