From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f172.google.com (mail-ig0-f172.google.com [209.85.213.172]) by kanga.kvack.org (Postfix) with ESMTP id 686836B0038 for ; Thu, 2 Apr 2015 18:40:59 -0400 (EDT) Received: by igcxg11 with SMTP id xg11so85485899igc.0 for ; Thu, 02 Apr 2015 15:40:59 -0700 (PDT) Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com. [2607:f8b0:4001:c05::231]) by mx.google.com with ESMTPS id o64si5603186ioo.84.2015.04.02.15.40.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Apr 2015 15:40:58 -0700 (PDT) Received: by ignm3 with SMTP id m3so56741073ign.0 for ; Thu, 02 Apr 2015 15:40:58 -0700 (PDT) Date: Thu, 2 Apr 2015 15:40:56 -0700 (PDT) From: David Rientjes Subject: Re: [patch 1/2] mm, doc: cleanup and clarify munmap behavior for hugetlb memory In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Hugh Dickins Cc: Andrew Morton , Jonathan Corbet , Davide Libenzi , Luiz Capitulino , Shuah Khan , Andrea Arcangeli , Joern Engel , Jianguo Wu , Eric B Munson , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, linux-doc@vger.kernel.org On Sun, 29 Mar 2015, Hugh Dickins wrote: > > munmap(2) of hugetlb memory requires a length that is hugepage aligned, > > otherwise it may fail. Add this to the documentation. > > Thanks for taking this on, David. But although munmap(2) is the one > Davide called out, it goes beyond that, doesn't it? To mprotect and > madvise and ... > Yes, good point, munmap(2) isn't special in this case, the alignment to the native page size of the platform should apply to madvise, mbind, mincore, mlock, mprotect, remap_file_pages, etc. I'd hesitate to compile any authoritative list on the behavior in Documentation/vm/hugetlbpage.txt since it would exclude future extensions, but I'll update it to be more inclusive of other mm syscalls rather than specify only munmap(2). -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org