Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932248AbdGKG4S (ORCPT ); Tue, 11 Jul 2017 02:56:18 -0400 Received: from mx2.suse.de ([195.135.220.15]:60312 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932220AbdGKG4Q (ORCPT ); Tue, 11 Jul 2017 02:56:16 -0400 Subject: Re: [RFC] mm/mremap: Remove redundant checks inside vma_expandable() To: Michal Hocko Cc: Anshuman Khandual , linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, mike.kravetz@oracle.com 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> From: Vlastimil Babka Message-ID: <337a8a4c-1f27-7371-409d-6a9f181b3871@suse.cz> Date: Tue, 11 Jul 2017 08:56:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170711065030.GE24852@dhcp22.suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 796 Lines: 22 On 07/11/2017 08:50 AM, Michal Hocko wrote: > On Tue 11-07-17 08:26:40, Vlastimil Babka wrote: >> On 07/11/2017 08:03 AM, Michal Hocko wrote: >>> >>> Are you telling me that two if conditions cause more than a second >>> difference? That sounds suspicious. >> >> It's removing also a call to get_unmapped_area(), AFAICS. That means a >> vma search? > > Ohh, right. I have somehow missed that. Is this removal intentional? I think it is: "Checking for availability of virtual address range at the end of the VMA for the incremental size is also reduntant at this point." > The > changelog is silent about it. 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.