From patchwork Tue Sep 1 16:28:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 11749083 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 64A78109A for ; Tue, 1 Sep 2020 16:28:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 31C28208CA for ; Tue, 1 Sep 2020 16:28:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SBUVUwHu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 31C28208CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 432B06B0095; Tue, 1 Sep 2020 12:28:22 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 3E2E96B0098; Tue, 1 Sep 2020 12:28:22 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2FA086B009A; Tue, 1 Sep 2020 12:28:22 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0006.hostedemail.com [216.40.44.6]) by kanga.kvack.org (Postfix) with ESMTP id F0FEE6B0095 for ; Tue, 1 Sep 2020 12:28:21 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id ACAD53623 for ; Tue, 1 Sep 2020 16:28:21 +0000 (UTC) X-FDA: 77215025202.12.aunt99_46046f927099 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id 66BEB180178E7 for ; Tue, 1 Sep 2020 16:28:21 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,dhowells@redhat.com,,RULES_HIT:30034:30036:30054,0,RBL:207.211.31.81:@redhat.com:.lbl8.mailshell.net-62.18.0.100 66.10.201.10;04ygeqztg59r7oshraxiujxz8k19byciupxnxytawso8iy9hx5kiqew88zm4s8q.1epr3hwjmtypjjkp3drpmwomtqxf5wjok7cgmak5ipjscmaf976d1nud8pee5nh.k-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: aunt99_46046f927099 X-Filterd-Recvd-Size: 3720 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 16:28:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598977700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q/jxouQHscjmTrAHRVozJy9AEeAW/LaC4zIz56UQCmk=; b=SBUVUwHuUfhQcwvtIvp0qk8WzKsqAG/eBbD4QEb+rdnA1vBLnKsxL2wLFkJgIw/PuNH7xE zXCptr35QGjYQUhmSqR36nfcSQHdGbdpH6m1oKqralAdVIpETthy6HgBPy7ujiCVJvjrfg JjsT6PHD5zmsgDLJzVcrg1YoE//B5rg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-179-t6RQvitsPEClxJ8wnJRupw-1; Tue, 01 Sep 2020 12:28:18 -0400 X-MC-Unique: t6RQvitsPEClxJ8wnJRupw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 35931807333; Tue, 1 Sep 2020 16:28:17 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-113-231.rdu2.redhat.com [10.10.113.231]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F9F77C564; Tue, 1 Sep 2020 16:28:16 +0000 (UTC) Subject: [RFC PATCH 0/7] mm: Make more use of readahead_control From: David Howells To: willy@infradead.org Cc: dhowells@redhat.com, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Date: Tue, 01 Sep 2020 17:28:15 +0100 Message-ID: <159897769535.405783.17587409235571100774.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.23 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Rspamd-Queue-Id: 66BEB180178E7 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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: Hi Willy, Here's a set of patches to expand the use of the readahead_control struct, essentially from do_sync_mmap_readahead() down. Note that I've been passing the number of pages to read in rac->_nr_pages, and then saving it and changing it certain points, e.g. page_cache_readahead_unbounded(). Also pass file_ra_state into force_page_cache_readahead(). Also there's an apparent minor bug in khugepaged.c that I've included a patch for: page_cache_sync_readahead() looks to be given the wrong size in collapse_file(). David --- David Howells (7): Fix khugepaged's request size in collapse_file() mm: Make ondemand_readahead() take a readahead_control struct mm: Push readahead_control down into force_page_cache_readahead() mm: Pass readahead_control into page_cache_{sync,async}_readahead() mm: Make __do_page_cache_readahead() use rac->_nr_pages mm: Fold ra_submit() into do_sync_mmap_readahead() mm: Pass a file_ra_state struct into force_page_cache_readahead() fs/btrfs/free-space-cache.c | 7 +-- fs/btrfs/ioctl.c | 10 +++-- fs/btrfs/relocation.c | 14 +++--- fs/btrfs/send.c | 15 ++++--- fs/ext4/dir.c | 12 ++--- fs/ext4/verity.c | 8 ++-- fs/f2fs/dir.c | 10 +++-- fs/f2fs/verity.c | 8 ++-- include/linux/pagemap.h | 11 ++--- mm/fadvise.c | 6 ++- mm/filemap.c | 33 +++++++------- mm/internal.h | 16 +------ mm/khugepaged.c | 6 +-- mm/readahead.c | 89 ++++++++++++++++++------------------- 14 files changed, 127 insertions(+), 118 deletions(-)