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=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 56B38C636C9 for ; Wed, 21 Jul 2021 14:41:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 03B0061248 for ; Wed, 21 Jul 2021 14:41:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03B0061248 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9AF0B6B0083; Wed, 21 Jul 2021 10:41:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 95F6C6B0085; Wed, 21 Jul 2021 10:41:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 84E486B0087; Wed, 21 Jul 2021 10:41:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0104.hostedemail.com [216.40.44.104]) by kanga.kvack.org (Postfix) with ESMTP id 6913D6B0083 for ; Wed, 21 Jul 2021 10:41:17 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 1AB111858255E for ; Wed, 21 Jul 2021 14:41:17 +0000 (UTC) X-FDA: 78386857794.21.E52F80C Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf07.hostedemail.com (Postfix) with ESMTP id BF6AF100C69D for ; Wed, 21 Jul 2021 14:41:16 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id C5B8A608FE; Wed, 21 Jul 2021 14:41:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626878475; bh=tjvEDndwlqVC8D5pilgd6nm+94RRJ1oxz9bJvd0cl40=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RuZMi6fJEhdOKhGCC2OF//03EYGnY0M2mu6VYbhx2NB/55HaBUDY6irzSN1a8b6Bq 5ClVFbJuNzSBtLQDibHKvcjq77579AI4Ig0faWL/zdhmBE8DOdLpgMLlsGopss8GzL yDd0BzER9ZGkq3oG+WzcKiAf9zX0s7Sb8HDEu2xte9Z1JiBmCyLaHJM+/OQVO3LCiM TZ+udFqK1PVOyS887uMFAse0bfeUEX/ZHkZ0Gi6DuRVEyoJjkXB6PpdYpTgami1rpZ 2mC6ftkay+45+lBeE6WOcEApyaYJVBZaLrntevRVIHv9JNghcplSOmW0DR9JAe4ovr EGUTWFXIZdlcw== Date: Wed, 21 Jul 2021 07:41:14 -0700 From: "Darrick J. Wong" To: Matthew Wilcox Cc: Mike Rapoport , 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: <20210721144114.GA8572@magnolia> 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: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=RuZMi6fJ; spf=pass (imf07.hostedemail.com: domain of djwong@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=djwong@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspamd-Server: rspam02 X-Stat-Signature: 7cimn6y7z867wczmo3ssbf9e7wpyng59 X-Rspamd-Queue-Id: BF6AF100C69D X-HE-Tag: 1626878476-545746 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 Wed, Jul 21, 2021 at 04:42:36AM +0100, Matthew Wilcox wrote: > 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. > I like it. :) --D