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=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 E4AA3C433DB for ; Thu, 18 Feb 2021 17:47:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6746464E79 for ; Thu, 18 Feb 2021 17:47:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6746464E79 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 AD0CC6B0006; Thu, 18 Feb 2021 12:47:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A80A26B006C; Thu, 18 Feb 2021 12:47:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 946B86B006E; Thu, 18 Feb 2021 12:47:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0160.hostedemail.com [216.40.44.160]) by kanga.kvack.org (Postfix) with ESMTP id 7B6D86B0006 for ; Thu, 18 Feb 2021 12:47:13 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 457542496 for ; Thu, 18 Feb 2021 17:47:13 +0000 (UTC) X-FDA: 77832119946.27.name73_5a0485127657 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin27.hostedemail.com (Postfix) with ESMTP id 2220B3D663 for ; Thu, 18 Feb 2021 17:47:13 +0000 (UTC) X-HE-Tag: name73_5a0485127657 X-Filterd-Recvd-Size: 3760 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Thu, 18 Feb 2021 17:47:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613670431; 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: in-reply-to:in-reply-to:references:references; bh=Vh8JVeAq553dnjUjXxpSp+/x6fHtJkixwlI1e+/bfY8=; b=RqkATTCPSeb2gmGwoVHNHMlg3AkybgX2FvMGHiylUP5xD09ZQ7zHPKMzsqZxZ9EZg5Vtum MgQf8Mx/bMnwHRi0RtVkY/jE0/MT7ZAddj6DU98C0X39/2LrZqSBZ5w7Dyb2ojxiIdh+sP 99WeNUegsnNW/3Tyn6/2BPOPr7n5BKk= 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-348-qum9-M-dOJ-dh4Cpmuan6A-1; Thu, 18 Feb 2021 12:47:10 -0500 X-MC-Unique: qum9-M-dOJ-dh4Cpmuan6A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C51CF107ACF4; Thu, 18 Feb 2021 17:47:07 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-119-68.rdu2.redhat.com [10.10.119.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4C64060877; Thu, 18 Feb 2021 17:47:01 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20210217161358.GM2858050@casper.infradead.org> References: <20210217161358.GM2858050@casper.infradead.org> <161340385320.1303470.2392622971006879777.stgit@warthog.procyon.org.uk> <161340389201.1303470.14353807284546854878.stgit@warthog.procyon.org.uk> To: Matthew Wilcox Cc: dhowells@redhat.com, Trond Myklebust , Anna Schumaker , Steve French , Dominique Martinet , Alexander Viro , Christoph Hellwig , linux-mm@kvack.org, linux-cachefs@redhat.com, linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, Jeff Layton , David Wysochanski , linux-kernel@vger.kernel.org Subject: Re: [PATCH 03/33] mm: Implement readahead_control pageset expansion MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2083367.1613670420.1@warthog.procyon.org.uk> Date: Thu, 18 Feb 2021 17:47:00 +0000 Message-ID: <2083368.1613670420@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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: Matthew Wilcox wrote: > So readahead_expand() needs to adjust the file's f_ra so that when the > application gets to 64kB, it kicks off the readahead of 4MB-8MB chunk (and > then when we get to 4MB+256kB, it kicks off the readahead of 8MB-12MB, > and so on). Ummm... Two questions: Firstly, how do I do that? Set ->async_size? And to what? The expansion could be 2MB from a ceph stripe, 256k from the cache. Just to add to the fun, the leading edge of the window might also be rounded downwards and the RA trigger could be before where the app is going to start reading. Secondly, what happens if, say, a 4MB read is covered by a single 4MB THP? David