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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C611FC433FE for ; Wed, 6 Oct 2021 13:13:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5A92F61131 for ; Wed, 6 Oct 2021 13:13:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5A92F61131 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id BB4646B006C; Wed, 6 Oct 2021 09:13:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B63C06B0071; Wed, 6 Oct 2021 09:13:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A2B986B0073; Wed, 6 Oct 2021 09:13:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0028.hostedemail.com [216.40.44.28]) by kanga.kvack.org (Postfix) with ESMTP id 925A46B006C for ; Wed, 6 Oct 2021 09:13:12 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3E16E2D009 for ; Wed, 6 Oct 2021 13:13:12 +0000 (UTC) X-FDA: 78666053424.30.DFD63F7 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf02.hostedemail.com (Postfix) with ESMTP id C15D870027F0 for ; Wed, 6 Oct 2021 13:13:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=GibVYiX+03ftEPK45SmcylwrMeTJcyj12caXN74RTQI=; b=dpeZhUidJmTzu5YEDB1OjjyeLU ++qUOLwlwFKZdLEK+pzgY48uFz4u/lAb6lD0P6b3QN7ecaGNGG7PXFFXX+nYkK5u+/CaUUpOC1aVT zhd+TLUaR+5dbHAK6p54Yfr8bdCdNpMV06NSFa2BcadVPjyJtR5dcZEKV7iF5IC/hBkQ/T/d05dp7 jOQq8EzAUMFvzJM02Bvk7jQX9sTUgJ9avDhOJoz+7hHVJDR+H+Bn90LY+lSPa0yp0lGtCc2XBy4Cn dSBJvjg5kBBbqriaOcwWD3uK43zv2d5f4tlDWt5xGsW9rf1724Omrl95+x50MfpLbSDU1ShsfKpsa cclLeRCA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mY6iL-000tus-5E; Wed, 06 Oct 2021 13:12:20 +0000 Date: Wed, 6 Oct 2021 14:12:05 +0100 From: Matthew Wilcox To: Hsin-Yi Wang Cc: Andrew Morton , William Kucharski , Christoph Hellwig , linux-mm@kvack.org Subject: Re: Readahead regressed with c1f6925e1091("mm: put readahead pages in cache earlier") on multicore arm64 platforms Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=dpeZhUid; spf=none (imf02.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: C15D870027F0 X-Stat-Signature: 5isjozdnc8czhen4bjaos4soj5pfnjqg X-HE-Tag: 1633525991-603188 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 Wed, Oct 06, 2021 at 09:07:56PM +0800, Hsin-Yi Wang wrote: > On Wed, Oct 6, 2021 at 7:21 PM Matthew Wilcox wrote: > > > > On Wed, Oct 06, 2021 at 05:25:23PM +0800, Hsin-Yi Wang wrote: > > > Hi Matthew, > > > > > > We tested that the performance of readahead is regressed on multicore > > > arm64 platforms running on the 5.10 kernel. > > > - The platform we used: 8 cores (4x a53(small), 4x a73(big)) arm64 platform > > > - The command we used: ureadahead $FILE ($FILE is a 1MB+ pack file, > > > note that if the file size is small, it's not obvious to see the > > > regression) > > > > > > After we revert the commit c1f6925e1091("mm: put readahead pages in > > > cache earlier"), the readahead performance is back: > > > - time ureadahead $FILE: > > > - 5.10: 1m23.124s > > > - with c1f6925e1091 reverted: 0m3.323s > > > - other LTS kernel (eg. 5.4): 0m3.066s > > > > > > The slowest part is aops->readpage() in read_pages() called in > > > read_pages(ractl, &page_pool, false); (the 3rd in > > > page_cache_ra_unbounded()) > > > > What filesystem are you using? > > > ext4, block size 4096 That's confusing. ext4 shouldn't hit that path; it has a ->readahead address space operation.