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 5E346C6FA8E for ; Thu, 2 Mar 2023 03:50:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CF3076B0071; Wed, 1 Mar 2023 22:50:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CA2886B0073; Wed, 1 Mar 2023 22:50:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B91586B0074; Wed, 1 Mar 2023 22:50:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id A42AE6B0071 for ; Wed, 1 Mar 2023 22:50:31 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 7124F1C68E9 for ; Thu, 2 Mar 2023 03:50:31 +0000 (UTC) X-FDA: 80522581062.17.301EC96 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf09.hostedemail.com (Postfix) with ESMTP id AD7FE140006 for ; Thu, 2 Mar 2023 03:50:29 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=dJWANL6f; spf=pass (imf09.hostedemail.com: domain of djwong@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=djwong@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=1677729029; 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=rgpRxGaGbbn5LI2/Vbc4Sny0wGneSC6mEVY88IawtAA=; b=QqGDbMwh8Vf+GEy8730HvrqAIwo79YT4Uv7160fziPRp7q34bGC786IsTw0bTaeCtlk80F FomjPqSgulUgadWqFD9v8fS1gg2AuIOtvfY/iaOxhKueMQnJ+GnF603pePGQ+5F8oZr7qC eribBtwbazbq6IfDo+XpSJiXl4vuGIg= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=dJWANL6f; spf=pass (imf09.hostedemail.com: domain of djwong@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=djwong@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1677729029; a=rsa-sha256; cv=none; b=mbcF0WMcHmoioGJv1mO7qGTBexikHeGDVQHsXaCZDRRESVonT64DT2nC2cRRuMsm8rHLxb FsPrJKYJCPS2IzpfK7WJ6AalVK8Ho7KgFTcXQaJsmrHHI5uUVRfN0xNZGIii+qt0elV7UT 91AgYnwtX42uawJwn2ikhUiqoIoztSk= 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 B59846124D; Thu, 2 Mar 2023 03:50:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0DD36C433D2; Thu, 2 Mar 2023 03:50:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677729028; bh=gX6kt3+5lfprjA67P4c0hJG42XWIpdAERPk/U9u9xJI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dJWANL6fOjDnDK2WTU1fWA4MqapEuhfddjcndYuVRPrY2OTCWm7zNBsgWO/Cx4c8u ajDGVmhK/KMkqoKaEBw3lvSWkV/KqQ27bdtl1j+iL8dYYl6o1v6Ffqgj4BcW5EVMWZ JrMffy7qG8DW39NW7QWj0z2i8zA1ll/Tj7wN7AuRCJIXMuZpShNjtJJKiVjM049Cul H7SdrbMBY1RO+/PYBER7yKzgy7bgle0KPF4asvDHEkiGpVGptxkCBevZqfBAcZyGM2 4mIcOEHpfo0jsRxqvgBuZdsUIDV0yxSwtEm9EQ4r9CEzuc/vBQngDZtzuJPvX6bDna 2WEehCQl7JCBA== Date: Wed, 1 Mar 2023 19:50:27 -0800 From: "Darrick J. Wong" To: Theodore Ts'o Cc: 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: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: AD7FE140006 X-Stat-Signature: omx6m5a9ecynqjdr3m8xnffjyz4fhp6c X-Rspam-User: X-HE-Tag: 1677729029-269135 X-HE-Meta: U2FsdGVkX1/5BcEsCKXeRsB5k3JnIW3tmd0j4oO3jKrycHU0zUVh+gKFho4w0Dz0wYWPqtFNbY8sGWaPgu6cbF99thY1qHFr4B0BAZiRIF5XWCH6N8h4674/QHcskH8j17swsrvNSAfhw4Z7JENjH5wMr+v0PmeMSp/b73E4y7L1apTDHsSGLV2lQF/xZNdncSj2Y1FNQH8xroPIyfhmU3XKPm5Ua3nJ/4DCbaxbIWveO6shPWJCwrwjPBJAEqUt2zJxm9V9o8uXs1w7xfXUs1NKyUYPKhh+yuIutAr/2Fb389qp3JVXq4CvII2gASdBCqSB762h41inE7U//vQGipp6FWAYWsNo7X9aEnZD9T5rJVlhP7KAaVgG7pERBuIjdoH/BSXfmiV0r479OewDk38edrvDV5/RLhWbu9C8OrE0rYKyYD+/MREAfYCRzGji9WfMXnR2f3DYTt4ftyfmP66YvVKKZVIoF5QTYfGTmLS2/yPDc//8aLBWm1cWZNjC8l2NeITn0IVE3s2KHq0/9Vfdn35eJXvw2OzNXFMqrPX5LI5w+sFonFqZUl6HJfhbOBqbYKn+M6rNN4o/28jC4F5xZz3DXLUvdiuYSEQnrSmFCJ2Ahh3YrA/YCAVRG68ezv0xYoBsOv1Vog74NBEfPPB8L8d3z/Dwq9pONqSb7i8nY9flie95H+QrhMp2ftWczYjvlySRliO7HFSfsRBdbZ2A/2JfJ9sis/LWIxYUlMhk4RcJcU8zsXJ4fVwwlN3B1CNNAidnJIVDyDIAoTZOxnYng45uVCz4ua89U0M1vYBnuy9ABuZAfWifY1N6A/eW2URF6dbl2W8IvRqwbazGMMLFNW82/jXf3jJWF11mX0I6c0Dnk6AmiJNTHMgqEK+Co1Z6+JjLy/w+wv2ivb6z7Vh488yLbrkgjOYJ5gRKcabqHLMHNDc6cXWaXM9QQBUx6jfHODGbIC6Cp918Pyd N0EPHUKY j7744GP4pwpS2CkPStWCY8WvK9KG7jxSDYo35iKDTF2/mMC47t0zffs1dNDsAP/4kg9KtkLwr3Ra7BmoIZRa/519P2mdGnAUwey/Vv0BAe4mtHaxrm2o0js36VhD/ZS1VdHussgPVHmnxDb+Ugx/UEmoDpId599FLa96+7s7mfBx8N2d8z2eNXwdYh+gGmUB/wvTf/LXP9L8//Ezr663L1cOVXaz9/cLJLe6OVckPHRSGpESRhL3Vm3FLARMwOFJscmyvnSnga9ayuow= 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 Tue, Feb 28, 2023 at 10:52:15PM -0500, Theodore Ts'o wrote: > Emulated block devices offered by cloud VM’s can provide functionality > to guest kernels and applications that traditionally have not been > available to users of consumer-grade HDD and SSD’s. For example, > today it’s possible to create a block device in Google’s Persistent > Disk with a 16k physical sector size, which promises that aligned 16k > writes will be atomically. With NVMe, it is possible for a storage > device to promise this without requiring read-modify-write updates for > sub-16k writes. All that is necessary are some changes in the block > layer so that the kernel does not inadvertently tear a write request > when splitting a bio because it is too large (perhaps because it got > merged with some other request, and then it gets split at an > inconvenient boundary). Now that we've flung ourselves into the wild world of Software Defined Secure Storage as a Service*, I was thinking -- T10 PI gives the kernel a means to associate its own checksums (and a goofy u16 tag) with LBAs on disk. There haven't been that many actual SCSI devices that implement it, but I wonder how hard it would be for clod storage backends to export things like that? The storage nodes often have a bit more CPU power, too. Though admittedly the advent of customer-managed FDE in the cloud and might make that less useful? Just my random 2c late at night, --D * SDSSAAS: what you get from banging head on keyboard in frustration > There are also more interesting, advanced optimizations that might be > possible. For example, Jens had observed the passing hints that > journaling writes (either from file systems or databases) could be > potentially useful. Unfortunately most common storage devices have > not supported write hints, and support for write hints were ripped out > last year. That can be easily reversed, but there are some other > interesting related subjects that are very much suited for LSF/MM. > > For example, most cloud storage devices are doing read-ahead to try to > anticipate read requests from the VM. This can interfere with the > read-ahead being done by the guest kernel. So being able to tell > cloud storage device whether a particular read request is stemming > from a read-ahead or not. At the moment, as Matthew Wilcox has > pointed out, we currently use the read-ahead code path for synchronous > buffered reads. So plumbing this information so it can passed through > multiple levels of the mm, fs, and block layers will probably be > needed.