Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2265433ybl; Thu, 30 Jan 2020 14:20:27 -0800 (PST) X-Google-Smtp-Source: APXvYqxe1t1T6sxjFOFqPDiWmyNuE9Si0Pg+nVAwXGWTpnymuVnaJrwu5UfTjHbdn+NMzfnCG1RS X-Received: by 2002:aca:50cd:: with SMTP id e196mr4382995oib.178.1580422827195; Thu, 30 Jan 2020 14:20:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580422827; cv=none; d=google.com; s=arc-20160816; b=x6ePlT1rr9mb2ZczGT/PbTRLml44wgqqMi+ykHVPAR3POdHS0y7ew3Ds6vg17cm+o3 vyFF7b8jq0Ig3yx/7oqX5c6waZ7cG5trcFpZIN1PS9ZdAfyJblcJ+WP6oQLKyn4aNocc 94JiYd9/pGfU+qUaXIWnFkZlXlK9uongM2mPHN/4zErc1jaMu3XD4Z/yW3xtkxZ16bkg 42fUurzbt7zWuZqrbsA1+TEtMwMqrwdfLPzmj/TjNDXkWRi71EVCzr1Ls96eK3ZONuZI mpCchDTo3GZU069U+GnfTPDkxQjmCm+ZXuuKzuSlKEMUtZo2alVQFi0fVdyMaDAIorR0 Llow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=GL8YlOuK+lPzvntmToerBw7cag+fxZ5AswnfHKR/VLk=; b=NLegdcZ1ntZcAyXvT0xQfAuMKB+Z1tu3U3YHbhD9glfs2dNn2yoG5Ufy+C4J+9w9ci yDJaA7zuAju192FOwTNOD54PSdMM/654mccY3AnKhj9o5l8N2NPVy0FBEYvJ0+jldHdD GdIgsmMAuDG3p395N+dFgaMQ3quwqZdC8CjpSyYZwbBYIaexYX1AtF/73sSBnQjkd+mq 6e/6QkvnaYIv8u/eE5TzI+H1qdFfK602ticJzdCmNa44GrBRCs71W+Fhg1NnMPzTRvvQ wTlEHtthqyI3k5JeoXOS4CnqAGEfufylR6i3y5dwQckvEcATEWufF99JLm+tZ8x5dD7n Thwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qZDwMV4c; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id h8si3145969oib.104.2020.01.30.14.20.14; Thu, 30 Jan 2020 14:20:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qZDwMV4c; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726107AbgA3WSG (ORCPT + 99 others); Thu, 30 Jan 2020 17:18:06 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:53400 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725855AbgA3WSG (ORCPT ); Thu, 30 Jan 2020 17:18:06 -0500 Received: by mail-wm1-f65.google.com with SMTP id s10so5601284wmh.3 for ; Thu, 30 Jan 2020 14:18:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=GL8YlOuK+lPzvntmToerBw7cag+fxZ5AswnfHKR/VLk=; b=qZDwMV4crOkitMmF78zyNFVYRJb9e5CEAC4FCpSUWyji9TxxJJgsUSjQudQUxFKjDe OnWpEQMl0la0WRTBE71vLNCTqZ0FYROPkKOith/+dgUtPhzurU8FSu7MZT9BHX5pKJsg Odnw+zIk7XQEqj69zFrjvFnedoTatx8SnUj/qphLqeOX3aUAs9gi9YogmZLEQ0orZMYU BLBhKyWM8Ea3XP+ewS0doz/fBpU9LVhRAnEEs9DKAav5GgWUmOP903EdO9Crdn3c4ag/ kCObtj/qfwF4ndTi6VhjJ56L85HTLk6oryAENEQ7g4+78P1CH5lkHv2JOaOKVsWfptSt rhYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=GL8YlOuK+lPzvntmToerBw7cag+fxZ5AswnfHKR/VLk=; b=BK+YyN8KLhFJ3AWIdHo9W1709pvyKOIFMCkqSW+TEq8G0G0oc/R0EKWXHy0rTjqqcK H5ofyxDyNyUPE3JPdVmir/VCLitrzYekQ6vgpUcS5Bm8ZSYDrlk/GcKvuPMYT2EbGjZY qXt1z9YlsB2O0nejW8gJh1fuRYjxeZmsmkZsOPZjU7vT1A9DOnumYCDgi5bQfIoXDJIB 4oWjcoxpiu+8ea1erVO1Vr7UwprReeggu4beY0bwNTsZc+nei9jYE5K2qgdWKByQeFVD 5ldcMvpEOTEsPsY6IQwQ/EASrUHGqmAlu4pxeLpZFYD2J6KAotKaeuzgtMl/WjhEq/ed mPkA== X-Gm-Message-State: APjAAAX/EqTlwqWwsRnu6o33C6s8spJCX4trXfLQ/CPoyK6LZ4vdmwJH ZonB9KvE2xxhd4kBt8+P16Y= X-Received: by 2002:a1c:dfd6:: with SMTP id w205mr8017311wmg.151.1580422683872; Thu, 30 Jan 2020 14:18:03 -0800 (PST) Received: from [192.168.2.145] (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.googlemail.com with ESMTPSA id y10sm8959076wrw.68.2020.01.30.14.18.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Jan 2020 14:18:03 -0800 (PST) Subject: Re: [Patch v2 0/4] mm/mremap: cleanup move_page_tables() a little To: Wei Yang , akpm@linux-foundation.org, aneesh.kumar@linux.ibm.com, kirill@shutemov.name, dan.j.williams@intel.com, yang.shi@linux.alibaba.com, thellstrom@vmware.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20200129002642.13508-1-richardw.yang@linux.intel.com> From: Dmitry Osipenko Message-ID: <50f408bd-502e-bd02-53d4-719300736ce2@gmail.com> Date: Fri, 31 Jan 2020 01:18:00 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <20200129002642.13508-1-richardw.yang@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 29.01.2020 03:26, Wei Yang пишет: > 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. > > v2: > * remove 3rd patch which doesn't work on ARM platform. Thanks report from > Dmitry Osipenko > > Wei Yang (4): > mm/mremap: format the check in move_normal_pmd() same as > move_huge_pmd() > mm/mremap: it is sure to have enough space when extent meets > requirement > mm/mremap: calculate extent in one place > mm/mremap: start addresses are properly aligned > > include/linux/huge_mm.h | 2 +- > mm/huge_memory.c | 8 +------- > mm/mremap.c | 17 ++++++----------- > 3 files changed, 8 insertions(+), 19 deletions(-) > Hello Wei, I haven't noticed any problems using the v2. Thank you very much for addressing the problem! Tested-by: Dmitry Osipenko