Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5401670pxv; Wed, 21 Jul 2021 04:41:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmdYQjFKnkvdmu/XVEZ93NCtJPhzcBNHJlKjSS4gPFMk2JSQSYnuhtoFox0++cSwZmFkBj X-Received: by 2002:a50:ed91:: with SMTP id h17mr46742084edr.133.1626867690063; Wed, 21 Jul 2021 04:41:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626867690; cv=none; d=google.com; s=arc-20160816; b=mAmEbilzemAJHS3OJFssQdQmguaMF1rfOKdvLHjnVSzm0F5zUSS+Lb3BKMKMs8zHoG AIo5c1QEmW9P1H7JI2Y1q2w3lBJ7//rn5gjmFp9SYau6/psmkct5+HG0CnHgyat720XU gtHrR6iFJwcO6eRTU8feoxHTkljTNj0QfG0kj12lsmmHefsZSqopGLYRA/nnWG/ySba6 obTWrTQfi7qiHEOfDssUEuNGdElc/XVUgMmmQPdePnuwsskRBDciKlZLT2e3ZmnlqeHL dAv9j+mX0uVv8znuJ8RUYerwHpYGVjBe9P89cQzTuLEODJmkIUOyhW1oKsczHB798D5J VpxQ== 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=tjKLXf0Ng52UH5nHxMTM/eP+9xIaqoGvYekhvlgulkU=; b=aRCaNa9ImSzbO+RMjLxjx521zl76mLvOHtTAL38LrOkY1srvur4RPBCI1ds68aq0j5 5qTInM5rS9vzKd5vlI7c2E9jRTfvEcYWhsce/zSACDStKYeNs04kHrJr0IkPNHu2Sdec 3Rf7AguCGvzzCs/VQgeroqlnCM9PvQRety0GNTDkdVyBaFggc1WmznIND+zd7A/Q8N6L 35qMIE6wdFUKXy6FoRweGtREXWZ4CyBb1KUVJDXI/5W+zWVrgictfNwmflHvZgNFyFkr nABMeDa6Z91hL7ctBLVMD2szc/TrJY+HeG8On59j5VqJDZCfvu0L6HpeA2kFb4tg2ZDw QAjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ml92iat7; 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 ka11si27894158ejc.367.2021.07.21.04.40.52; Wed, 21 Jul 2021 04:41:30 -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=ml92iat7; 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 S237248AbhGUK46 (ORCPT + 99 others); Wed, 21 Jul 2021 06:56:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238015AbhGUKmn (ORCPT ); Wed, 21 Jul 2021 06:42:43 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A898DC061574; Wed, 21 Jul 2021 04:23:20 -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=tjKLXf0Ng52UH5nHxMTM/eP+9xIaqoGvYekhvlgulkU=; b=ml92iat7e/0Z0zUSXyBKWCFT/T +LyfOBlYqxlteYRIYhfLZunuiaY0K4ewec4QNxKTsAhIvGnLKyEVhhQanm/af+BF2OtFcRhk4GElJ 5a3qkimaAA9z/UuwPVhjWwfSHWIRErSBHjJL2JkvMkmBc4Ceclrfn77wnaYSomg+bKyW7LR23ZWw5 SfrPRbkNbOVXp2zoGMtiZYFHSqjVuP96NiR3So0JPPEWP/nd/By1Hku3hx2ymY4pO1kMLzEYCbI9Q LI5fLcJlj77T+vGjXJtV8j+oeZfRQ1PDsGlSIZCUVZStjZsZeWA0daIESAeCtuBMJlF/PReDVvnGc fQJ7Kptw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6AJh-0097oC-3n; Wed, 21 Jul 2021 11:23:10 +0000 Date: Wed, 21 Jul 2021 12:23:09 +0100 From: Matthew Wilcox To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v14 011/138] mm/lru: Add folio LRU functions Message-ID: References: <20210715033704.692967-1-willy@infradead.org> <20210715033704.692967-12-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 11:39:15AM +0300, Mike Rapoport wrote: > On Wed, Jul 21, 2021 at 05:08:44AM +0100, Matthew Wilcox wrote: > > I wanted to turn those last two sentences into a list, but my > > kernel-doc-fu abandoned me. Feel free to submit a follow-on patch to > > fix that ;-) > > Here it is ;-) Did you try it? Here's what that turns into with htmldoc: Description We would like to get this info without a page flag, but the state needs to survive until the folio is last deleted from the LRU, which could be as far down as __page_cache_release. * 1 if folio is a regular filesystem backed page cache folio or a lazily freed anonymous folio (e.g. via MADV_FREE). * 0 if folio is a normal anonymous folio, a tmpfs folio or otherwise ram or swap backed folio. Return An integer (not a boolean!) used to sort a folio onto the right LRU list and to account folios correctly. Yes, we get a bulleted list, but it's placed in the wrong section! Adding linux-doc for additional insight into this problem. For their reference, here's the input: /** * folio_is_file_lru - Should the folio be on a file LRU or anon LRU? * @folio: The folio to test. * * We would like to get this info without a page flag, but the state * needs to survive until the folio is last deleted from the LRU, which * could be as far down as __page_cache_release. * * Return: An integer (not a boolean!) used to sort a folio onto the * right LRU list and to account folios correctly. * * - 1 if @folio is a regular filesystem backed page cache folio * or a lazily freed anonymous folio (e.g. via MADV_FREE). * - 0 if @folio is a normal anonymous folio, a tmpfs folio or otherwise * ram or swap backed folio. */ static inline int folio_is_file_lru(struct folio *folio)