Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965995AbbBCQjg (ORCPT ); Tue, 3 Feb 2015 11:39:36 -0500 Received: from mail-wi0-f175.google.com ([209.85.212.175]:54435 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754857AbbBCQjd (ORCPT ); Tue, 3 Feb 2015 11:39:33 -0500 Message-ID: <54D0F9BC.4060306@gmail.com> Date: Tue, 03 Feb 2015 17:39:24 +0100 From: "Michael Kerrisk (man-pages)" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Michal Hocko , Minchan Kim CC: mtk.manpages@gmail.com, Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org, Hugh Dickins , Johannes Weiner , Rik van Riel , KOSAKI Motohiro , Mel Gorman , Jason Evans , zhangyanfei@cn.fujitsu.com, "Kirill A. Shutemov" , "Kirill A. Shutemov" Subject: Re: [PATCH v17 1/7] mm: support madvise(MADV_FREE) References: <1413799924-17946-1-git-send-email-minchan@kernel.org> <1413799924-17946-2-git-send-email-minchan@kernel.org> <20141127144725.GB19157@dhcp22.suse.cz> <20141130235652.GA10333@bbox> <20141202100125.GD27014@dhcp22.suse.cz> <20141203000026.GA30217@bbox> <20141203101329.GB23236@dhcp22.suse.cz> <20141205070816.GB3358@bbox> <20141205083249.GA2321@dhcp22.suse.cz> In-Reply-To: <20141205083249.GA2321@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: 3101 Lines: 87 Hello Minchan (and Michal) I did not see this patch until just now when Michael explicitly mentioned it in another discussion because (a) it was buried in an LMKL thread that started a topic that was not about a man-pages patch. (b) linux-man@ was not CCed. When resubmitting this patch, could you please To:me and CC linux-man@ and give the mail a suitable subject line indicating a man-pages patch. On 12/05/2014 09:32 AM, Michal Hocko wrote: > On Fri 05-12-14 16:08:16, Minchan Kim wrote: > [...] >> From cfa212d4fb307ae772b08cf564cab7e6adb8f4fc Mon Sep 17 00:00:00 2001 >> From: Minchan Kim >> Date: Mon, 1 Dec 2014 08:53:55 +0900 >> Subject: [PATCH] madvise.2: Document MADV_FREE >> >> Signed-off-by: Minchan Kim > > Reviewed-by: Michal Hocko > > Thanks! > >> --- >> man2/madvise.2 | 12 ++++++++++++ >> 1 file changed, 12 insertions(+) >> >> diff --git a/man2/madvise.2 b/man2/madvise.2 >> index 032ead7..fc1aaca 100644 >> --- a/man2/madvise.2 >> +++ b/man2/madvise.2 >> @@ -265,6 +265,18 @@ file (see >> .BR MADV_DODUMP " (since Linux 3.4)" >> Undo the effect of an earlier >> .BR MADV_DONTDUMP . >> +.TP >> +.BR MADV_FREE " (since Linux 3.19)" >> +Tell the kernel that contents in the specified address range are no >> +longer important and the range will be overwritten. When there is >> +demand for memory, the system will free pages associated with the >> +specified address range. In this instance, the next time a page in the >> +address range is referenced, it will contain all zeroes. Otherwise, >> +it will contain the data that was there prior to the MADV_FREE call. >> +References made to the address range will not make the system read >> +from backing store (swap space) until the page is modified again. >> +It works only with private anonymous pages (see >> +.BR mmap (2)). >> .SH RETURN VALUE >> On success >> .BR madvise () If I'm reading the conversation right, the initially proposed text was from the BSD man page (which would be okay), but most of the text above seems to have come straight from the page here: http://www.lehman.cuny.edu/cgi-bin/man-cgi?madvise+3 Right? Unfortunately, I don't think we can use that text. It's from the Solaris man page as far as I can tell, and I doubt that it's under a license that we can use. If that's the case, we need to go back and come up with an original text. It might draw inspiration from the Solaris page, and take actual text from the BSD page (which is under a free license), and it might also draw inspiration from Jon Corbet's description at http://lwn.net/Articles/590991/. Could you take another shot this please! Thanks, Michael -- 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/