Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932244AbdGKLTT (ORCPT ); Tue, 11 Jul 2017 07:19:19 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:54052 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752645AbdGKLTS (ORCPT ); Tue, 11 Jul 2017 07:19:18 -0400 Subject: Re: [RFC] mm/mremap: Remove redundant checks inside vma_expandable() To: Michal Hocko , Vlastimil Babka References: <20170710111059.30795-1-khandual@linux.vnet.ibm.com> <20170710134917.GB19645@dhcp22.suse.cz> <20170711060354.GA24852@dhcp22.suse.cz> <4c182da0-6c84-df67-b173-6960fac0544a@suse.cz> <20170711065030.GE24852@dhcp22.suse.cz> <337a8a4c-1f27-7371-409d-6a9f181b3871@suse.cz> <20170711071612.GG24852@dhcp22.suse.cz> <20170711072223.GH24852@dhcp22.suse.cz> Cc: Anshuman Khandual , linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, mike.kravetz@oracle.com From: Anshuman Khandual Date: Tue, 11 Jul 2017 16:49:03 +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: <20170711072223.GH24852@dhcp22.suse.cz> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable x-cbid: 17071111-0048-0000-0000-00000253EFA1 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071111-0049-0000-0000-00004805661D Message-Id: <0fbc7a4a-9e3f-fb64-65cd-3259335bd07e@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-11_05:,, 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-1707110178 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 658 Lines: 15 On 07/11/2017 12:52 PM, Michal Hocko wrote: > On Tue 11-07-17 09:16:12, Michal Hocko wrote: >> On Tue 11-07-17 08:56:04, Vlastimil Babka wrote: > [...] >>> It doesn't explain why it's redundant, indeed. Unfortunately, the commit >>> f106af4e90ea ("fix checks for expand-in-place mremap") which added this, >>> also doesn't explain why it's needed. >> >> Because it doesn't do anything AFAICS. > > Well, it does actually. I have missed security_mmap_addr hook. But we any way call get_unmapped_area() down the line in the function, it should be covered then. Does the proposed change look good and be considered, or any changes required or can be dropped ?