Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5130224pxv; Tue, 20 Jul 2021 20:44:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRVUC9YgS0HXTDn7HGA9br4mjJXHAzL3+uViIN3HXZVED2RK4QiVJ+fNigvXegFodXrXa8 X-Received: by 2002:a05:6e02:f05:: with SMTP id x5mr22368690ilj.268.1626839046362; Tue, 20 Jul 2021 20:44:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626839046; cv=none; d=google.com; s=arc-20160816; b=N1N1x/OLaE6s1d+D9P0UIc9JD9MpgEcwM+Zeltd6CFcJg1L7CSRheE4aMXPZyh0tdX RNyKzd3uLa15IY/D7uUknr6rXvjBr1VPFbtV4+K6yUqNkHEhUFmahGZl11caQ8T8+rM7 6ITj3kmpOgaOyDiaZLxbVZRjx2RO+v1gbXjGF7NK28IySuM7NSAD0B5gPQ858NGZXPqi 0tussZpzA33j93FEFFx0pCKcH2crsx4SoGx3loBgqFJdCqvdjwlBNC97wTvaNZHMh2Gr JXozNrt7/2QDk60DCGZQjst8LE8KdmKisWcrmOK4ZnRJuP21dIuumOhdWIqBtbiaQ07I c3DA== 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=dsRmYc7lEaqoP2+X6AguZk7ez1NBxMNjdl517TP8RNk=; b=wX6CiN32kexmi3YrntwUEVQColVjDgKxIdjTDnfuWaFORGY/9Qs8d1zkfYam8VfjVh t3BLRqqNpFSWSheal8JagqioHEYY3+WXK6/GVjRBGfqbjbR54rVMrjOAaIlOl6XqfNW4 tR941KE05GAvlLO2SWQvx0YMl+7ubKSLPJywdmG+PPb7bNIDnK6KB2oU95b6iVg5EVj5 XEkEAERayzR7P7Q9LyUzp3DBy6jg+IianDdE1FGN7ZgDQv+NVuPhh1suJHqi1ITeqcpE pN0UD047asw4Fms7H1sojv3vMzBMZP0bEQeDoXSReJSbp7s3M2waAqX972fDfqR/Umd6 q5GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=cuaVsBuj; 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 x90si15312853jah.3.2021.07.20.20.43.52; Tue, 20 Jul 2021 20:44:06 -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=cuaVsBuj; 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 S231428AbhGUDCP (ORCPT + 99 others); Tue, 20 Jul 2021 23:02:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231363AbhGUDCN (ORCPT ); Tue, 20 Jul 2021 23:02:13 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64802C061574; Tue, 20 Jul 2021 20:42:50 -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=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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.