From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755175AbdGKCQ7 (ORCPT ); Mon, 10 Jul 2017 22:16:59 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58381 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754956AbdGKCQ6 (ORCPT ); Mon, 10 Jul 2017 22:16:58 -0400 Subject: Re: [PATCH] mm/mremap: Document MREMAP_FIXED dependency on MREMAP_MAYMOVE To: Mike Kravetz , Michal Hocko , Anshuman Khandual References: <20170710113211.31394-1-khandual@linux.vnet.ibm.com> <20170710134130.GA19645@dhcp22.suse.cz> <40c61daf-da2c-bab9-99d0-a7d7147f4514@oracle.com> Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org From: Anshuman Khandual Date: Tue, 11 Jul 2017 07:45:32 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <40c61daf-da2c-bab9-99d0-a7d7147f4514@oracle.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable x-cbid: 17071102-0040-0000-0000-0000034466F7 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071102-0041-0000-0000-00000CBFCE0B Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-11_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1707110033 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/10/2017 11:01 PM, Mike Kravetz wrote: > On 07/10/2017 06:41 AM, Michal Hocko wrote: >> On Mon 10-07-17 17:02:11, Anshuman Khandual wrote: >>> In the header file, just specify the dependency of MREMAP_FIXED >>> on MREMAP_MAYMOVE and make it explicit for the user space. >> I really fail to see a point of this patch. The depency belongs to the >> code and it seems that we already enforce it >> if (flags & MREMAP_FIXED && !(flags & MREMAP_MAYMOVE)) >> return ret; >> >> So what is the point here? > Agree, I am not sure of your reasoning. > > If to assist the programmer, there is no need as this is clearly specified > in the man page: > > "If MREMAP_FIXED is specified, then MREMAP_MAYMOVE must also be > specified." Yeah the idea was to assist the programmer and I missed the man page's details on this. My bad.