From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Hocko Subject: Re: [PATCH RFC] mm/madvise: introduce MADV_POPULATE to prefault/prealloc memory Date: Mon, 22 Feb 2021 15:02:31 +0100 Message-ID: References: <20210217154844.12392-1-david@redhat.com> <640738b5-a47e-448b-586d-a1fb80131891@redhat.com> <73f73cf2-1b4e-bfa9-9a4c-3192d7b7a5ec@redhat.com> <3b5cd68d-c4ac-c6be-8824-34c541d5377b@redhat.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1614002552; h=from:from:reply-to: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=tQUwCSCIacoozWWbNg5Y75DeEqHO/V82HG8+4MkdleE=; b=XJ//OJFgHkJCft0lm/Ifx1G1glYUfDjs1X+uDhSgDlMcoEZI/bmJC+JOl/344uas/6oD4e +RhSfh2QTNn91hYBsi/YrtrCufelAskC+zbrJ3zFaWm7LPgzOfPdOYzmRKO2WMKjvw21a+ yGgIyiIC/ZD+eEDBaHDilHVfTPMo6Qw= Content-Disposition: inline In-Reply-To: <3b5cd68d-c4ac-c6be-8824-34c541d5377b@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 , 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 , James E.J. Bottomle On Mon 22-02-21 14:22:37, David Hildenbrand wrote: > > > Exactly. But for hugetlbfs/shmem ("!RAM-backed files") this is not what we > > > want. > > > > OK, then I must have misread your requirements. Maybe I just got lost in > > all the combinations you have listed. > > Another special case could be dax/pmem I think. You might want to fault it > in readable/writable but not perform an actual read/write unless really > required. > > QEMU phrases this as "don't cause wear on the storage backing". Sorry for being dense here but I still do not follow. If you do not want to read then what do you want to populate from? Only map if it is in the page cache? -- Michal Hocko SUSE Labs