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 7ED16C54798 for ; Tue, 27 Feb 2024 15:39:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E50D2280022; Tue, 27 Feb 2024 10:39:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DD8FD28001D; Tue, 27 Feb 2024 10:39:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C52DC280022; Tue, 27 Feb 2024 10:39:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id AAD8828001D for ; Tue, 27 Feb 2024 10:39:44 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 7D635C0D7F for ; Tue, 27 Feb 2024 15:39:44 +0000 (UTC) X-FDA: 81837993888.26.F8442FE Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf07.hostedemail.com (Postfix) with ESMTP id D978C4000F for ; Tue, 27 Feb 2024 15:39:42 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=EuI5RUCn; spf=none (imf07.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709048382; 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=AQvzgn1rG61oJxPsvlLuZ9J5yULpvwG8z501seE5+PA=; b=wrjqyvRz2pow+xRbbks4saRVZ0parcV26ObDc3XBMPBHZCz5QWvQGbYPO0omkdfDQxLFnD e7+69TJ4gc4APARGiJEA6zV83IfFKgROpacMQJiErtwhwRmooB+mZFVThVUBi2l9GndD/h fhukPR3mCaHeJ7swM4Gdy7Upzpooc0M= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709048383; a=rsa-sha256; cv=none; b=a7ybHkjvoW07+csngDnGAE85iBCGIC/2IbTuNDWV/j/7T1MkewwI1qVNCFVZDNPIj791Qz dhMPkIROUnj1jX6IjfiCbMUYwrrsPc9gbGmB2Xj5gM3QnDclpbTUIJWcLu7csK7DWrqDgr ImKaULGFMK9uWS0uXtzsx889WERWPDA= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=EuI5RUCn; spf=none (imf07.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none 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=AQvzgn1rG61oJxPsvlLuZ9J5yULpvwG8z501seE5+PA=; b=EuI5RUCnDrS4X3XJn/MZhpVK/u vqKX3+4UKWJbuzCzylsJuzrud5oxV3Kh95Xf6/+aGmbZEpdMAzR5RlIJGUJe3og+Iir//HI/BIjuc 2Q3+qREK3jT+J6SaPnDPpf+jc02LOe6DklnUsNmZOaEeUxZMwQXCfIXtNlPBw4yq4a36eEMIbLoCZ 2VLoBhdVohvZQwJNQGkFsrIQctHrM4AVUiL3n0qu4A3AvyFNGXFmcKW3zNFo5IQt+AyMa4I9wDNio x/4Si2TD/dK/KmA8kg+7t7LDsrq430sNB0Ry3iGe1bH9EhCZV+iqm8sCP1nxJrB51Lxziwj1LwLyE fTRisv0w==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rezYN-00000002kPD-2LO3; Tue, 27 Feb 2024 15:39:35 +0000 Date: Tue, 27 Feb 2024 15:39:35 +0000 From: Matthew Wilcox To: Kent Overstreet 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-Rspamd-Queue-Id: D978C4000F X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 7w3donaa1bej9hckho18umr3no6c7cu1 X-HE-Tag: 1709048382-583500 X-HE-Meta: U2FsdGVkX1+LaFg+noNJUrJGJj20oxzn3ficx0bcpeziQTAQTi4StTTFCvr2KPAU6+7FeDIdVpeXggduS6yazX2IHygij9w1sI9dLfjwOvi6CF2qTj5JubW2PDxzpEZ43Lt/r8MYP0mtmwSdd9P/ngENzw3+SZ0cd9Zg08xB2WrXLIQ+Cf/Lhw48qgX5H80DqQe6F1rr2u/aKQj2INEIJNk0A4hnKtflhVcyYPQVSxORv44wzV7cj6v4Qxx23J39Gty69eVcPE0qsrI+41HwOOJVWVpjohvuS8uL7ec+hB/sHL5Gxmt5snQcQrreqUXLeDIVoSg5N60JKe84Slr7TYFHLkkMuNO0jg7N6izYZ7C1vvnYj2Lf/4uY89wk+I/I9EP8UewlN6rMnnsslA2wgFQMXNyZbfAtD83w8JH9H7jQEpKuFAB2+9bRz2ZYVQi2rPZla4s3Fzfe+Ag9URvLl2AkCjkNKJ2eCpgcRhct+kqEEpKkA8QM3z4akOOuEMsxrFsaJIrX9PUIRtL/fhHFmgF7sSylhn58iHWxe2ITQhWk/LgAH8rLUs1jY+DXowIf3GcEJ6qn9GuAmPLg4rdRUPIVoFBx0yDUBtK2DLEOlZ6yQOjOjRnH5qi+OQz9GV17nfyU3VP28i4t7fXeJpPDRzAZ8Q+shhcfBxfE42WkidigOtVA+oBwPWW28XAldRTFct7HRFWRL7TDYJHUKQ90JZAV17xJjCmztzZWx01AfLpctVKMv/u0S6o2fAfUYaKYUlGwiI60XOIYRH0pj7o3TnRMbl8rDWbp8qPHwZrWsQxcaE9UruQueODVNyAm+YNYPmjf/71P5bqujFCuPtJybjaTvq3oNDd3oPooO5ZFpye3+2RmbqGPspD97O8W8+LNox/0fT5VkxT8qwsO727rgxSMAJS00O+Ue3jQPGR6BQqpOxru/goFtu8ig6FPy/Cbe06kFZxJpJ5JgN96Qpz a8ozCUHq 9agXBiTRKi3Dq8sNU9polj8QNyLazD52zkf/B2A73VCHlI0gE1JB9jctl6Lan7pKAuYEqffWzqARsfTuDMnuso09lgCXzAGB/bd7NAjIggH6WzowQpgFOigBDI6tfEA5/DP0QFBOqkqNBaTTz4p4gbAGuDxWhWmtKoE4LxBEeCUzNfvYHTsldmOAgEyuTQZ+zE0ou 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 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?