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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19BCFC433EF for ; Fri, 24 Dec 2021 06:13:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 591636B0073; Fri, 24 Dec 2021 01:13:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 540CB6B0075; Fri, 24 Dec 2021 01:13:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 42F4D6B0078; Fri, 24 Dec 2021 01:13:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0239.hostedemail.com [216.40.44.239]) by kanga.kvack.org (Postfix) with ESMTP id 302D66B0073 for ; Fri, 24 Dec 2021 01:13:55 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id D4F2589944 for ; Fri, 24 Dec 2021 06:13:54 +0000 (UTC) X-FDA: 78951671988.10.EDDE3D7 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf14.hostedemail.com (Postfix) with ESMTP id 4D879100044 for ; Fri, 24 Dec 2021 06:13:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=OSbaZTqKO+62u9cusxHxQ6TwpDTKYkm0NWnnBX3ZHrw=; b=klzHngZXFcBOZ3RsrZeHiBva9X Yp2bB9r7BMkxpc3G78yUuw5QmBMfMa0zsJk8g5cWFPwXr2JhNuGwhNgXUVCaHP4gkiqNDl2BTGVt5 i228WQm7xXmA4607M1jUhVEigpvW3X8O4FCWMaJDZGRbAKGjVnbQfzFuvmBpI6iGkp88XVQBRh9aV n4DXT7D3VPVNwA+J2iSUY3yrV5RxDZnpym/JKJJ6rpzyuXoNcklupi4MhLu7v7A9S0KAKrabZLYEz emZFysRgQlDq0+CtjixwQmzY2ttqwQFsv+nuC/EN+i0dHm0DNVDdA3uYqadkdWm+390jVPG6UN7cA /ErlOOIw==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0dpu-00Dmid-Pl; Fri, 24 Dec 2021 06:13:50 +0000 Date: Thu, 23 Dec 2021 22:13:50 -0800 From: Christoph Hellwig To: Matthew Wilcox Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 05/48] pagevec: Add folio_batch Message-ID: References: <20211208042256.1923824-1-willy@infradead.org> <20211208042256.1923824-6-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Rspamd-Queue-Id: 4D879100044 X-Stat-Signature: qtwhk1ccoue519mgdxtipwtwse6yamij Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=klzHngZX; dmarc=none; spf=none (imf14.hostedemail.com: domain of BATV+afcec93cc8ffef6ccdbc+6697+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+afcec93cc8ffef6ccdbc+6697+infradead.org+hch@bombadil.srs.infradead.org X-Rspamd-Server: rspam02 X-HE-Tag: 1640326432-610035 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 Thu, Dec 23, 2021 at 02:18:40PM +0000, Matthew Wilcox wrote: > > I think these casts need documentation, both here and at the > > struct folio_batch and struct pagevec definitions. > > > > Alternatively I wonder if a union in stuct pagevec so that it can store > > folios or pages might be the better option. > > I tried that way first, but then the caller & callee need to agree > whether they're storing folios or pages in the pagevec. And that's kind > of why we have types. > > pagevec_remove_exceptionals() goes away by the end of this series. > pagevec_release() will take longer to remove. What documentation > do you want to see? Mostly comments at the pagevec and folio_batch definitions that they need to match because of these two functions, and then maybe a backreference from the casts to the definitions.