Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964821AbbENNg1 (ORCPT ); Thu, 14 May 2015 09:36:27 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:34109 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964778AbbENNgU (ORCPT ); Thu, 14 May 2015 09:36:20 -0400 Message-ID: <5554A4D0.1020405@gmail.com> Date: Thu, 14 May 2015 15:36:16 +0200 From: "Michael Kerrisk (man-pages)" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Michal Hocko CC: mtk.manpages@gmail.com, Andrew Morton , Linus Torvalds , David Rientjes , LKML , Linux API , linux-mm@kvack.org, Michal Hocko Subject: Re: [PATCH 2/2] mmap2: clarify MAP_POPULATE References: <1431527892-2996-1-git-send-email-miso@dhcp22.suse.cz> <1431527892-2996-3-git-send-email-miso@dhcp22.suse.cz> In-Reply-To: <1431527892-2996-3-git-send-email-miso@dhcp22.suse.cz> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1627 Lines: 46 On 05/13/2015 04:38 PM, Michal Hocko wrote: > From: Michal Hocko > > David Rientjes has noticed that MAP_POPULATE wording might promise much > more than the kernel actually provides and intend to provide. The > primary usage of the flag is to pre-fault the range. There is no > guarantee that no major faults will happen later on. The pages might > have been reclaimed by the time the process tries to access them. Yes, thanks, Michal -- that's a good point to make clearer. Applied, with Reviewed-by: from Eric added. Cheers, Michael > Signed-off-by: Michal Hocko > --- > man2/mmap.2 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/man2/mmap.2 b/man2/mmap.2 > index 1486be2e96b3..dcf306f2f730 100644 > --- a/man2/mmap.2 > +++ b/man2/mmap.2 > @@ -284,7 +284,7 @@ private writable mappings. > .BR MAP_POPULATE " (since Linux 2.5.46)" > Populate (prefault) page tables for a mapping. > For a file mapping, this causes read-ahead on the file. > -Later accesses to the mapping will not be blocked by page faults. > +This will help to reduce blocking on page faults later. > .BR MAP_POPULATE > is supported for private mappings only since Linux 2.6.23. > .TP > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/