From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [RFC][Patch v9 0/6] KVM: Guest Free Page Hinting Date: Mon, 25 Mar 2019 11:37:22 -0400 Message-ID: <20190325113543-mutt-send-email-mst@kernel.org> References: <20190306130955-mutt-send-email-mst@kernel.org> <4bd54f8b-3e9a-3493-40be-668962282431@redhat.com> <6d744ed6-9c1c-b29f-aa32-d38387187b74@redhat.com> <6709bb82-5e99-019d-7de0-3fded385b9ac@redhat.com> <6ab9b763-ac90-b3db-3712-79a20c949d5d@redhat.com> <99b9fa88-17b1-f2a9-7dd4-7a8f6e790d30@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Alexander Duyck , David Hildenbrand , kvm list , LKML , linux-mm , 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: Nitesh Narayan Lal Return-path: Content-Disposition: inline In-Reply-To: <99b9fa88-17b1-f2a9-7dd4-7a8f6e790d30@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Mon, Mar 25, 2019 at 10:27:46AM -0400, Nitesh Narayan Lal wrote: > I performed some experiments to see if the current implementation of > hinting breaks THP. I used AnonHugePages to track the THP pages > currently in use and memhog as the guest workload. > Setup: > Host Size: 30GB (No swap) > Guest Size: 15GB > THP Size: 2MB > Process: Guest is installed with different kernels to hint different > granularities(MAX_ORDER - 1, MAX_ORDER - 2 and MAX_ORDER - 3). Memhog  > 15G is run multiple times in the same guest to see AnonHugePages usage > in the host. > > Observation: > There is no THP split for order MAX_ORDER - 1 & MAX_ORDER - 2 whereas > for hinting granularity MAX_ORDER - 3 THP does split irrespective of > MADVISE_FREE or MADVISE_DONTNEED. > -- > Regards > Nitesh > This is on x86 right? So THP is 2M and MAX_ORDER is 8M. MAX_ORDER - 3 ==> 1M. Seems to work out. -- MST