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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 24725C07E9B for ; Wed, 21 Jul 2021 03:42:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7288361181 for ; Wed, 21 Jul 2021 03:42:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7288361181 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E49836B0011; Tue, 20 Jul 2021 23:42:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DD26F6B0036; Tue, 20 Jul 2021 23:42:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C252E6B006C; Tue, 20 Jul 2021 23:42:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0157.hostedemail.com [216.40.44.157]) by kanga.kvack.org (Postfix) with ESMTP id 925136B0011 for ; Tue, 20 Jul 2021 23:42:58 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 1B5408248047 for ; Wed, 21 Jul 2021 03:42:57 +0000 (UTC) X-FDA: 78385198794.15.FFCB3FD Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf30.hostedemail.com (Postfix) with ESMTP id 9CE89E002101 for ; Wed, 21 Jul 2021 03:42:56 +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=dsRmYc7lEaqoP2+X6AguZk7ez1NBxMNjdl517TP8RNk=; b=cuaVsBujpmqfzmiYbxiUG+lXmq ++Ui1/Ic70REJFYqiBVkwOyd3QGSeCGigXG+K6jfltqoo7y8KIH/JaU34COso+QF8nCrbUE9UxIwU 5c1v5I4Fqdq+4+JpomVDrb+lBWoRVvkKY5xEMqbMFf2Eb24H6s2EePnr6zsM24viBjGsip8Znxbgm XIjcwvd8WvL8xipzZUTvTkoBQF8nUDBKSAc1cym13+N41B45HB/3SLv0GRo7TLscDi56UMNMqjeho VKdNsPoW6tdqXzFEjAwZLQwLLl1a69/GWbeezSZW55VtOAJ63w6ohSfD4kCN5zIs23YCt5ZfT8q8Z aIOHYo6g==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6380-008lMj-46; Wed, 21 Jul 2021 03:42:42 +0000 Date: Wed, 21 Jul 2021 04:42:36 +0100 From: Matthew Wilcox To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Jeff Layton , "Kirill A . Shutemov" , Vlastimil Babka , William Kucharski , Christoph Hellwig , David Howells Subject: Re: [PATCH v14 002/138] mm: Introduce struct folio Message-ID: References: <20210715033704.692967-1-willy@infradead.org> <20210715033704.692967-3-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 9CE89E002101 X-Stat-Signature: gee6oi1bf4mif878sagkwsss5mt5fruo Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=cuaVsBuj; spf=none (imf30.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-HE-Tag: 1626838976-829077 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 Tue, Jul 20, 2021 at 01:40:05PM +0300, Mike Rapoport wrote: > > +/** > > + * folio_shift - The number of bits covered by this folio. > > For me this sounds like the size of the folio in bits. > Maybe just repeat "The base-2 logarithm of the size of this folio" here and > in return description? > > > + * @folio: The folio. > > + * > > + * A folio contains a number of bytes which is a power-of-two in size. > > + * This function tells you which power-of-two the folio is. > > + * > > + * Context: The caller should have a reference on the folio to prevent > > + * it from being split. It is not necessary for the folio to be locked. > > + * Return: The base-2 logarithm of the size of this folio. > > + */ I've gone with: /** - * folio_shift - The number of bits covered by this folio. + * folio_shift - The size of the memory described by this folio. * @folio: The folio. * - * A folio contains a number of bytes which is a power-of-two in size. - * This function tells you which power-of-two the folio is. + * A folio represents a number of bytes which is a power-of-two in size. + * This function tells you which power-of-two the folio is. See also + * folio_size() and folio_order(). * * Context: The caller should have a reference on the folio to prevent * it from being split. It is not necessary for the folio to be locked.