Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4274337ybl; Tue, 20 Aug 2019 09:25:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqzoe8v6Ze/8qAAh9kd5wR4eX5qEnHr3ZmyTn0ZYmB8mk9+vXDlH45eKpd9/9GOhsbrzrXFj X-Received: by 2002:aa7:9609:: with SMTP id q9mr29807639pfg.232.1566318350359; Tue, 20 Aug 2019 09:25:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566318350; cv=none; d=google.com; s=arc-20160816; b=mVVeAnY065MAOoMss0H04u7MgBZN8+aUtofRlg7BrtjOp8PinOvoNVnnFmDHo0YV5L u6iuh18BShnl/9vRlLo5kC1a2cQPWwjqrHdAwQFqXoEOC58hIAgU/0Tw1d4M5ugdYS9t 8nIM5a64YutMvFOfEqbmGFTxt1Q9xrNW//ClsYGkhwxWJLoTM0bAtOrnwgQzO9DIjklt 9bs3YuH6BGaoxivSf5IrQ+NSsCH0wMKYP4/AU7/9orBGbPg12yfGQVMOFzRGr+L8kRAH XggRBolyz6cKDlEBFruweQjdTigrGUCtWbvsESM5wzlgiSTH51jr1QOYBQLiX6oFnLOB 0oGA== 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=rtMtxwDFxfWyDwI2VJqXw7UwN79Bf7nonGtI8wZ/AV8=; b=vtp2qfAr0Ato7mZ+kJyhGNK8QCUUcbnWGCqJpKqE4pBUYYoI+pjlTWq/HM/8iQdy1e MIj5sgIC4WG4lnkTczHJN6f4W4QY7FRTH4qTqEfm4TQJL1E0pHRoLP3TNRKv0tcJV2lU GBCzYlanVyQIiCevtR+e/a65a55tNNErGP+iMB3yEunY+aWjnS0Zsdmw3vNe3nMipcF0 eC2zs2KRs3uBl8Sd1msR3uDskwPRY8lATGWwhH5HA9SC/vca2RSYPnOdTgf+UMZhQknQ B0b46alDJn54WqQFHwnxE+PGFaF8U6s8iqYCtaYTcqM8qDTfNI+lEUYNu7hafe9osjzA Smpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=H9A7VyZ+; 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 r9si12518516plo.104.2019.08.20.09.25.34; Tue, 20 Aug 2019 09:25:50 -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=H9A7VyZ+; 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 S1730006AbfHTQYn (ORCPT + 99 others); Tue, 20 Aug 2019 12:24:43 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:44816 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725971AbfHTQYn (ORCPT ); Tue, 20 Aug 2019 12:24:43 -0400 Received: by mail-pg1-f194.google.com with SMTP id i18so3517727pgl.11 for ; Tue, 20 Aug 2019 09:24:42 -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=rtMtxwDFxfWyDwI2VJqXw7UwN79Bf7nonGtI8wZ/AV8=; b=H9A7VyZ+AkTGb6fh3lCfYFGef3H3WPjC2RH9jX+XiptcELpZO/IVJTMVyT/Sf+dan4 weppXZXhDW1iXlZiUi9HyLv0TBydmXbI3zPIZVbjCAoURMxwCDt8a2NtMYgypF1CQVn2 GlCPw+7OQLfLpiS8IbIi31vp55DWdGaBbCrQVXg/73mzxpSao9JWB1WzD/IhP3260bX5 5mpugFVHPCO5zvNjd7SrMXBvGliNdJOHt8A2c6JGgk4vMq6RFMvShQZ7QfFAHUxKGKo8 ER9tanSNhKNj9azM984ZKZlcnPL8HHkvpGy8wxMfgD5b3vJGcLrzzls2YVUElDPhKvB9 zONg== 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=rtMtxwDFxfWyDwI2VJqXw7UwN79Bf7nonGtI8wZ/AV8=; b=ibSrRQdaM6Hoo1uOvGVNn9F5EbJk0rT0UbNGhG5AegN4VwO2YBdGD9pp4eKE9Ifm56 KJuO3yjLVHZl4YjXbaCQxbDU4OHtEMzEtHSxvf5ZAtEQ9nb0xz4tYoJROjAzr/igtmt1 uYP3Z+zmESMlNAoNpm7nAKkrSwzp6d05wRMkZKpr+eww1d9pKPzvqBR1Yvp6WJf6BMAn 0/1Yw3MS+WP3jCniuLZcJUEGmWZWbjIBWcc45+dcaoTmOhLWU13YCTCFdpechZrud9Mo jcz75HPmN+7KWpsdWDIelfBxgkMMOK1fO32LwUHbX3STc9HC37LicLELzEbb1AZGAef/ KAsQ== X-Gm-Message-State: APjAAAWVwmE8jUHyuHycm948Iu9AQEPDZEXVhYo7CyJ/+OYKR16WIiP2 kpSXClIb+KyZl8u4zyXsXVo= X-Received: by 2002:a63:9e43:: with SMTP id r3mr25940504pgo.148.1566318282238; Tue, 20 Aug 2019 09:24:42 -0700 (PDT) Received: from bharath12345-Inspiron-5559 ([103.110.42.36]) by smtp.gmail.com with ESMTPSA id 203sm31373737pfz.107.2019.08.20.09.24.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Aug 2019 09:24:41 -0700 (PDT) Date: Tue, 20 Aug 2019 21:54:32 +0530 From: Bharath Vedartham To: John Hubbard Cc: Dimitri Sivanich , Andrew Morton , jglisse@redhat.com, ira.weiny@intel.com, gregkh@linuxfoundation.org, arnd@arndb.de, william.kucharski@oracle.com, hch@lst.de, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-kernel-mentees@lists.linuxfoundation.org, Michal Hocko Subject: Re: [Linux-kernel-mentees][PATCH v6 1/2] sgi-gru: Convert put_page() to put_user_page*() Message-ID: <20190820162432.GB5153@bharath12345-Inspiron-5559> References: <1566157135-9423-1-git-send-email-linux.bhar@gmail.com> <1566157135-9423-2-git-send-email-linux.bhar@gmail.com> <20190819125611.GA5808@hpe.com> <20190819190647.GA6261@bharath12345-Inspiron-5559> <0c2ad29b-934c-ec30-66c3-b153baf1fba5@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0c2ad29b-934c-ec30-66c3-b153baf1fba5@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 Mon, Aug 19, 2019 at 12:30:18PM -0700, John Hubbard wrote: > On 8/19/19 12:06 PM, Bharath Vedartham wrote: > >On Mon, Aug 19, 2019 at 07:56:11AM -0500, Dimitri Sivanich wrote: > >>Reviewed-by: Dimitri Sivanich > >Thanks! > > > >John, would you like to take this patch into your miscellaneous > >conversions patch set? > > > > (+Andrew and Michal, so they know where all this is going.) > > Sure, although that conversion series [1] is on a brief hold, because > there are additional conversions desired, and the API is still under > discussion. Also, reading between the lines of Michal's response [2] > about it, I think people would prefer that the next revision include > the following, for each conversion site: > > Conversion of gup/put_page sites: > > Before: > > get_user_pages(...); > ... > for each page: > put_page(); > > After: > > gup_flags |= FOLL_PIN; (maybe FOLL_LONGTERM in some cases) > vaddr_pin_user_pages(...gup_flags...) > ... > vaddr_unpin_user_pages(); /* which invokes put_user_page() */ > > Fortunately, it's not harmful for the simpler conversion from put_page() > to put_user_page() to happen first, and in fact those have usually led > to simplifications, paving the way to make it easier to call > vaddr_unpin_user_pages(), once it's ready. (And showing exactly what > to convert, too.) > > So for now, I'm going to just build on top of Ira's tree, and once the > vaddr*() API settles down, I'll send out an updated series that attempts > to include the reviews and ACKs so far (I'll have to review them, but > make a note that review or ACK was done for part of the conversion), > and adds the additional gup(FOLL_PIN), and uses vaddr*() wrappers instead of > gup/pup. > > [1] https://lore.kernel.org/r/20190807013340.9706-1-jhubbard@nvidia.com > > [2] https://lore.kernel.org/r/20190809175210.GR18351@dhcp22.suse.cz > Cc' lkml(I missed out the 'l' in this series). sounds good. It makes sense to keep the entire gup in the kernel rather than to expose it outside. I ll make sure to checkout the emails on vaddr*() API and pace my work on it accordingly. Thank you Bharath > thanks, > -- > John Hubbard > NVIDIA