From patchwork Tue Mar 23 07:48:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Merry X-Patchwork-Id: 12157149 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=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 2C6BFC433DB for ; Tue, 23 Mar 2021 07:49:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 948F5619BB for ; Tue, 23 Mar 2021 07:49:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 948F5619BB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ska.ac.za Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1D2F76B010C; Tue, 23 Mar 2021 03:49:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1A8976B0111; Tue, 23 Mar 2021 03:49:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 098896B0115; Tue, 23 Mar 2021 03:49:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0250.hostedemail.com [216.40.44.250]) by kanga.kvack.org (Postfix) with ESMTP id DE1476B010C for ; Tue, 23 Mar 2021 03:49:14 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id B6B8D8249980 for ; Tue, 23 Mar 2021 07:49:13 +0000 (UTC) X-FDA: 77950363386.02.4483466 Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by imf20.hostedemail.com (Postfix) with ESMTP id 61A6D132 for ; Tue, 23 Mar 2021 07:49:12 +0000 (UTC) Received: by mail-ed1-f41.google.com with SMTP id e7so22241669edu.10 for ; Tue, 23 Mar 2021 00:49:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ska-ac-za.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=AipmUsGW6FfmfSUU27X8f4Y5KaWRTVjRABybZ9TG6Uk=; b=aU3AEUeOOk6GnHRr1PjaRuLwRl5R4fLXDvKAlMzlYTjsQWbNqjD6Ng4w0qf+mCYLFS r+gLPifXsyYQ/Y/bjSzRiPLWZx43qpumKrF5pEMIa7qKNGxSuIIievHRxh40Ik/3hGWE vuSnX1zZbLTKSgxyePoRp4EnJ6Jr5doPiJR1Fgns2ufhm0hKui19q8pswR1I0CeHMXe2 TNoCh8m7LGf5UkxY/AgLwfsRaVR5pxJkVS7kgFaf3UsoonXBMJ4uCt/NoJGfwgofHKTH nrxI4a+wkAjRBcIv2wdAVya0N3cbD2pV95rdqp8pKZfH3vDai+/LC6T/RzNvSszPLu41 BdkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=AipmUsGW6FfmfSUU27X8f4Y5KaWRTVjRABybZ9TG6Uk=; b=uew0PULtgPRtckWoTjwnFAJIxEfnVVw2u6nhEj3nM862hynVRdms44Ow+ET/0NMKfn 7Skh+vhaXDJjKo7ySWSVvvtsafwqLuh89ik7iLkz3Iyyz5w1rbOQsbsdTfzeSteTHE/O dTbilTL1zBH6hs6ErmSLS6BVnWLXD35EV3P8pKiPF3hvvQPIxKEQkVzJI/cCquLYdmyK 6i3cRsLxixBAlxnPW70n2dd3b/GHGRoav/aPdeTfojCWCRX8jTNsHmrjobOizBBvBltV 2jdqGK6SZ5mZr9OE0LvITT6L7YnvIBAofZOJTjCYn6pz8aLeqndYGENJJ5/vn8+79DMC HGig== X-Gm-Message-State: AOAM531B5czNoxhutvMeifPoVtO8H6/gP/LqEzkVjN8mDWZC47YvuJoS cQveDXVbNI/vyYwSY0Q18zll3g== X-Google-Smtp-Source: ABdhPJxh87HBh1TGFoMdMzYO0t/nkzo95hx91hQ0Bw7i/ey2HH2BnIBXObL60jhMZMQQXc+pZepdPw== X-Received: by 2002:a05:6402:1713:: with SMTP id y19mr3344871edu.52.1616485751271; Tue, 23 Mar 2021 00:49:11 -0700 (PDT) Received: from kryton.kat.ac.za (102-182-203-66.ip.afrihost.co.za. [102.182.203.66]) by smtp.gmail.com with ESMTPSA id u24sm12269638edt.85.2021.03.23.00.49.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Mar 2021 00:49:10 -0700 (PDT) Date: Tue, 23 Mar 2021 09:48:31 +0200 From: Bruce Merry To: linux-man@vger.kernel.org, Alejandro Colomar Cc: linux-mm@kvack.org Subject: [patch] Clarify that MAP_POPULATE is best-effort Message-ID: <20210323074831.GA7535@kryton.kat.ac.za> MIME-Version: 1.0 Content-Disposition: inline X-Stat-Signature: 6qdq8qmfx9wbahagrm9m1y6beydi17qb X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 61A6D132 Received-SPF: none (ska.ac.za>: No applicable sender policy available) receiver=imf20; identity=mailfrom; envelope-from=""; helo=mail-ed1-f41.google.com; client-ip=209.85.208.41 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616485752-904841 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000084, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: As discussed on linux-mm (https://marc.info/?l=linux-mm&m=161528594100612&w=2), MAP_POPULATE can fail silently if the hugetlb cgroup settings allow huge page reservation but prevents huge pages being allocated. Closes https://bugzilla.kernel.org/show_bug.cgi?id=212153. --- man2/mmap.2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/man2/mmap.2 b/man2/mmap.2 index 164ba196e..03f2eeb2c 100644 --- a/man2/mmap.2 +++ b/man2/mmap.2 @@ -400,6 +400,11 @@ private writable mappings. Populate (prefault) page tables for a mapping. For a file mapping, this causes read-ahead on the file. This will help to reduce blocking on page faults later. +The +.BR mmap () +call doesn't fail if the mapping cannot be populated (for example, due +to limitations on the number of mapped huge pages when using +.BR MAP_HUGETLB ). .BR MAP_POPULATE is supported for private mappings only since Linux 2.6.23. .TP