Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1204056imm; Wed, 19 Sep 2018 14:03:42 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYaN7mpr2rb/IvfEfBTxcJnHRCI7KiwKr3apn99u7Neu6k9JCMu4NzvsXdAUv9XhjIo2TRz X-Received: by 2002:a63:1b52:: with SMTP id b18-v6mr24053589pgm.303.1537391022582; Wed, 19 Sep 2018 14:03:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537391022; cv=none; d=google.com; s=arc-20160816; b=HKW1gnCPhTSqNMBPD5c8jpxBKhhfeFqXl6k8G/ahKfN1LP/20R4FALheV3LTm3OvdL iMOa/fuifWd0/4H+7KyOr7a1sMJIhRLbwDNQzvB9vtT9lVIsn3mpFVfF7EFUrsaunTpd pUXnGAd662GMMgaSOCWSZ2W99CnretZYhyAfRh9k4si/d5aYxB5dfhR+HX5SkWYe6sLt uNt3U8Ls7QgHZolnzTick0LBFYCD30TJ6ILeV/uoGdPeahEgrRksuCb0+DIkNYU3QOIx kvp4I66uqv9lTMPVai9Rx+NcTWH0mPfnKeldtYcsGZEdL4gZ0Rcmspna9I/PFNLGNfuM zG0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=eT9uMWyvpJnCNfEMsHNHgkIhpMQZLOe9gfYaDm83RAM=; b=a3ga7cdXG3ypCk/xVDDbose9340EMtShWT+cD/KzKsRmt26S6BtLIflM+q7xYl1eg+ GTf+2TqHHWfSYNobK/peegZZccyuhHjK6LJSduemJzHRf5pgGe+mIzg59rKb1F8vtrhG zaTfEWwj2Yw/H3aMgEsr5i7/ukeWb2SFLaofPP+sEviBPGowyk2QX6tPqMZLolSeHN24 FUH/4dmzONLGt4zYMSf08doDKVVxiHZ10XF+vC8VX0jpmoy/2NdML4Jh5Jxi6c4OvMnf VtEYkh3MvElfGvb7k7oiPqmsD6e8ia9ZH6eaIPlpOT0rZRrMcnPbC4lMfCpU0/sdrOYa Iw9A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n28-v6si23569593pfg.127.2018.09.19.14.03.27; Wed, 19 Sep 2018 14:03:42 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732225AbeITCkn (ORCPT + 99 others); Wed, 19 Sep 2018 22:40:43 -0400 Received: from mga05.intel.com ([192.55.52.43]:60272 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727781AbeITCkn (ORCPT ); Wed, 19 Sep 2018 22:40:43 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Sep 2018 14:01:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,395,1531810800"; d="scan'208";a="71344731" Received: from unknown (HELO localhost.lm.intel.com) ([10.232.112.44]) by fmsmga007.fm.intel.com with ESMTP; 19 Sep 2018 14:01:01 -0700 From: Keith Busch To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Kirill Shutemov , Dave Hansen , Dan Williams , Keith Busch Subject: [PATCH 0/7] mm: faster get user pages Date: Wed, 19 Sep 2018 15:02:43 -0600 Message-Id: <20180919210250.28858-1-keith.busch@intel.com> X-Mailer: git-send-email 2.13.6 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Pinning user pages out of nvdimm dax memory is significantly slower compared to system ram. Analysis points to software overhead incurred from a radix tree lookup. This patch series fixes that by removing the relatively costly dev_pagemap lookup that was repeated for each page, significantly increasing gup time. The first 5 patches are just updating the benchmark to help test and demonstrate the value of the last 2 patches. The results were compared with following benchmark command for device DAX memory: # gup_benchmark -m $((12*1024)) -n 512 -L -f /dev/dax0.0 Before: 1037581 usec After: 375786 usec Not bad; the after is the same time as using baseline anonymous system RAM after this patch set, where before was nearly 3x longer. Keith Busch (7): mm/gup_benchmark: Time put_page mm/gup_benchmark: Add additional pinning methods tools/gup_benchmark: Fix 'write' flag usage tools/gup_benchmark: Allow user specified file tools/gup_benchmark: Add parameter for hugetlb mm/gup: Combine parameters into struct mm/gup: Cache dev_pagemap while pinning pages include/linux/huge_mm.h | 12 +- include/linux/hugetlb.h | 2 +- include/linux/mm.h | 27 ++- mm/gup.c | 279 ++++++++++++++--------------- mm/gup_benchmark.c | 36 +++- mm/huge_memory.c | 67 ++++--- mm/nommu.c | 6 +- tools/testing/selftests/vm/gup_benchmark.c | 40 ++++- 8 files changed, 262 insertions(+), 207 deletions(-) -- 2.14.4