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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F164E74915 for ; Mon, 2 Oct 2023 19:19:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238519AbjJBTTj (ORCPT ); Mon, 2 Oct 2023 15:19:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229607AbjJBTTi (ORCPT ); Mon, 2 Oct 2023 15:19:38 -0400 Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BA00B3; Mon, 2 Oct 2023 12:19:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1696274375; x=1727810375; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=d9+U0s8Q9U8rDaOtLdEYnjQ+X8kSMHYan9xvBfCvNyM=; b=BKkRQjhzHyrH6VPcO4naer+gMfpkWL8NB550y4dqiujkOwFxjqvWgaKS NtXfPiQz4pQ/oq1A9O+OE3wl6BUY+Z4SvDtzNWXaH6TUlLbYuGqHY6QK2 PlCibPGkXncHQ2TVg2cRynKea1C70AjoUuSGf9YpxObyIrO2dyQyNejMX NKAOFLROMFZmMnoJcwdhAAMKe3mE2oO7fR9AhHp/kVsXxo5f/GWPLKpI0 28C1ES4x/5LTd4DwrFPbeXv70s9fAYol9TxuTGso1fMGu3aF5PA9kuCK6 VoAkaDsNgxvsndPuPX67z6ErvTbb9w+zneP4Kh95Vcm4DrTz7OjfEBdJN w==; X-CSE-ConnectionGUID: HaTVatsRTCC7/0Hw874Rzg== X-CSE-MsgGUID: x57+dWmETbCADs4Uyy4J3A== X-IronPort-AV: E=Sophos;i="6.03,194,1694707200"; d="scan'208";a="245475818" Received: from mail-dm6nam10lp2104.outbound.protection.outlook.com (HELO NAM10-DM6-obe.outbound.protection.outlook.com) ([104.47.58.104]) by ob1.hgst.iphmx.com with ESMTP; 03 Oct 2023 03:19:34 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WwX4tsSr0qXXjYcoZ9KPzLiu1+iTnhO66CQ3OQows5vRVVjudm3bi2rmoI5feVdKcGryFczeDcTFo//hySZTayHgheL+hPOyti9gqhyg1C7pMnqgwP5NiJqgAA+xnSO06iqeZ08mF1oYB3BaiUXmSvD/MXwreYv43zcifQtUnbAROwPnNxtA1Lj2ktmGZUDqOtKlKCPrVI+lhg01r7dt5eds4MiHCMoHFmPmhPbsazm+Ph4bMBoBEvJ/Gzl5eekAhx6fT40wNNEuXQA/1HT2N1+771wTm+4KlbAiEDrz/mFWns0fq37Mz9Rs4NU3RUt9gt3X8eCZFUFPqypppQw/NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=d9+U0s8Q9U8rDaOtLdEYnjQ+X8kSMHYan9xvBfCvNyM=; b=PdL8JFChJjaOv7i/ylF3+Yoysllh2/+Xj6GV/rKlEK6VA24k1zjES/o8zKm5K0cPc1lmS5gycDB4fYcft1NK/N4PJqQVaix84EpglSMBda+Mj/DoG8SF8XOgKVz+rVjxWmKHUEJJMRbzYPjq02fDIfAyjyEjSALHSEkJQGVYuYAIXCfExmKZo8Gg5iyynoh3zEh4mur/XL2Mn9/2Ra6hYgyX+GzPCm1eB14UMXfngNkS1T5/rbEyAVALfJZnOTEa9NGSi++Cfv03WvwP5zRvwSj85iA9Q+Kka/ulC4alnFma6r48eRH5QydqfbPGrW8nRrc6iCHUCaRj22NQE9jhAw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=d9+U0s8Q9U8rDaOtLdEYnjQ+X8kSMHYan9xvBfCvNyM=; b=fP/9315FRCqw1T4h8tskBAv2C1smconFotDDQd/ERpnProiZ8rS7dbia8Pbdc3SCNb9HNUKpR2d5841yC4UolhKKgR+ULrS37vd6L0Akny9efqHmPY3UO8RelAaXRhJTfc7lFbnDatCeMlNAoBXadHAKKnbYtHaAnU2dQ8xuFog= Received: from MN2PR04MB6272.namprd04.prod.outlook.com (2603:10b6:208:e0::27) by CO6PR04MB7874.namprd04.prod.outlook.com (2603:10b6:5:35c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.12; Mon, 2 Oct 2023 19:19:32 +0000 Received: from MN2PR04MB6272.namprd04.prod.outlook.com ([fe80::6fb5:ecb:1ea0:3b1d]) by MN2PR04MB6272.namprd04.prod.outlook.com ([fe80::6fb5:ecb:1ea0:3b1d%6]) with mapi id 15.20.6838.016; Mon, 2 Oct 2023 19:19:32 +0000 From: Niklas Cassel To: Bart Van Assche CC: "Martin K. Petersen" , Jens Axboe , "linux-block@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , Christoph Hellwig , Damien Le Moal Subject: Re: [PATCH 00/13] Pass data temperature information to zoned UFS devices Thread-Topic: [PATCH 00/13] Pass data temperature information to zoned UFS devices Thread-Index: AQHZ9STkFfj1sZp8ZEmkxmgvdKgC97A2Y70AgABOSgCAAC5ngA== Date: Mon, 2 Oct 2023 19:19:31 +0000 Message-ID: References: <20230920191442.3701673-1-bvanassche@acm.org> <2fb20f41-ff84-4622-9d7c-7e88ff296509@acm.org> In-Reply-To: <2fb20f41-ff84-4622-9d7c-7e88ff296509@acm.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wdc.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN2PR04MB6272:EE_|CO6PR04MB7874:EE_ x-ms-office365-filtering-correlation-id: 960e5ad4-5159-4dc7-adba-08dbc37c8193 wdcipoutbound: EOP-TRUE x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: uN85WRuAkBBrALVo3FTsMjsLHWxUTk4ICydkfEdBaEcvKxaw8HqYqTFP1hz00weNTuypYvhYhKHGNKlCTWDHGhwvhdVrlNsK4uMGHbbDs6n+n1sng2A5tedbbqUhFPBa3o6xRZUVI/VTkB7YuTQzevqaT2KTfEDA74H0PS1MsCybYGW1+gRwGW1Jq0zuGP9C4k/MaJ823j0ld4zwF7fs+ZYXdEqWVrEDwH/nXeWM83itL4ky3nF9muVpkmsnea1+CB6R8ub+eFnsdbNTdPYIl5cGIBznZmr7SKtptRSIvnU85DwHy4mVODbuye9Sd8hidtzmCy3rniD/p3Ggd1kFF8EUflffbPpWaavCZqM/X+A8LK7RbIZm0+ZEO0OVbKf6ox8f7i0EvTihza/VSi4UtjZ72pJRSlX6gMjqSzDz1zsAeU+4x3512haY29GUWWTaWCtTtBqHVvRTXOiLOVqHwAK1dx+FFgXksTUkKrOojJc0agmywxXvKLVGfW8UPfTWBmhlZlNucLUnDaOIrpLulmyFcvJ3mWnhHxf98NIZCMP329eRCc6+/POLkBPaLZZrgD2oaS/sZ+FujI5y/B7yL+sEF8Lbp1maLI6L/LPamogNicfl2p8GFEWrcPNiGdMmesZYIoWAoIUi9d15LofOpg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR04MB6272.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7916004)(376002)(346002)(366004)(39860400002)(396003)(136003)(230922051799003)(186009)(1800799009)(64100799003)(451199024)(8936002)(5660300002)(2906002)(4326008)(66476007)(66946007)(66446008)(91956017)(54906003)(66556008)(316002)(41300700001)(33716001)(6916009)(64756008)(38070700005)(478600001)(8676002)(86362001)(76116006)(38100700002)(966005)(83380400001)(122000001)(53546011)(26005)(6512007)(71200400001)(82960400001)(6506007)(6486002)(9686003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?dVK/UrfgTH8N+/uVC+dT/nKQniGAejTLQia2IEZUt7M3aFAOaGQKTOGeVby3?= =?us-ascii?Q?Lkj6vBNKP/9ZrTQ2mzxw/tgpoeGeqRFYyyVrElbI263YrlwfCrU/Zmz01/x6?= =?us-ascii?Q?KNDiaGxfxTfd6NQ+stJ5taZwpHfXXReHydw4i6dDKegyTodHvSfIbBAFq7Gv?= =?us-ascii?Q?67aM8IpLk8zMXPcFUAhHiCmLnuZF8iFQR7vH5oVXo55lkjgREkSoZcgYeE6e?= =?us-ascii?Q?coNQOROgakZYy4AZXXBZaN+6r/Bif12BAV/KHz49ANbcUlqR+3hQMX0wVSQu?= =?us-ascii?Q?hJE8rWLIVpriSGjvSpk+XVz98Ja7+gyYDBhCoQRPOvCG07w0sZaJVZU9lmFs?= =?us-ascii?Q?IKe2tJqIml8BIZEU0Rwe2Mc2Y1SyEUi/vE0Fanc7Di9A5PAxvkCJb/1BNfMZ?= =?us-ascii?Q?Kb3xIVfG5RsB7AcMoO79FsEB7FvKl+I59MF6XaqxFapKTkgbk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khNPRo91z4zrICiqWddcSg8pnHTBlWWhplUx6DqaR?= =?us-ascii?Q?zeJ3gbYA2cK7gHi+z7TdQAOfBbd8RtWxTF/zzaIwhq6mTOjouj341TaEWeHP?= =?us-ascii?Q?CodbejpNOZb7jdYlY+UsSAZ+DxcZbu6cJDAKTft3b8acRQElMvwm+jBce+Oo?= =?us-ascii?Q?0ADjecopakjj0q8CCPLy63aVAFarMcnpF1qR8xYCH3SfWRLLbBnVYwXDvT4B?= =?us-ascii?Q?3SCDZzz1ko/tErkVKYos3fD/8b52Jxhuo7XpcoG6WxoUk48cAU2XbxqET75S?= =?us-ascii?Q?6w=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: S3GgLvQbTKT73aZRmhYrKQbTOWkzdKVkoGzle5ohk829bKQh/3xdefZF8ZJXfFio4k9F4aXcfwntE7js/0PWl9UPbBtPnoXO6l5Vp9wk1zTKxN6tXGvnetP/68C/AQ6Hd35jC5doQ9JuvleJMwlzdxQ6pSzi1LFcSWg3QoDDqNGO3LqgTjFGTqeRWAAcyfWGktO+OydInl/838UqZpvnT6YELJGVpLmgVQieFAIDd5KfZ4vfHQIUyod2DJ51D0Ix8vFWXYYjQmTGYXwOK0trxygHc5WQFDFPJoA0MRInOs17jiSBgcGz6TNAql00N5xa9gQKM/873NN5mCfKe6NxG/CJ0knumVolwFdOqeLdaMXV/a7NTqlOV6ZJvza/R2kBhyS0znjfwRTYvf5yGUt/Etmlx0PvgNioBvuXeNcl/2fvmCFdWUnCW3eXoPt58RVBng112zvqT0P8/erE3gTOhkLFrPPuuSrj5Bis5Vcs6MQSWoYpSkzUIm6bIrARpQVPlk+lwZSoJKArCBrvrtHVj1KcfrtwHHnigo6xtHemvuPluA46p2Mn/oxhIiAFNW6ikmJEmzof+RVs5weDRMtowvskA3XqEm/qRt5xOaW/SWinbbtu7bbRedYu8iaGzGH49dVxGXlT3LfxVknOy69iEsL32jrfcghyiPZpsg03nPnh7fuGcBjPX57o4BbSjG22Kr0SliAif/uouZOHy6FpRop9JqhmNnU8vBhyura+oFfmcovA5p46N264LurV2wYoCK0ix62XQUg/Rx/Ojrd0wlb6W/8GQU174eSyKssvtGOrRQ0Iq3PRDAiwNxwR0hd6UjeP9xl8wfhY3dXAk7szGq8R7M4i04/DDvCNofxromT2PtmNvFZXnCv1EmFolyohYNvY5KuYDp7UQ+bYfdWczg== X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR04MB6272.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 960e5ad4-5159-4dc7-adba-08dbc37c8193 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Oct 2023 19:19:31.9753 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: F3izn+LXMNxSpYGbR5wQA1RqIk6agS6S4lbWA6n4aY+EuE5PH4T2WAv8CeWy0bXfRY3xWCSpgOBo9nHkb0DAOg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR04MB7874 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Mon, Oct 02, 2023 at 09:33:22AM -0700, Bart Van Assche wrote: > On 10/2/23 04:53, Niklas Cassel wrote: > > On Mon, Oct 02, 2023 at 01:37:59PM +0200, Niklas Cassel wrote: > > > I don't know which user facing API Martin's I/O hinting series is int= ending > > > to use. > > >=20 > > > However, while discussing this series at ALPSS, we did ask ourselves = why this > > > series is not reusing the already existing block layer API for provid= ing I/O > > > hints: > > > https://github.com/torvalds/linux/blob/v6.6-rc4/include/uapi/linux/io= prio.h#L83-L103 > > >=20 > > > We can have 1023 possible I/O hints, and so far we are only using 7, = which > > > means that there are 1016 possible hints left. > > > This also enables you to define more than the 4 previous temperature = hints > > > (extreme, long, medium, short), if so desired. > > >=20 > > > There is also support in fio for these I/O hints: > > > https://github.com/axboe/fio/blob/master/HOWTO.rst?plain=3D1#L2294-L2= 302 > > >=20 > > > When this new I/O hint API has added, there was no other I/O hint API > > > in the kernel (since the old fcntl() F_GET_FILE_RW_HINT / F_SET_FILE_= RW_HINT > > > API had already been removed when this new API was added). > > >=20 > > > So there should probably be a good argument why we would want to intr= oduce > > > yet another API for providing I/O hints, instead of extending the I/O= hint > > > API that we already have in the kernel right now. > > > (Especially since it seems fairly easy to modify your patches to reus= e the > > > existing API.) > >=20 > > One argument might be that the current I/O hints API does not allow hin= ts to > > be stacked. So one would not e.g. be able to combine a command duration= limit > > with a temperature hint... >=20 > Hi Niklas, >=20 > Is your feedback about the user space API only or also about the > mechanism that is used internally in the kernel? The concern is only related to the user space API. (However, if you do reuse the existing I/O prio hints, you will avoid adding a new struct member to a lot of structs.) >=20 > Restoring the ability to pass data temperature information from a > filesystem to a block device is much more important to me than > restoring the ability to pass data temperature information from user > space to a filesystem. Would it be sufficient to address your concern > if patch 2/13 would be dropped from this series? Right now 0 means no I/O hint. Value 1-7 is used for CDL. This means that bits 0-2 are currently used by CDL. I guess we could define e.g. bits 3-5 to be used by temperature hints, i.e. temperature hints could have values 0-7, where 0 would be no temperature hint. (I guess we could still limit the temperature hints to 1-4 if we want to keep the previous extreme/long/medium/short constants.= ) This way, we can combine a CDL value with a temperature hint. I.e. if user space has set bits in both bits 0-2 and 3-5, then both CDL and temperature hints are used. (And we would still have 4 bits left in 10 bit long I/O hints field that can be used by some other I/O hint feature in the future.) We could theoretically do this without changing the existing I/O prio hints API, as all the existing hints (CDL descriptors 1-7) would keep their exist= ing values. While I think this sounds quite nice, since it would avoid what your patche= s currently do: adding a new "write_hint" struct member to the following stru= cts: struct kiocb, struct file, struct request, struct request, struct bio. Instead it would rely on the existing ioprio struct members in these struct= s. Additionally you would not need to add code that avoid merging of requests = with different write hints, as the current code already avoids merging of reques= ts with different ioprio (which thus extends to ioprio I/O hints). Anyway, even if I do think that modifying your patch series to use the I/O = prio hints API would be a simpler and cleaner solution, including a smaller diff= stat, I do not care too strongly about this, and will leave the pondering to the = very wise maintainers. Kind regards, Niklas=