Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1602607pxb; Mon, 22 Feb 2021 06:24:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCQQuYQ0Ah+4RaNweudyQ0/BG6RRjdetILdUVZDFst51arrP14O5UnZjtvnqqopZbv4kYe X-Received: by 2002:a50:fa85:: with SMTP id w5mr22980552edr.306.1614003895938; Mon, 22 Feb 2021 06:24:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614003895; cv=none; d=google.com; s=arc-20160816; b=QfBC/iuO3oVQwfKiSnbmmGVG2Ffmy0F1wAMxSVf2hmCiK3HE1bgmgdBtKt+ewQ1HiA 8BX/Hw2ya1ByBiOVlFPLPgFE5bv0CRDGuuqgF6pI3KJR9GruK07dfM9AsCP2DD6X1aXF OBPMCvXRpk6L4P8otd/K/A+N7SUOHNb8A6TrQKOQnRhxI+sGwtxHxMk0Huu3XvXb1DRL 6lgjvEPewt8jqVKrYnFsndkQTab2CASpyOf/juHSW8K7xrcPnwWxuZ69cR3GvSHq87HO QFyVEVqidE9N96vPGSqedWtDA/wMFUJEw7SM+fSFZKl0u7kjRHZ74Pa3QKpDa2Rt8+E3 cXEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tQUwCSCIacoozWWbNg5Y75DeEqHO/V82HG8+4MkdleE=; b=FspsQwe9/Oh6wYdiCraIc/+YPCm8hysptB4WLI4jVmFKSKpyiPv2xCwnXl1bjRmtg6 DO4Mq1uzjnD5DllBxhiSAbhkqbh4Cu++I9mqw4ss0aACM8y5QH1sxkWU/5nkNmC+uj3h CYnjC73DNrqRera/SE6FuvLRRzcZHEYvN++HGtcix7oJEX3Bxr7XgVrNMrb4ApcNAh/Z JOxZzgANZ9O8x/sZnfkoRUGHLn8JSQpcEtq6EiZpJ9C4HhAkGx+O8e7YuukpmzQUgmEw /KA6raptoDsfmNi/EykGAmwu7NbOKAuD3vwcuWBpiU/WJlNDkCNVb17ynaxpKulq/gcb 9Z1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="XJ//OJFg"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z23si13482041edm.39.2021.02.22.06.24.32; Mon, 22 Feb 2021 06:24:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="XJ//OJFg"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232391AbhBVOX1 (ORCPT + 99 others); Mon, 22 Feb 2021 09:23:27 -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-kernel@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