Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2293643pxt; Sun, 8 Aug 2021 18:44:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGDIYpipkNOqRdexk6FZ5iUAyrt/KUQ7UeUj8hK/87WT3wmWC+IJCEXLBTBEWQ1mTXwqYA X-Received: by 2002:a05:6402:5210:: with SMTP id s16mr18384110edd.343.1628473457933; Sun, 08 Aug 2021 18:44:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628473457; cv=none; d=google.com; s=arc-20160816; b=KNCdh0ld0nMQqULLXLAwfGt4ZiFfvPB+P+YLAwj60/fRGYfANmLR6MedLp2U5qyLMc Vk7oMgN4dufC0n1j4FjMORXIZ6ozNZiTC7mjOuDwSoMQ7cTbpL7QLJrGG6AQM2Il1VWx NMuSWsdiocA5WaSDUGshVWj9Q/YTyOJVTqMORSga8ugKmpYSgfawGG58DAeb54TBRvwD sLeb80bTxM26fmpE5+e43lTT5LhblCHcc4rp8MihXU5oONOZQU4oVPGh0GV1QePnJPgb OCKgs4ll3szDv8GJx7Qien7YT4izeLjPEe+6sy2zhE8bb5B7A/8mqipUlLG1xs9BAzUa S1LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1D7dya4yNEJGvVPgKcmZOdRIp21tqqrRzKcYvvkpGJg=; b=LG4lNEMkCjyFoFJ8Uvg5jMvBrLsnd2/d5jdcOGTwXBjtb1oR8UFgh+LFaH8uU4XEWy Pkrb5RvRZfb8ZQGSZ71huvtJ73RSh8Oa2wkyGu6IK2bglTJNRaTZLOcAgDg7IOn3hdhH JURtIRSLEW7GMIGWGI1dsm7qY8JcNHvTgNrMyJo0iOb9W/E1ryO1vItR1ds+Sye1QH+H zvW2c+K/+zeEUrIDEH7RLJbuv1ACuRUBqtOxqRA0m3oCF2OzVOEXAJUl1zzt/20QZGoi CxauMJqCujrlV3ZH2ykpe28mWk5+NmPVXbXUPcyZRopKkBuuGgxRlKCsiq3UktGntLO4 SGYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="M/HyrZHV"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp8si2803820ejc.247.2021.08.08.18.43.44; Sun, 08 Aug 2021 18:44:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="M/HyrZHV"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232663AbhHIBmM (ORCPT + 99 others); Sun, 8 Aug 2021 21:42:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231324AbhHIBmM (ORCPT ); Sun, 8 Aug 2021 21:42:12 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD952C061757 for ; Sun, 8 Aug 2021 18:41:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=1D7dya4yNEJGvVPgKcmZOdRIp21tqqrRzKcYvvkpGJg=; b=M/HyrZHVc9XfP9qdeuLvEqoq5w APIm4ybWwEqN1SoqlL5aOCqnbyBsBFSIQeAquWa/0ExCObM50+5u6/ZBxT7dMKRyowmvcSd83L8v0 CgtJcFk3a0CpY3ca8fOAkAqnbAmB/yPJ2YcR7f4G45GvMVBMg2GhD7wAfWo2dcksnkL4isP9en4ZD zANHuy/KNXBAi/8KWzXuxo7UAAhk3B5VHW1mjjxCc3GcT5ePwKETo4zO/vjN4K3fcXyeIpxlhGlOY DdXmXGJUOLqwIyrbsN+cpprQ06EwFqEGfMAWTc0gs1ysIwnWGfa09fdjZPs/g925m+MfuJPnZsFS6 OUM+vhLA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mCuGa-00ATUq-38; Mon, 09 Aug 2021 01:40:00 +0000 Date: Mon, 9 Aug 2021 02:39:48 +0100 From: Matthew Wilcox To: John Hubbard Cc: Andrew Morton , LKML , linux-mm@kvack.org Subject: Re: [PATCH 1/3] mm/gup: documentation corrections for gup/pup Message-ID: References: <20210808235018.1924918-1-jhubbard@nvidia.com> <20210808235018.1924918-2-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210808235018.1924918-2-jhubbard@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 08, 2021 at 04:50:16PM -0700, John Hubbard wrote: > @@ -103,8 +103,14 @@ static inline struct page *try_get_compound_head(struct page *page, int refs) > * same time. (That's true throughout the get_user_pages*() and > * pin_user_pages*() APIs.) Cases: > * > - * FOLL_GET: page's refcount will be incremented by 1. > - * FOLL_PIN: page's refcount will be incremented by GUP_PIN_COUNTING_BIAS. > + * FOLL_GET: page's refcount will be incremented by refs. I think this would read more clearly if it said @refs (throughout). > + * > + * FOLL_PIN on compound pages that are > two pages long: page's refcount will > + * be incremented by refs, and page[2].hpage_pinned_refcount will be > + * incremented by refs * GUP_PIN_COUNTING_BIAS. > + * > + * FOLL_PIN on normal pages, or compound pages that are two pages long: > + * page's refcount will be incremented by refs * GUP_PIN_COUNTING_BIAS. > * > * Return: head page (with refcount appropriately incremented) for success, or > * NULL upon failure. If neither FOLL_GET nor FOLL_PIN was set, that's Did you run 'make htmldocs' and see how it renders? I haven't looked, but this might work better as an rst list?