Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5144415pxv; Tue, 20 Jul 2021 21:09:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw10Iug7WgpYp1nc52G48mwCwGKFW3f9YKbk30r9M0Y3p82GrbOLPhOWLnQTnslJ3LZUVvC X-Received: by 2002:a6b:fe19:: with SMTP id x25mr22817780ioh.39.1626840584539; Tue, 20 Jul 2021 21:09:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626840584; cv=none; d=google.com; s=arc-20160816; b=CR8ij219xiW8GhnfaJrTe75By8hPi59FGhSgAdUKh6RKZw5ap/PtZBxvExOA0swLls ZoD4x69M4/MMP5V1qD8f1NrTK7SLVnPfTHKCVTo9vjwMXL7fjKMY4JdMtY1vRTsWPXVp axg9B3mSsG1JpI/hFeyQ5QCvmYGDWinT7T8HyqTE5OGNOZcX5L+T6LpfBSfyUVZkZpRj oQZNn/ecueSUlgJWfVd1XBit8EjHuDyel8cOhdJygDQRSNg0XCrCNNkCEEhj9aZON5dz QWlmsocyFmNVhE8g+s4X5O1eNmox117c+pqUDmIP4ocdPmw0z2bL/vUQEm/9rnHaQ0yO Nzjw== 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=yFDcRMBQ9XsC1qxHn+UJuS8ZrSYlG5x1Kh5PLuKmJMM=; b=WUFPhpCmZ8/SEPl/PIPArPoTwmANoUitKhOIi28+NRXCcHfZld395BB+ugwkQbpUOx 8mL1DcY5vdjusN3B0EDASl4PKDFSV4lFkfCwAk4YEwXXljYORd2vhVB4cDP9JJzsJpMB fo4oug0wMAw6Ca4DXLLz7Hl2voKuAqb0W3mnaUwgnv66+qInJfXNhqZjtcMHoLVSPhc2 rBQVgu0iEWhgnzG5w3rFU68yECHvJ3LwVnPQ3o1mgZzfu7JZCM5JwiFF0l5ks+x0i4Qs bTHnBMd32P6Nn06Qwx5HvyBgf2wRpUBD6tn2jajvp80lfRc4jm3wcnBjFo3tXIZrew5F 1L5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Gr1SzULn; 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 h21si13249561ila.73.2021.07.20.21.09.32; Tue, 20 Jul 2021 21:09:44 -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=Gr1SzULn; 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 S231764AbhGUD2P (ORCPT + 99 others); Tue, 20 Jul 2021 23:28:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231363AbhGUD2O (ORCPT ); Tue, 20 Jul 2021 23:28:14 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E9F5C061574; Tue, 20 Jul 2021 21:08:51 -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=yFDcRMBQ9XsC1qxHn+UJuS8ZrSYlG5x1Kh5PLuKmJMM=; b=Gr1SzULnnGzEHXK6kypqZDWO7C vrOl03FrqcqFGSllzzDMuoBfJFUSxiSSH0+/k9RBAqED1necOey9qP7PNmQFxbPp+J/EmQXWNBsVs urySsGyXuGBbtFTNTdgqAhoNUorC3VIbLUGZzOvv1qcDyawykI9SR9ULh546ajG+taCy9VR5SMTxy ox6+JF+dIn/7xFy6QAqAaCLvJujqtgeiY01tSg2lYyToscrnL6KDotjnakXlP442fI4Caql+4Zf/b uTjTzMbrSO/+Kx7LyUv7b+rgDa3eLrVj7sOENRB4s+9ostzfjOIQGwLRTeB2Bp5n5IAdS86mIEm4m vTaFyRTg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m63XI-008mBJ-8j; Wed, 21 Jul 2021 04:08:47 +0000 Date: Wed, 21 Jul 2021 05:08:44 +0100 From: Matthew Wilcox To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Yu Zhao , Christoph Hellwig , David Howells , "Kirill A . Shutemov" 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 Tue, Jul 20, 2021 at 01:44:10PM +0300, Mike Rapoport wrote: > It seems mm_inline.h is not a part of generated API docs, otherwise > kerneldoc would be unhappy about missing Return: description. It isn't, but I did add mm_inline.h to Documentation as part of this patch (thanks!) and made this change: /** - * folio_is_file_lru - should the folio be on a file LRU or anon LRU? - * @folio: the folio to test - * - * Returns 1 if @folio is a regular filesystem backed page cache folio - * or a lazily freed anonymous folio (e.g. via MADV_FREE). Returns 0 if - * @folio is a normal anonymous folio, a tmpfs folio or otherwise ram or - * swap backed folio. Used by functions that manipulate the LRU lists, - * to sort a folio onto the right LRU list. + * 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. */ 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 ;-)