Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp80579ybl; Fri, 9 Aug 2019 02:50:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPj3A0LFTsedLZxJMsxoWfjNAzl8alwq8rS3MezM1r6zdz6uj4zNLEopXu8X0fUv/U5wpt X-Received: by 2002:a17:90a:f488:: with SMTP id bx8mr8483259pjb.91.1565344254521; Fri, 09 Aug 2019 02:50:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565344254; cv=none; d=google.com; s=arc-20160816; b=ky6SRzcTRCe69+BSbdcn/gku/M9+o/KHgqgQi5nAGX1ml08O8//seidnvtAkpqkDXQ 2uSTyfcteNRV29nlmhke9m07oi5YLwB1ok/HZNywK2flf6qdWsF3j273jQjhbGxNl9NJ p4yM/GR7I8TKc9AhyOK7Ta/zS3ilQmDPNRw8GQF6GCrxVRMrwDF118k8zojs6yfPHRjf GjWJWc9MpQcGY5W4+17uwuMK8OhlrmLGpWyu44eVZMDsKr5xjp2LbcmcYaYuEInWY10Z xz+sLM4pVC99YcV7v1kQ1YWqZQPBDR6LAHu/WboAQ81nkDb8lZbbLOIERpsvOK7Yi35r e60w== 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:message-id:subject:cc :to:from:date:dkim-signature; bh=Ge9zDnKeP5Zu0nmntU1cSXLgT4EnpnKS+7IQa6koc8o=; b=RbyvvcllJMPHsqAtyP7nzDXjRMrRkjVHebFdKN6BbFH0Bqs1p3vUa/fKxyvShy1USM SYyB/0eAhzsAtfw6r8xcCIPghcno7xp9ChCrtnj2J/SNShjHj2CeUgUr0F2aV85KAoWW yi6f8qH/PG6v+NXfxpcxLn+RX0SrY2G0d+ohZHe0ACNqg5z91ihVEtWYucOm4JEj2NNL IWDxr8Dm+4827vdjXwsyeIQ2vlAisVcEBBU8ECjIhlqYegYHr9oFnBXkQjKa4bbM9Haa 1oi0uDstKoY3xZGtZT7BKdGDckVrIN9mwp9e+tDkAt0tw27qAcxht/+wJzchWoGm6Fk8 nbRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=r+rAYd5A; 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 s18si49630993plp.128.2019.08.09.02.50.39; Fri, 09 Aug 2019 02:50:54 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=r+rAYd5A; 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 S2406125AbfHIJpD (ORCPT + 99 others); Fri, 9 Aug 2019 05:45:03 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:33791 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730233AbfHIJpC (ORCPT ); Fri, 9 Aug 2019 05:45:02 -0400 Received: by mail-pg1-f196.google.com with SMTP id n190so4790071pgn.0 for ; Fri, 09 Aug 2019 02:45:02 -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:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Ge9zDnKeP5Zu0nmntU1cSXLgT4EnpnKS+7IQa6koc8o=; b=r+rAYd5AMY5icdk4MZb2mTfCNXTc5DxqZTHJiYkRCv6khogb6xombKcpNQLr8sZkxS rIABZfWtmM3nuRZm9qPBOmb6LzDdi86ahUCXSA1JjScEYA638D1V2QOp4xPXZDgXZQFK vHiE36+IR97fV1aAfPm9vTE8VI5zWkxFalMtMoj3ZToR4qRCL4Jq/yBNzmysUyY6ovT5 Rxy3V21jraMU24Oq/8rdc3KMP92DnWLMysM1N5RjEoDNiB0A1UNa3HBTZph2Ah4MAdSN wwM3NAmIR3Zr9vKpGHgBiq2W2sCerpYlL0Sq1dqBmN720+/ku3xrD8LvtFQ7NMEnIU5Z kqhA== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Ge9zDnKeP5Zu0nmntU1cSXLgT4EnpnKS+7IQa6koc8o=; b=cyANpzgTKfsxAlIYyRhFW5J/DlAxbiruUHm7YLhUvlxoDo5pibSRpZNbZyUKFu9Uut gf3aYoqIc+6Xk6rDMoKpWYOKZ34aRW3egJdA7gue1tB7EG4y9HIZ4nhDxWF3b+A+PGGo 4eaLpEvXDRKFUeyGthYnDFYjiJOSG7yWGaM0UBJ05mWb4J0IgJSBZ5rYUK7EsDcSEpWN Sqf85dsPwqJh+rSoiTdKr0F+OSzK6F304qKgd3vWjAUuydrJwCwxpYYsuZL9wZCs4w0m eqBgdkwRA8vni9GqgQnhVyVQtYGlt7HxsEOckwZlAnZo9dBEvm5mZR4MmANkh03KjtDa Cfgw== X-Gm-Message-State: APjAAAV8TD1LEGr1T77DRn66Kd3xr3WM204sT47s8iqEuHI+TQwBeWP6 S6QYsBPE+WVCwbz7htp2kr8= X-Received: by 2002:a62:e308:: with SMTP id g8mr21369420pfh.162.1565343902160; Fri, 09 Aug 2019 02:45:02 -0700 (PDT) Received: from bharath12345-Inspiron-5559 ([103.110.42.33]) by smtp.gmail.com with ESMTPSA id 64sm98698155pfe.128.2019.08.09.02.44.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Aug 2019 02:45:01 -0700 (PDT) Date: Fri, 9 Aug 2019 15:14:51 +0530 From: Bharath Vedartham To: John Hubbard Cc: arnd@arndb.de, gregkh@linuxfoundation.org, sivanich@sgi.com, ira.weiny@intel.com, jglisse@redhat.com, william.kucharski@oracle.com, hch@lst.de, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: [Linux-kernel-mentees][PATCH v4 1/1] sgi-gru: Remove *pte_lookup functions Message-ID: <20190809094451.GB22457@bharath12345-Inspiron-5559> References: <1565290555-14126-1-git-send-email-linux.bhar@gmail.com> <1565290555-14126-2-git-send-email-linux.bhar@gmail.com> <97a93739-783a-cf26-8384-a87c7d8bf75e@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <97a93739-783a-cf26-8384-a87c7d8bf75e@nvidia.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 08, 2019 at 04:30:48PM -0700, John Hubbard wrote: > On 8/8/19 4:21 PM, John Hubbard wrote: > > On 8/8/19 11:55 AM, Bharath Vedartham wrote: > > ... > >> if (is_gru_paddr(paddr)) > >> goto inval; > >> - paddr = paddr & ~((1UL << ps) - 1); > >> + paddr = paddr & ~((1UL << *pageshift) - 1); > >> *gpa = uv_soc_phys_ram_to_gpa(paddr); > >> - *pageshift = ps; > > > > Why are you no longer setting *pageshift? There are a couple of callers > > that both use this variable. > > > > > > ...and once that's figured out, I can fix it up here and send it up with > the next misc callsites series. I'm also inclined to make the commit > log read more like this: > > sgi-gru: Remove *pte_lookup functions, convert to put_user_page*() > > For pages that were retained via get_user_pages*(), release those pages > via the new put_user_page*() routines, instead of via put_page() or > release_pages(). > > This is part a tree-wide conversion, as described in commit fc1d8e7cca2d > ("mm: introduce put_user_page*(), placeholder versions"). > > As part of this conversion, the *pte_lookup functions can be removed and > be easily replaced with get_user_pages_fast() functions. In the case of > atomic lookup, __get_user_pages_fast() is used, because it does not fall > back to the slow path: get_user_pages(). get_user_pages_fast(), on the other > hand, first calls __get_user_pages_fast(), but then falls back to the > slow path if __get_user_pages_fast() fails. > > Also: remove unnecessary CONFIG_HUGETLB ifdefs. Sounds great! I will send the next version with an updated changelog! Thank you Bharath > > thanks, > -- > John Hubbard > NVIDIA