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=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT 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 708B3C33C9E for ; Wed, 15 Jan 2020 02:39:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 34F4B222C3 for ; Wed, 15 Jan 2020 02:39:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="etdc3dH2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34F4B222C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CADDA8E000E; Tue, 14 Jan 2020 21:39:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C0F1B8E0008; Tue, 14 Jan 2020 21:39:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AB19F8E000E; Tue, 14 Jan 2020 21:39:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0125.hostedemail.com [216.40.44.125]) by kanga.kvack.org (Postfix) with ESMTP id 87A368E0008 for ; Tue, 14 Jan 2020 21:39:17 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 4BA9082499A8 for ; Wed, 15 Jan 2020 02:39:17 +0000 (UTC) X-FDA: 76378311954.10.lead92_8b4322680ce34 X-HE-Tag: lead92_8b4322680ce34 X-Filterd-Recvd-Size: 3943 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Wed, 15 Jan 2020 02:39:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dgVSjPiUW1SPVGvVVdOphNpP+4nkQOa7q3OECJziRBo=; b=etdc3dH2zGxPrx8fVOWxw3kEF d4vTgZ7k/ntJ5a69XXQyRytwqzUFxwqSGLp++ckJsghZRNfNj35E8O3YjbO/HH79+bXmXIXp0eUvE /J3UId9CWn++GN1Ee0wjKqPhfJWOceJIdhc6O+oEmmn/c1kcO3w+1Qof4AxrgUVWPOpN5tFzIX5q4 khVQ7u96RzM/WBezBgE/LeQ2p3g125Ll1vnX1aqXFOi/Bc3jvmIf0V+Mk4z4u9U1/PefbIC//cOrT TJhzqgPZgjFaUQ+yVXstUIj663mmWV1/8ztF/THMsH7b+yrDSlr4L1fT6KRueW9uIm+GHT8Vt1VLY ck7FjsewQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1irYZx-0008AB-L4; Wed, 15 Jan 2020 02:38:45 +0000 From: Matthew Wilcox To: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" , Jeff Layton , Christoph Hellwig , Chris Mason Subject: [RFC v2 0/9] Replacing the readpages a_op Date: Tue, 14 Jan 2020 18:38:34 -0800 Message-Id: <20200115023843.31325-1-willy@infradead.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: From: "Matthew Wilcox (Oracle)" This is an attempt to add a ->readahead op to replace ->readpages. I've converted two users, iomap/xfs and cifs. The cifs conversion is lacking fscache support, and that's just because I didn't want to do that work; I don't believe there's anything fundamental to it. But I wanted to do iomap because it is The Infrastructure Of The Future and cifs because it is the sole remaining user of add_to_page_cache_locked(), which enables the last two patches in the series. By the way, that gives CIFS access to the workingset shadow infrastructure, which it had to ignore before because it couldn't put pages onto the lru list at the right time. v2: Chris asked me to show what this would look like if we just have the implementation look up the pages in the page cache, and I managed to figure out some things I'd done wrong last time. It's even simpler than v1 (net 104 lines deleted). Matthew Wilcox (Oracle) (9): mm: Fix the return type of __do_page_cache_readahead readahead: Ignore return value of ->readpages XArray: Add xarray_for_each_range readahead: Put pages in cache earlier mm: Add readahead address space operation iomap,xfs: Convert from readpages to readahead cifs: Convert from readpages to readahead mm: Remove add_to_page_cache_locked mm: Unify all add_to_page_cache variants Documentation/core-api/xarray.rst | 10 +- Documentation/filesystems/locking.rst | 7 +- Documentation/filesystems/vfs.rst | 11 ++ fs/cifs/file.c | 143 +++++--------------------- fs/iomap/buffered-io.c | 72 +++---------- fs/iomap/trace.h | 2 +- fs/xfs/xfs_aops.c | 10 +- include/linux/fs.h | 2 + include/linux/iomap.h | 2 +- include/linux/pagemap.h | 25 ++--- include/linux/xarray.h | 30 ++++++ mm/filemap.c | 72 ++++--------- mm/internal.h | 2 +- mm/readahead.c | 76 +++++++++----- 14 files changed, 180 insertions(+), 284 deletions(-) --=20 2.24.1