From patchwork Fri Jul 10 19:48:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Campbell X-Patchwork-Id: 11657349 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B906314B7 for ; Fri, 10 Jul 2020 19:49:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8434B20748 for ; Fri, 10 Jul 2020 19:49:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="E84Y2WCB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8434B20748 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CB8AA8D0002; Fri, 10 Jul 2020 15:49:24 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C68906B0003; Fri, 10 Jul 2020 15:49:24 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA62D8D0002; Fri, 10 Jul 2020 15:49:24 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0203.hostedemail.com [216.40.44.203]) by kanga.kvack.org (Postfix) with ESMTP id A5E1C6B0002 for ; Fri, 10 Jul 2020 15:49:24 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5F08A180AD837 for ; Fri, 10 Jul 2020 19:49:24 +0000 (UTC) X-FDA: 77023205448.24.drum10_500060026ed1 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id AC1181AA83 for ; Fri, 10 Jul 2020 19:48:53 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,rcampbell@nvidia.com,,RULES_HIT:30054:30056:30064:30070,0,RBL:216.228.121.65:@nvidia.com:.lbl8.mailshell.net-64.10.201.10 62.18.0.100;04y8o3zof4a4x7hfidtbj4iac7ggeocqj6n4xaj5pix6wobf9j87x7up8zfe1p6.9xtzjzdxaoz7x4s5wyt1npmqizwma6izmdzmgbod7ywo3ujigyxo194ryr6w6r1.o-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: drum10_500060026ed1 X-Filterd-Recvd-Size: 3323 Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Fri, 10 Jul 2020 19:48:53 +0000 (UTC) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 10 Jul 2020 12:48:39 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Fri, 10 Jul 2020 12:48:51 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 10 Jul 2020 12:48:51 -0700 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 10 Jul 2020 19:48:44 +0000 Received: from rnnvemgw01.nvidia.com (10.128.109.123) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 10 Jul 2020 19:48:43 +0000 Received: from rcampbell-dev.nvidia.com (Not Verified[10.110.48.66]) by rnnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Fri, 10 Jul 2020 12:48:43 -0700 From: Ralph Campbell To: , , , CC: Jerome Glisse , John Hubbard , Christoph Hellwig , Jason Gunthorpe , "Bharata B Rao" , Shuah Khan , Andrew Morton , Ralph Campbell Subject: [PATCH v2 0/2] mm/migrate: optimize migrate_vma_setup() for holes Date: Fri, 10 Jul 2020 12:48:38 -0700 Message-ID: <20200710194840.7602-1-rcampbell@nvidia.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-NVConfidentiality: public DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1594410519; bh=mfPaUs6+x4bmBVrgZ3KdArEOMvZq2FRlHrjkkL09nCI=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: MIME-Version:X-NVConfidentiality:Content-Transfer-Encoding: Content-Type; b=E84Y2WCBAtmNmgyyncAosp+p3PipEUI8ngP0g0RKi6QzPKJnPnUnZh7yj8lClrVXZ 6N/b9s8B9Ma5U+12zTvMapXSmKTkhd9m4UJ7g9GXyx7NTrlrxSP8poz0VchDozLdVW hWiY0pwHicL4G2SpGQQ1Nya8TwiH5CzC5d92Mx+gPVrsykgm0soh3yjE9m1PBMM39u 6D9PYs1PvRUR7qgzpfQwi9z8LYTcoHDIacXULcRtsx/yzpVAQGy42YVa4jUEu+X7Zt Ibyyki+0kDkjmygV0NPPCbL0l4lsW1JwBvz/r/8TPwTklDDCeNJlGnTnJea3rNGEV6 ex0Vtst4cWI/Q== X-Rspamd-Queue-Id: AC1181AA83 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: A simple optimization for migrate_vma_*() when the source vma is not an anonymous vma and a new test case to exercise it. This is based on linux-mm and is for Andrew Morton's tree. Changes in v2: Do the same check for vma_is_anonymous() for pte_none(). Don't increment cpages if the page isn't migrating. Ralph Campbell (2): mm/migrate: optimize migrate_vma_setup() for holes mm/migrate: add migrate-shared test for migrate_vma_*() mm/migrate.c | 16 ++++++++++-- tools/testing/selftests/vm/hmm-tests.c | 35 ++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-)