From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Xu Subject: Re: [PATCH RFC] mm/madvise: introduce MADV_POPULATE to prefault/prealloc memory Date: Thu, 18 Feb 2021 17:59:04 -0500 Message-ID: <20210218225904.GB6669@xz-x1> References: <20210217154844.12392-1-david@redhat.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613689149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PKI2EI2akMTifDNZ7stGxIBdP3HZn3yIh1zXVcGhwwI=; b=Mx9/57Xj14d2Ekqps9OMGwCJ0u/FkcWLAdejcCMrVYWm1C5Rz2ufWnOOdNzhwGCxhdbGRR o9mtDgn4ZiK25BlUNFDzSRHO6uiceCtNMfBGdYH5RkYu0TfZQba6Lmti2ElwBxcYCI9ByN RnivzEMdy4PBA+d9iC2JoDhC2/S5nw4= Content-Disposition: inline In-Reply-To: <20210217154844.12392-1-david@redhat.com> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Arnd Bergmann , Michal Hocko , Oscar Salvador , Matthew Wilcox , Andrea Arcangeli , Minchan Kim , Jann Horn , Jason Gunthorpe , Dave Hansen , Hugh Dickins , Rik van Riel , "Michael S . Tsirkin" , "Kirill A . Shutemov" , Vlastimil Babka , Richard Henderson , Ivan Kokshaysky , Matt Turner , Thomas Bogendoerfer Hi, David, On Wed, Feb 17, 2021 at 04:48:44PM +0100, David Hildenbrand wrote: > When we manage sparse memory mappings dynamically in user space - also > sometimes involving MADV_NORESERVE - we want to dynamically populate/ > discard memory inside such a sparse memory region. Example users are > hypervisors (especially implementing memory ballooning or similar > technologies like virtio-mem) and memory allocators. In addition, we want > to fail in a nice way if populating does not succeed because we are out of > backend memory (which can happen easily with file-based mappings, > especially tmpfs and hugetlbfs). Could you explain a bit more on how do you plan to use this new interface for the virtio-balloon scenario? Meanwhile, here you seemed to be talking about file-backed mem, however later it sounds more like for anonymous, so I'm slightly confused. Thanks, -- Peter Xu