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 C3BEAC64EC4 for ; Thu, 9 Mar 2023 14:05:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 348B8280002; Thu, 9 Mar 2023 09:05:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2F8A4280001; Thu, 9 Mar 2023 09:05:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1C060280002; Thu, 9 Mar 2023 09:05:42 -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 0D027280001 for ; Thu, 9 Mar 2023 09:05:42 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id A8CBC4110C for ; Thu, 9 Mar 2023 14:05:41 +0000 (UTC) X-FDA: 80549532882.23.86A6144 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf12.hostedemail.com (Postfix) with ESMTP id 9926040030 for ; Thu, 9 Mar 2023 14:05:39 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=dmztQVg5; spf=pass (imf12.hostedemail.com: domain of kbusch@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=kbusch@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678370739; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=BSKuDdDWVVknahaZG6eWeseWVoAGsoIorMqTI/dDgt4=; b=CxQ5QTibJjaGeVUvVccC4VSpQkevrnBojvkoV1svUcI0L1DN2O/sk/cvmiiPb4DYLpFVV8 1QEp2fIIe9UkIavMLhsqSzDowF06o3ftGgFjhXiyoOW2HMaYC2J3jnqXRFCdG9Mnl6JZ33 Zrdw27Z44ifA9u/NUG8lDjLCX2Ye05c= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=dmztQVg5; spf=pass (imf12.hostedemail.com: domain of kbusch@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=kbusch@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678370739; a=rsa-sha256; cv=none; b=G3/5a6vrlfjjdq2G09ccBEUUYuqPp8GHM2hoeKqSvcrwJ+AeJwBq7LM5wRlfkIr4qnO/t7 SZji7yDDwAYWBxBUwwZzZMtikpCudO60VSoKmgv0fHxIm0NBYuvcABKDiMY65Ncz+ttGKr JV1HIB26MHyHQZvX3s73/VvmD2cmcJY= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9DF8C61B8A; Thu, 9 Mar 2023 14:05:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CD33C433D2; Thu, 9 Mar 2023 14:05:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678370738; bh=xJ7YPrTfTthbYoyo8UtH2onMzmwtgbsrsuyUa9lXPAE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dmztQVg5CIS8T690ZZtBtC6IlnrcP7PqLeuT8DjrijPjpNg2SxZAeYmM5PzoNc/H7 er5fix33obktnrmBYc0X7CA59basYJ3ltJEGA2F9wjpLFMSHBpI6UMGjKnwvbHUTGd FTkFktQ8RRAfqly2xui9EyDGPOQO6oUnUl3MJL+sDEvOmA42HcAk8Ph7PxFqXQXnwF 9381JT3MVOZOc8GalYXITxcLggI5BOSU6t/DLTQOnaUWTzuJhNJBFSutu+mtQ3rd9/ EkCczClEm5xdnnfmLqC1Sfp8FcJtsSgB5i+d+JwRU6vtDg7lkb2Bkd+YItg3+d6c4r VwqmtL+h0w4fg== Date: Thu, 9 Mar 2023 07:05:34 -0700 From: Keith Busch To: James Bottomley Cc: Javier =?iso-8859-1?Q?Gonz=E1lez?= , Matthew Wilcox , Theodore Ts'o , Hannes Reinecke , Luis Chamberlain , Pankaj Raghav , Daniel Gomez , lsf-pc@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-block@vger.kernel.org Subject: Re: [LSF/MM/BPF TOPIC] Cloud storage optimizations Message-ID: References: <0b70deae-9fc7-ca33-5737-85d7532b3d33@suse.de> <20230306161214.GB959362@mit.edu> <1367983d4fa09dcb63e29db2e8be3030ae6f6e8c.camel@HansenPartnership.com> <20230309080434.tnr33rhzh3a5yc5q@ArmHalley.local> <260064c68b61f4a7bc49f09499e1c107e2a28f31.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <260064c68b61f4a7bc49f09499e1c107e2a28f31.camel@HansenPartnership.com> X-Stat-Signature: tsjdne8meeiodexhued9j98mj38qixwp X-Rspam-User: X-Rspamd-Queue-Id: 9926040030 X-Rspamd-Server: rspam06 X-HE-Tag: 1678370739-681072 X-HE-Meta: U2FsdGVkX1+AdVlXRG/gaKSwxj37FhZplnC4XEAv68jwOm7QYZhVcgcBcei+2z7aWbSXhFBuZ28FnanE+KIJEB9KtQVV9MhSGUcpuLi2666QyvxDsqhTNErfBwgTk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KBgj53SogoeX7dXK0ec+A4DbIrTiCXBKYhLOeykuvhK9JxhS+M78DAqBAMHa6YoqYo= 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, Mar 09, 2023 at 08:11:35AM -0500, James Bottomley wrote: > On Thu, 2023-03-09 at 09:04 +0100, Javier González wrote: > > FTL designs are complex. We have ways to maintain sector sizes under > > 64 bits, but this is a common industry problem. > > > > The media itself does not normally oeprate at 4K. Page siges can be > > 16K, 32K, etc. > > Right, and we've always said if we knew what this size was we could > make better block write decisions. However, today if you look what > most NVMe devices are reporting, it's a bit sub-optimal: Your sample size may be off if your impression is that "most" NVMe drives report themselves this way. :) > jejb@lingrow:/sys/block/nvme1n1/queue> cat logical_block_size > 512 > jejb@lingrow:/sys/block/nvme1n1/queue> cat physical_block_size > 512 > jejb@lingrow:/sys/block/nvme1n1/queue> cat optimal_io_size > 0 > > If we do get Linux to support large block sizes, are we actually going > to get better information out of the devices? > > > Increasing the block size would allow for better host/device > > cooperation. As Ted mentions, this has been a requirement for HDD and > > SSD vendor for years. It seems to us that the time is right now and > > that we have mechanisms in Linux to do the plumbing. Folios is > > ovbiously a big part of this. > > Well a decade ago we did a lot of work to support 4k sector devices. > Ultimately the industry went with 512 logical/4k physical devices > because of problems with non-Linux proprietary OSs but you could still > use 4k today if you wanted (I've actually still got a working 4k SCSI > drive), so why is no NVMe device doing that? In my experience, all but the cheapest consumer grade nvme devices report 4k logical. They all support an option to emulate 512b if you really wanted it to, but the more optimal 4k is the most common default for server grade nvme.