Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7225360pxb; Thu, 18 Feb 2021 05:02:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxT8/0HG5l94mQB+ouoLrXv7SpftJEG9GhhIxGzTh2JvRd2jP6QGLbtKT32x2rRbc+EaVgT X-Received: by 2002:a17:906:17d3:: with SMTP id u19mr4123090eje.316.1613653350492; Thu, 18 Feb 2021 05:02:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613653350; cv=none; d=google.com; s=arc-20160816; b=d61YdPZy/GM1L3s+zXmefvVkD06KNVzuGbae6K7iGszsVV1ULaf5Tg16/q8F1HvsZY YxlSNhFKxYxU3XcT6prL/PRnYNDnddijE10ISHaBhoBjjG/JR9mq6J8kje3zWz42TT5A 4acHYp7DuWQJdY/w3Ko2NGOibvUNGbkPWIgaaOp5/lYK2MI+Cyv6U0Qtl48IelejPc2S XMItam6LhX/+InsCAM6hf7pNdjeb+n+1VRNNIXqHmrgja61sJG0/GmruhaWarFFQFpjd aO5rPy35Dp8h5NDobq5FUhctO2So1WDWSkdSHoHi0+pLHSodnnFvBqcDZMDN/BOloKCM d/Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version; bh=Xhrp3QKjaVxwe9zn+a3tRPrJurecB3V8UgB9p9zHCFU=; b=zSVMl+60LuRBTYzreKsnUCRGF3eEds7n3Xao5loAF7Er2yOHDJYzZO/oYjhIjGvRcZ VugBRZURUbKVC7r5J39bsfLB6c3wBrMMjh0BLRZnMu6nXZX0mIHLuOstRX5z+8TF0OSW Tbhui7fAWUIX6yVmOVKLsXDCh8uvZeEC3d8Htlr8dpmaY26uFm0Ol3V7Uailnaek2rq/ eQWs08woGNpBvzyaI7TLWMvCPXsXoayohhAD+RF8JRTTnCO26TEcgTDEEfd4809j4BnR JZTIG9McEzFshe5Zi3iWFSdyiJtuqtYbaAptKxeMcD9/qz3ZPvKnJqSPn9E1okD1zuT4 ru0A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h23si360571edq.38.2021.02.18.05.02.01; Thu, 18 Feb 2021 05:02:30 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233238AbhBRM74 (ORCPT + 99 others); Thu, 18 Feb 2021 07:59:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232885AbhBRLPk (ORCPT ); Thu, 18 Feb 2021 06:15:40 -0500 X-Greylist: delayed 400 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 18 Feb 2021 03:14:59 PST Received: from mail.sf-mail.de (mail.sf-mail.de [IPv6:2a01:4f8:1c17:6fae:616d:6c69:616d:6c69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74592C061786 for ; Thu, 18 Feb 2021 03:14:59 -0800 (PST) Received: (qmail 5856 invoked from network); 18 Feb 2021 11:07:49 -0000 Received: from mail.sf-mail.de ([2a01:4f8:1c17:6fae:616d:6c69:616d:6c69]:42702 HELO webmail.sf-mail.de) (auth=eike@sf-mail.de) by mail.sf-mail.de (Qsmtpd 0.37dev) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPSA for ; Thu, 18 Feb 2021 12:07:49 +0100 MIME-Version: 1.0 Date: Thu, 18 Feb 2021 12:07:26 +0100 From: Rolf Eike Beer To: Vlastimil Babka Cc: David Hildenbrand , 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" , 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, Linux API Subject: Re: [PATCH RFC] mm/madvise: introduce MADV_POPULATE to prefault/prealloc memory In-Reply-To: <7859a7a0-96e2-72ff-be92-c0af5d642564@suse.cz> References: <20210217154844.12392-1-david@redhat.com> <7859a7a0-96e2-72ff-be92-c0af5d642564@suse.cz> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <50f73055950ff7382f2194134ef0f439@sf-tec.de> X-Sender: eike-kernel@sf-tec.de Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> Let's introduce MADV_POPULATE with the following semantics >> 1. MADV_POPULATED does not work on PROT_NONE and special VMAs. It >> works >> on everything else. >> 2. Errors during MADV_POPULATED (especially OOM) are reported. If we >> hit >> hardware errors on pages, ignore them - nothing we really can or >> should do. >> 3. On errors during MADV_POPULATED, some memory might have been >> populated. Callers have to clean up if they care. >> 4. Concurrent changes to the virtual memory layour are tolerated - we ^t >> process each and every PFN only once, though. >> 5. If MADV_POPULATE succeeds, all memory in the range can be accessed >> without SIGBUS. (of course, not if user space changed mappings in >> the >> meantime or KSM kicked in on anonymous memory). You are talking both about MADV_POPULATE and MADV_POPULATED here. Eike