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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39334C54798 for ; Tue, 27 Feb 2024 15:54:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B9D616B0139; Tue, 27 Feb 2024 10:54:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B27DC6B013A; Tue, 27 Feb 2024 10:54:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9A25A6B013B; Tue, 27 Feb 2024 10:54:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 84DA16B0139 for ; Tue, 27 Feb 2024 10:54:24 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 4869740C16 for ; Tue, 27 Feb 2024 15:54:24 +0000 (UTC) X-FDA: 81838030848.02.86A094C Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [95.215.58.177]) by imf19.hostedemail.com (Postfix) with ESMTP id 8C3351A001C for ; Tue, 27 Feb 2024 15:54:22 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=A2Ic5Mky; spf=pass (imf19.hostedemail.com: domain of kent.overstreet@linux.dev designates 95.215.58.177 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709049262; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=HgLcPpLzMNm/kS7Wj/38u2p6bSK1Q1OBJlosZYNa5T8=; b=irNDH/oZSX41p1JQ5mVYP665nKOhWKvEu9H2V47BalE8UkmvbEKsk6n5bh6KDUtY+514op jrqIxiDfOVhWg52SfZaN3e7LqLNZt4KI5UxykGlfHcJMw/fObt9osIRAa2EvAJCg7bxmbb /MZYa9151rcc/uS/F2ixv7mAckPSJag= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709049262; a=rsa-sha256; cv=none; b=VmktG027KUm9NmD5WZS8473ctneVOzoYPMOUTmxA7BX6P/iihcWVdDX4qKx59tCtS1CcXU 0RHm6CYo5epA4RHeQrTCZaWY63Eah+mARejWPokPBiu2EaxXVZCDzV7WfvFKjHL0vPNz/b j69dx6/1GgDmGg/XSGP5gUHmkHhwG4o= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=A2Ic5Mky; spf=pass (imf19.hostedemail.com: domain of kent.overstreet@linux.dev designates 95.215.58.177 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev; dmarc=pass (policy=none) header.from=linux.dev Date: Tue, 27 Feb 2024 10:54:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1709049260; 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=HgLcPpLzMNm/kS7Wj/38u2p6bSK1Q1OBJlosZYNa5T8=; b=A2Ic5MkyApuFMAg+DEqU72TRgCvjVnleibCuC8GVzpPfbYYF2S/XpHA513kVGFeeFMUauz ZscboWNOVgniVIPHCjCjFoJpxCFlyxPHV0RP1Jb/01jYEh5DZfWiRztJQGApP4/Uk0HTSc iDeqKylHl8dwA8RAGShDYLICuxvWRjI= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Matthew Wilcox Cc: Linus Torvalds , Al Viro , Luis Chamberlain , lsf-pc@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm , Daniel Gomez , Pankaj Raghav , Jens Axboe , Dave Chinner , Christoph Hellwig , Chris Mason , Johannes Weiner Subject: Re: [LSF/MM/BPF TOPIC] Measuring limits and enhancing buffered IO Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Rspamd-Queue-Id: 8C3351A001C X-Rspam-User: X-Stat-Signature: 9kpeqqg4kjf8z6d54jp86hxq3g8ftqd6 X-Rspamd-Server: rspam03 X-HE-Tag: 1709049262-149457 X-HE-Meta: U2FsdGVkX19AQ701PSUFo34xIxZroKSG1RG10Lzbg5XUZO4jyleJZfo4QYa1bTfxwASZhM7jzUI88rj3mqE93kQ5oeuBTtIDhhAuhlNqEoXGj0B8ngeiqC/d18YPm3xbcQTOfrrS3dMfxZ8QFxOpoRoew/yxYcepXGrAdcQDQTIpHMhCmSUqSUYfzfNSmjJnjfoG5LfgKIRK1syl031mPOTM06X2Ol3Jiug5IqCnlNH4MQ3Cn5ulORhDrcSt34tioXoYRv32WIgHrPYdqgOYNKmh0GhADm76uVkuOz8K3e0sq40XHVjE9EVJB67HMGQIr/xd6agBPtjB4OzXHV+kla3Fzec+IR7TdM14hZd2VqeNBx3MZrgACn4iBrndmfcrvbsmDkbifKfDJz2wfvB9ywcoWasFGuZlagaTfk/pYv0kg4EBGruR664wxEEbP+jqnxOYTdtXaEhgAnj5XSkUMdNmX24MQQ/mrN8p7JZUl8Gdxuxu1izLevxU3UHnVOI2xua4mB1FE4WU7RVK1zRed045ArOUKQ7RHL63Vbfk2VGJmRaiS6r97/d9soGdCGHpaR1lb/sPv1JVYefrIGW5AIXNix8CRKTxzBBjYzb2A3EBtQPVvKZQuTXBPBG4pifg0mlXxw4iwL/lsi1hUXwq4X8BDyqoLgYU+bOXGxp3GCWuRHJPBFu2UKcEwQDBs8xWXzozJD5l81SB6uHn7P5veEh/1P/5Pa40XdsqP2xj+W9Bm+0zIa4hTnlC3DQB3gm4992q4Z+tPmD2M9F2kOLTCvaNMDiRE8+HAwQThTGxuVo= 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: List-Subscribe: List-Unsubscribe: On Tue, Feb 27, 2024 at 03:39:35PM +0000, Matthew Wilcox wrote: > On Tue, Feb 27, 2024 at 02:21:59AM -0500, Kent Overstreet wrote: > > On Mon, Feb 26, 2024 at 03:48:35PM -0800, Linus Torvalds wrote: > > > On Mon, 26 Feb 2024 at 14:46, Linus Torvalds > > > wrote: > > > > > > > > I really haven't tested this AT ALL. I'm much too scared. > > > > > > "Courage is not the absence of fear, but acting in spite of it" > > > - Paddington Bear / Michal Scott > > > > > > It seems to actually boot here. > > > > > > That said, from a quick test with lots of threads all hammering on the > > > same page - I'm still not entirely convinced it makes a difference. > > > Sure, the kernel profile changes, but filemap_get_read_batch() wasn't > > > very high up in the profile to begin with. > > > > > > I didn't do any actual performance testing, I just did a 64-byte pread > > > at offset 0 in a loop in 64 threads on my 32c/64t machine. > > > > Only rough testing, but this is looking like around a 25% performance > > increase doing 4k random reads on a 1G file with fio, 8 jobs, on my > > Ryzen 5950x - 16.7M -> 21.4M iops, very roughly. fio's a pig and we're > > only spending half our cpu time in the kernel, so the buffered read path > > is actually getting 40% or 50% faster. > > Linus' patch only kicks in for 128 bytes or smaller. So what are you > measuring? 64 byte reads