From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BE90C432BE for ; Mon, 9 Aug 2021 01:41:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C6E5961004 for ; Mon, 9 Aug 2021 01:41:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C6E5961004 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id E3D1F8D0002; Sun, 8 Aug 2021 21:41:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DED178D0001; Sun, 8 Aug 2021 21:41:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D03F58D0002; Sun, 8 Aug 2021 21:41:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0192.hostedemail.com [216.40.44.192]) by kanga.kvack.org (Postfix) with ESMTP id B72BE8D0001 for ; Sun, 8 Aug 2021 21:41:54 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 4B563181AEF31 for ; Mon, 9 Aug 2021 01:41:54 +0000 (UTC) X-FDA: 78453840948.01.B59F565 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf23.hostedemail.com (Postfix) with ESMTP id 7DD89900B8E5 for ; Mon, 9 Aug 2021 01:41:53 +0000 (UTC) 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> X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 7DD89900B8E5 Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="M/HyrZHV"; dmarc=none; spf=none (imf23.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Stat-Signature: pqa7j3a76iutrmrw4zo3nc5ydg7ygaah X-HE-Tag: 1628473313-245995 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: 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?