Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1862954pxk; Tue, 1 Sep 2020 09:29:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz28cRjP+glTRLAZlfQ6WL5u+hakHq2Q1wWiNnR4M6SHLna+RfNjLmFTwBxFb0xwTH+fMFZ X-Received: by 2002:aa7:d785:: with SMTP id s5mr2406289edq.154.1598977769987; Tue, 01 Sep 2020 09:29:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598977769; cv=none; d=google.com; s=arc-20160816; b=DO7MYwmvqFlYlm4+KWVfT73ya5riVI6IUVAg9FH99HvNh6eq31wA30/pBhSApRwCC8 KS+tfK2JBxxQO23gJjh+rQVAQKyySC6ew5fOi3viE3ZwPEN9MzWGniDWcAHlHHSD6qcp lullwdgdNyIYuDFtoJT2k2jxtcp0O13OvaMTI03i9JwmludeeLMnuQmVsS75Fb4BNFG1 SGFnZybg5aVhFbgy0XqYKSMgb4pIkvyKrcQdZuUkERQdh5b9cdlEXCid3H0qxntTMZkF W+qV7KuH6XVYLpuGhzohYOResWXg6cazh0h5IElj2zR+YuuAfkb5MuU1272lLD3R7z9k 9A8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:date:cc:to:from:subject:dkim-signature; bh=Q/jxouQHscjmTrAHRVozJy9AEeAW/LaC4zIz56UQCmk=; b=Zyb3witVZym7ihqEw4fJ4Vi00hn0N1uX1zqri+uaOEOJ8Ps/L+h1PRx2z0bq9Ih1xv Ee4ga7PpvieZbC6ryWVTlmoJBGy8UQ3y2C8PCQGj1yKu7av0RoOuReSjeCqkQX3nwYyW WsDoX+GakYSTAk8J4qaQdKjHywJYBm9KJsq2iNecEGjUCsJwcHewVW7H0dlRqPYn7LhW H5/7hPQJgy6WY62+KHbmn/fQOrSmvBEUd/fICIIor+QTUyjndMpj6KHYHlxwkXeXzdtu aHj1dQCk9DIEkD5L9UrRtOXjFKJxurhj/ieEipSDunyLoJL4v5ZSUyJ2Yz/FiM74xbxi EKvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SBUVUwHu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y2si863851edu.414.2020.09.01.09.29.06; Tue, 01 Sep 2020 09:29:29 -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=@redhat.com header.s=mimecast20190719 header.b=SBUVUwHu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729161AbgIAQ20 (ORCPT + 99 others); Tue, 1 Sep 2020 12:28:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:41204 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727992AbgIAQ2V (ORCPT ); Tue, 1 Sep 2020 12:28:21 -0400 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-)