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.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 D1649C4363A for ; Thu, 29 Oct 2020 15:03:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2CE5B20759 for ; Thu, 29 Oct 2020 15:03:49 +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="fmxFHc6Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2CE5B20759 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 A76E26B0071; Thu, 29 Oct 2020 11:03:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A28476B0073; Thu, 29 Oct 2020 11:03:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9170F6B0074; Thu, 29 Oct 2020 11:03:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0023.hostedemail.com [216.40.44.23]) by kanga.kvack.org (Postfix) with ESMTP id 5FEF76B0071 for ; Thu, 29 Oct 2020 11:03:48 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 768A33622 for ; Thu, 29 Oct 2020 15:03:46 +0000 (UTC) X-FDA: 77425282452.11.sheet64_4c17f882728e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 09079180F8B87 for ; Thu, 29 Oct 2020 15:03:46 +0000 (UTC) X-HE-Tag: sheet64_4c17f882728e X-Filterd-Recvd-Size: 3943 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Thu, 29 Oct 2020 15:03:45 +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=s3bDTEYlOgLxTZumGJgTFJdPZ3QgGKgL+b0hoP3Bnb8=; b=fmxFHc6QaFXCsp4OiUBKNGqct1 DRpA14A4t4YN2f2XNKmH+Rd4yUpj5w6YF9m/UUlLVLC2KmwApWitR5ISlYVE1ITAVHPMbkeT9McUo lzwMKOUSCfa4yuM5lN/phh84SD63zCptMHDEOUIuLEcABl5ucpaJGFaaMdbw8wFAhocifYpEc8Kuh SqxhtAuuZ9JCSj8D8UO807mY+bnxWKLZSwL+NpoPb51oa3UkdfuJRonQPGpnTAH535JpC8QcYA+mK Eu/UQH5eQajw/SGDba3nXlrh6X/TnTLvvKWPSHIFsKBr1tx1hf81GBXbMZr1BakEwcjj7klIut/1O nXjoC1rA==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kY9So-0005bL-69; Thu, 29 Oct 2020 15:03:42 +0000 Date: Thu, 29 Oct 2020 15:03:42 +0000 From: Matthew Wilcox To: Jens Axboe Cc: Andrew Morton , linux-mm@kvack.org, kent.overstreet@gmail.com Subject: Re: + fs-break-generic_file_buffered_read-up-into-multiple-functions.patch added to -mm tree Message-ID: <20201029150342.GB27442@casper.infradead.org> References: <20201025220817.XxXVE%akpm@linux-foundation.org> <20201027133551.GW20115@casper.infradead.org> <20201028152235.125172e46ae70ba4d7094469@linux-foundation.org> <543aa047-f334-cc40-8466-51bff70ac3b3@kernel.dk> <20201029145759.GA27442@casper.infradead.org> <74d36f69-e14e-40e1-531e-edd1d2e3c344@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <74d36f69-e14e-40e1-531e-edd1d2e3c344@kernel.dk> 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 Thu, Oct 29, 2020 at 09:02:31AM -0600, Jens Axboe wrote: > On 10/29/20 8:57 AM, Matthew Wilcox wrote: > > On Thu, Oct 29, 2020 at 07:57:34AM -0600, Jens Axboe wrote: > >> On 10/28/20 4:26 PM, Jens Axboe wrote: > >>> I did see some wins when I tested this. I'll try and run some testing > >>> tomorrow and report back. If there's something specifically you want to > >>> see tested, let me know. > >> > >> I did some testing, unfortunately it's _very_ hard to produce somewhat > >> consistent and good numbers as it quickly becomes a game of kswapd. > >> Here's a basic case of 4 threads doing 32k random reads: > >> > >> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > >> 462 root 20 0 0 0 0 R 65.5 0.0 0:08.02 kswapd0 > >> 2287 axboe 20 0 1303448 2176 1072 R 46.6 0.0 0:05.35 fio > >> 2289 axboe 20 0 1303456 2196 1092 D 46.6 0.0 0:05.34 fio > >> 2290 axboe 20 0 1303460 2216 1112 D 46.6 0.0 0:05.37 fio > >> 2288 axboe 20 0 1303452 2224 1120 R 45.9 0.0 0:05.33 fio > >> > >> Sad face... Unfortunately once kswapd kicks in, performance also > >> plummets. This box only has 32G of ram, and you can fill that in less > >> than 10 seconds doing buffered reads like that. > >> > >> I ran 4k and 32k testing, and using 1 and 4 threads. But given the above > >> sadness, it quickly ends up looking the same for me. > > > > What if your workload actually fits in memory? That would seem to be > > the situation where Kent's patches would make a difference. > > That was my point, if I do multi-page reads then memory is filled in > seconds, which makes it pretty hard to provide any accurate numbers. I > don't have anything slow in this test box, I'll see if I can find > something to stick in it. I meant re-reading files which fit in memory, so you take ten seconds to fill the page cache, then read from the same files over and over.