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 X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 664D8C4360C for ; Tue, 8 Oct 2019 03:54:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CAF8C206B6 for ; Tue, 8 Oct 2019 03:54:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CAF8C206B6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=fromorbit.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 612128E0005; Mon, 7 Oct 2019 23:54:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5C1798E0003; Mon, 7 Oct 2019 23:54:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D8728E0005; Mon, 7 Oct 2019 23:54:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0183.hostedemail.com [216.40.44.183]) by kanga.kvack.org (Postfix) with ESMTP id 25FA98E0003 for ; Mon, 7 Oct 2019 23:54:04 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id AF37E180AD803 for ; Tue, 8 Oct 2019 03:54:03 +0000 (UTC) X-FDA: 76019249166.07.wind38_7ab19cbf8b928 X-HE-Tag: wind38_7ab19cbf8b928 X-Filterd-Recvd-Size: 3305 Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Tue, 8 Oct 2019 03:54:03 +0000 (UTC) Received: from dread.disaster.area (pa49-181-226-196.pa.nsw.optusnet.com.au [49.181.226.196]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id E622F363F0F; Tue, 8 Oct 2019 14:53:59 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.2) (envelope-from ) id 1iHgZS-0003vt-H7; Tue, 08 Oct 2019 14:53:58 +1100 Date: Tue, 8 Oct 2019 14:53:58 +1100 From: Dave Chinner To: Matthew Wilcox Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/15] fs: Introduce i_blocks_per_page Message-ID: <20191008035358.GW804@dread.disaster.area> References: <20190925005214.27240-1-willy@infradead.org> <20190925005214.27240-3-willy@infradead.org> <20190925083650.GE804@dread.disaster.area> <20191004192812.GK32665@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191004192812.GK32665@bombadil.infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=P6RKvmIu c=1 sm=1 tr=0 a=dRuLqZ1tmBNts2YiI0zFQg==:117 a=dRuLqZ1tmBNts2YiI0zFQg==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=XobE76Q3jBoA:10 a=7-415B0cAAAA:8 a=Ezv6lXj58yBfwjVs_tMA:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 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 Fri, Oct 04, 2019 at 12:28:12PM -0700, Matthew Wilcox wrote: > On Wed, Sep 25, 2019 at 06:36:50PM +1000, Dave Chinner wrote: > > I'm actually working on abstrcting this code from both block size > > and page size via the helpers below. We ahve need to support block > > size > page size, and so that requires touching a bunch of all the > > same code as this patchset. I'm currently trying to combine your > > last patch set with my patchset so I can easily test allocating 64k > > page cache pages on a 64k block size filesystem on a 4k page size > > machine with XFS.... > > This all makes sense ... > > > > - if (iop || i_blocksize(inode) == PAGE_SIZE) > > > + if (iop || i_blocks_per_page(inode, page) <= 1) > > > return iop; > > > > That also means checks like these become: > > > > if (iop || iomap_chunks_per_page(inode, page) <= 1) > > > > as a single file can now have multiple pages per block, a page per > > block and multiple blocks per page as the page size changes... > > > > I'd like to only have to make one pass over this code to abstract > > out page and block sizes, so I'm guessing we'll need to do some > > co-ordination here.... > > Yup. I'm happy if you want to send your patches out; I'll keep going > with the patches I have for the moment, and we'll figure out how to > merge the two series in a way that makes sense. I'm waiting for the xfs -> iomap writeback changes to land in a stable branch so I don't have to do things twice in slightly different ways in the patchset. Once we get that in an iomap-next branch I'll rebase my patches on top of it and go from there... Cheers, Dave. -- Dave Chinner david@fromorbit.com