Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5729325pxv; Wed, 21 Jul 2021 12:28:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwANpscuJNoCVi388lgmC1384jUvf6MaZfopcIkI5zCX7lHwqSMVymZSVqxtOlJBTwYN+JJ X-Received: by 2002:a05:6e02:1529:: with SMTP id i9mr24637956ilu.163.1626895702467; Wed, 21 Jul 2021 12:28:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626895702; cv=none; d=google.com; s=arc-20160816; b=rX3cDsQLUOcRkwsORi5DIMeSzN84oH+hRMVx+jFej2h3KNQ1R8fuVXkCZni24TG4vz enmOf052mBODk1IbFr+0ukAQkEOPy7cwCnkZKMvUoJ8RYa9/mRCmORcxIpzh2DFEakQA q3kTkRgWpG+Rda+Xtu4vZOYoAM76tGTrPd9/yOALroNLnSE21AQtKhW5dQwlL0L6zokr LRaR5Ntkl0qejJNC2Tw/QmXwTSSwHpteOtD+HOh9xoj5YWvINvzwRT1R7FljmE48JBa6 jUdwGlKtj+xR/lhsNoP7qwcxow4rbHyeaZkhHqv/iS1o2Ccjvo1xPFuFjsezXnkTcW8O qF5Q== 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=YBpwhS9ZChzCmclGgW5KBzQXW6EJpWYAbL9hr9tuKAU=; b=nMqyiZy1zkv6A7duhSj+6HhxAEGlqU0kDXcvMJdAe4ZJ2vABmmwHrouRL+VpDOizsM 2XhW8AC4bZr+9YBmx4Lv3v4J4vrx0cuDjlRxDobSiee62tuAhEftn8PlJs45dMGc0Lsx 7+l7AfXPQUa845nCP4jZqqxN7aEdX8aKprYmEP3pugOpO0bgBHyrFALqrmlTJ5sUNC6u yuXbyy4KnQwyR0fWYbThAf8KvmCTyLw4TMI637hlRygWUe+7VztJwFj5/Vt8jEWNhweh rhri4fMYV3NxNtVl2PlUzSqruhAFn1zh7Wbf3cbeWGOWpENPIJnoAil+qEZAzQ6cMllr CJpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RuZMi6fJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w11si17932417jal.126.2021.07.21.12.28.11; Wed, 21 Jul 2021 12:28:22 -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=@kernel.org header.s=k20201202 header.b=RuZMi6fJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238726AbhGUOAj (ORCPT + 99 others); Wed, 21 Jul 2021 10:00:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:53360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232937AbhGUOAj (ORCPT ); Wed, 21 Jul 2021 10:00:39 -0400 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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