From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF9B0C433E6 for ; Mon, 22 Feb 2021 14:03:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 918B964E29 for ; Mon, 22 Feb 2021 14:03:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230205AbhBVODi (ORCPT ); Mon, 22 Feb 2021 09:03:38 -0500 Received: from mx2.suse.de ([195.135.220.15]:60314 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232292AbhBVODT (ORCPT ); Mon, 22 Feb 2021 09:03:19 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de 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= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3A2DFAFB0; Mon, 22 Feb 2021 14:02:32 +0000 (UTC) Date: Mon, 22 Feb 2021 15:02:31 +0100 From: Michal Hocko 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. Bottomley" , Helge Deller , Chris Zankel , Max Filippov , linux-alpha@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linux-xtensa@linux-xtensa.org, linux-arch@vger.kernel.org Subject: Re: [PATCH RFC] mm/madvise: introduce MADV_POPULATE to prefault/prealloc memory 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3b5cd68d-c4ac-c6be-8824-34c541d5377b@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org 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