Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp508670ybt; Mon, 6 Jul 2020 15:07:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycaUlr7NtHXEZnO78UeiPaTpCg9OI/JCVzjR3HGTdGZ+CMyPFXm+STBzII++CiZSluGPDL X-Received: by 2002:a17:907:2108:: with SMTP id qn8mr40386765ejb.16.1594073268874; Mon, 06 Jul 2020 15:07:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594073268; cv=none; d=google.com; s=arc-20160816; b=HMhNR0aMxrT4y8kK/lBVvVlcbMgPNldGc3pPaHPfly7mDgzRqmtvYwK67CH+cOmR8X K90x5TKrJ6dpMKQw6CHB0BFJC+TT9fQFBdw0Rq2DMn7rtETVCrA7O6lCyn/2Wvhm8ALF H7wRvO3gIHQbajlrDGoX+/K+/rdoE/s/tH8tper21kSKas1FXw+k9IlfVnqk1uzD6bQk DQbtG7j0PXF0B2+QWHA3XF97XbRT2fCwi+837XdjQFbqDXr3Pk6T0bA/ndYm4P/syr0R emZ4akDcc0QJu+H9oBhsPMWExejq4tfL2TNutlj/M2kdzO7k0MvIH76q+SzzllWbs+Fa BCag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=fwnfFNKEwONS9Ri0ifGYnWjmFaXQolYJkOcnSn5GMT4=; b=pwYJOblhkE6gcytj0zfDrMX+j1Nhj8YtuK54DYxwlngv0FlfBq0wlSZ39VcRE0xDzI bRwYojr8R8u7BEY/Fl4lGzqufTfnsr17rAGkNX5cyRi1CW4vV5qsdUt46jICxPBLWLpl W4YuhRuACrVvhaIyXYbppP9mzU2CHwJhkDcEjIPIEcgkeZJ+oYTEu/Py7IDSE4PPBmyC 6QoMPi0DM7Hcho1UzVya41X2TMIcaQYv5Z5EMRCbooJFFokTSzHEwdk13Y151eWL5/5E 7P7IKif0QapHPn0rPFQQUpVKIVuTDnLAv8Ty2zQUcHobX9GLXgYthOKFTgtRtWWnuR2l 3L4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SIaPJSHn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g9si14583812eds.291.2020.07.06.15.07.26; Mon, 06 Jul 2020 15:07:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SIaPJSHn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726467AbgGFWGv (ORCPT + 99 others); Mon, 6 Jul 2020 18:06:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726001AbgGFWGv (ORCPT ); Mon, 6 Jul 2020 18:06:51 -0400 Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2E70C061755 for ; Mon, 6 Jul 2020 15:06:50 -0700 (PDT) Received: by mail-ed1-x544.google.com with SMTP id dg28so36609539edb.3 for ; Mon, 06 Jul 2020 15:06:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fwnfFNKEwONS9Ri0ifGYnWjmFaXQolYJkOcnSn5GMT4=; b=SIaPJSHnhLmRrF0rL4Tr0mXNu4GbzdhL3inGoTmLraRHhU3ATbV69UucigCeM0UyY6 wlweqZLaKFDDtt+cP2LRGqc5mhJRVEAhnK3qUNIkVR1pYyeatZ47GMd6iGs+4g44xSyG kf6FTNTzvq3zYHJybpri/2HgNuyJ3ScAvqy/rQ7ilMlWpDs2/ZYkPAUy9URQHqMouPbl uMZ3LdFj4DKdmPm3ulptAEIxsL3CGQ7j0WU4+hwc0AD+qTJhC8iN1GQVTRMltUTCy7OO kyT1sLuI/7DpfP4L+nyShUkAHd4aFC2dWZvXlhCv44JwSM4KFAc23YCDpsRNJNAps5cz rFSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=fwnfFNKEwONS9Ri0ifGYnWjmFaXQolYJkOcnSn5GMT4=; b=TsjXqRMo+AZjC0hEdPGwK0lmkGXwh3G/UV3LirjInYaE887JhKQ2w1i48rslxk26Id BpJJQJv88qA0c4myPYOzCecez3TB4FUuMgph/jPcK1jBW/27WVSCjvgBoLBY548CvTzf 7RsaZuqir5QwzJqDut4SfST/3jCA4UtGK9IxEuF/1fo9X6oPw082X6CzfoEwNcrNBWUx DFhSaYjClMY/bP300o3cFK9uZAozntG9hEETggOBPPi/I/Ok2dl5nLPZt+dNYfYV0mcy rsInHSGV2g3+97vankjKz+5E0eg50AXtHFPhDmwL3OW57hoZL9Jb9nI8Fn4yqbTpK+cF 6YfA== X-Gm-Message-State: AOAM5315HzxzuWb6Y4HlQHDAuNd9dEJxPcngsPbtk1Evssu1J2naZEHy qKh0ZRx61/IrvWpM42z55Ho= X-Received: by 2002:a05:6402:16db:: with SMTP id r27mr59239987edx.139.1594073209736; Mon, 06 Jul 2020 15:06:49 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id x64sm27379026edc.95.2020.07.06.15.06.48 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Jul 2020 15:06:49 -0700 (PDT) Date: Mon, 6 Jul 2020 22:06:48 +0000 From: Wei Yang To: "Kirill A. Shutemov" Cc: Wei Yang , akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, yang.shi@linux.alibaba.com, vbabka@suse.cz, willy@infradead.org, thomas_os@shipmail.org, thellstrom@vmware.com, anshuman.khandual@arm.com, sean.j.christopherson@intel.com, aneesh.kumar@linux.ibm.com, peterx@redhat.com, walken@google.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, digetx@gmail.com Subject: Re: [RESEND Patch v2 0/4] mm/mremap: cleanup move_page_tables() a little Message-ID: <20200706220648.qfzwnitoswbbkdnw@master> Reply-To: Wei Yang References: <20200626135216.24314-1-richard.weiyang@linux.alibaba.com> <20200706100819.flwgozlstn3zl66u@box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200706100819.flwgozlstn3zl66u@box> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 06, 2020 at 01:08:19PM +0300, Kirill A. Shutemov wrote: >On Fri, Jun 26, 2020 at 09:52:12PM +0800, Wei Yang wrote: >> move_page_tables() tries to move page table by PMD or PTE. >> >> The root reason is if it tries to move PMD, both old and new range should be >> PMD aligned. But current code calculate old range and new range separately. >> This leads to some redundant check and calculation. >> >> This cleanup tries to consolidate the range check in one place to reduce some >> extra range handling. > >The patchet looks good to me. I have few nits, but nothing substantial. > >Acked-by: Kirill A. Shutemov > Hi, Kirill Thanks for your review. Andrew, Do you want me to send another version or you would like to adjust it directly? >-- > Kirill A. Shutemov -- Wei Yang Help you, Help me