From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59B8C16C69F for ; Tue, 24 Sep 2024 09:32:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727170375; cv=none; b=jsPwAztVdLP7zwkmhNZdEwwYhvpfz4NqV67Uarmd60h13nW00TcPQxDKTgh9f6xJiiX5N6qre8SdsOk5YPEqCdRDIGN3FsLvkmEoGfAD6D37Q+PG2NXxHu5EwZXgT6IiiEp7iMDky5NO7gsxCx7gWLoHjNcAY8X6skc3c7ArXBk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727170375; c=relaxed/simple; bh=VHEY5enqTMnC/+RG2f9x6q557yzmCYer09TIlKHohU4=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type: References; b=WJwavuOdJ8eXiZAOiD+Pic7qgFT/Tuy7B2UvQYhDv7VcK7NAZGwIhpDww7JsTksN9LZtruWkG8QOCLdxilz0iOYi6lu6XYLmctesBFsO6qUyvMn56MgA2taGlyKOR1Maqz2PWn534AzVE9zpV5L6OhfYRf/4rXRslzgU+EMqrZw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=J8EjFUUf; arc=none smtp.client-ip=203.254.224.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="J8EjFUUf" Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20240924093250epoutp0490715f80ddc33863658f4cf040f3675a~4JE0GrZXT2432124321epoutp04s for ; Tue, 24 Sep 2024 09:32:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20240924093250epoutp0490715f80ddc33863658f4cf040f3675a~4JE0GrZXT2432124321epoutp04s DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1727170370; bh=O/zo7RhP61a9O8LhrGF/ZtU+oupMYRBaBJMbkLt8RWE=; h=From:To:Cc:Subject:Date:References:From; b=J8EjFUUfgBjp+HMXv7klApRcsEB61VDto7YGUaMRPQJsmLh/H9UAIOEgPeZxVkg/j ybNYkLU8oxuhJ7vSCRt21OgGkl+aCAkHzmEeWzXUDOJ6mJ5ngvF9YuW3/GkM4qsnzY OEtEcMds5gJjd7j9KpHN+DQu3WczJ5RsAUsy5+90= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20240924093249epcas5p3fcbf7bcc0b66c56c798faa982378d7a9~4JEzWd1nY1076610766epcas5p3H; Tue, 24 Sep 2024 09:32:49 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.177]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4XCZQl5qNKz4x9Q8; Tue, 24 Sep 2024 09:32:47 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 11.BD.09640.F3782F66; Tue, 24 Sep 2024 18:32:47 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20240924093247epcas5p4807fe5e531a2b7b2d6961d23bc989c80~4JExIvixO2460424604epcas5p4W; Tue, 24 Sep 2024 09:32:47 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240924093247epsmtrp12b64f86c2a37fd7b3e74534f718926df~4JExGlRU50907509075epsmtrp1Q; Tue, 24 Sep 2024 09:32:47 +0000 (GMT) X-AuditID: b6c32a49-a57ff700000025a8-04-66f2873fcd23 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 36.C1.08964.E3782F66; Tue, 24 Sep 2024 18:32:46 +0900 (KST) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240924093243epsmtip2ac324fa66b8c50096f40fb2d889aea28~4JEuIOfcM0088900889epsmtip2D; Tue, 24 Sep 2024 09:32:43 +0000 (GMT) From: Kanchan Joshi To: axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me, martin.petersen@oracle.com, brauner@kernel.org, viro@zeniv.linux.org.uk, jack@suse.cz, jaegeuk@kernel.org, bcrl@kvack.org, dhowells@redhat.com, bvanassche@acm.org, asml.silence@gmail.com Cc: linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org, io-uring@vger.kernel.org, linux-block@vger.kernel.org, linux-aio@kvack.org, gost.dev@samsung.com, vishak.g@samsung.com, javier.gonz@samsung.com, Kanchan Joshi Subject: [PATCH v6 0/3] per-io hints and FDP Date: Tue, 24 Sep 2024 14:54:54 +0530 Message-Id: <20240924092457.7846-1-joshi.k@samsung.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: io-uring@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA02Te1BUVRzHO/de9i7U6m1BPTIBy1YY4CIbCxwKhCm0WzKFMVk5GmxwYYl9 uQ8ixkmGl4my5G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2Sz3fRWt9b1e2et4IOs6zu2Bq8Mas6325hiRjzcq7NU67Vi17Ylf13KetpeXbG ksXBYUfk2P9scP93PFTFMnFb0ouJ32+ySc2LmWQv3KqTuWWpI1v8gePH5p26122v3cGckbT7 R4LARsWXErbW3RsUjwZflZ1twrW/mWHjhqqY2Jo0+6u7ok75l70N7nnb57ljg0/LMrZcqScL VdId3I7psTNrHF+lGDdhkt6d1fNyzGyS9ex8/SS+3enKKvu3191CiaU4I9FQi7moOBEA0UbF +zcDAAA= X-CMS-MailID: 20240924093247epcas5p4807fe5e531a2b7b2d6961d23bc989c80 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240924093247epcas5p4807fe5e531a2b7b2d6961d23bc989c80 References: Another spin to incorporate the feedback from LPC and previous iteration. The series adds two capabilities: - FDP support at NVMe level (patch #1) - Per-io hinting via io_uring (patch #3) Patch #2 is needed to do per-io hints. The motivation and interface details are present in the commit descriptions. Testing: Done with fcntl and liburing based custom applications. On raw block device, ext4, xfs, btrfs and F2FS. Checked that no regression occurs for application that use per-inode hints. Checked that per-io hints, when passed, take the precedence over per-inode hints. Changes since v5: - Drop placement hints - Add per-io hint interface Changes since v4: - Retain the size/type checking on the enum (Bart) - Use the name "*_lifetime_hint" rather than "*_life_hint" (Bart) Changes since v3: - 4 new patches to introduce placement hints - Make nvme patch use the placement hints rather than lifetime hints Changes since v2: - Base it on nvme-6.11 and resolve a merge conflict Changes since v1: - Reduce the fetched plids from 128 to 6 (Keith) - Use struct_size for a calculation (Keith) - Handle robot/sparse warning Kanchan Joshi (3): nvme: enable FDP support block, fs: restore kiocb based write hint processing io_uring: enable per-io hinting capability block/fops.c | 6 +-- drivers/nvme/host/core.c | 70 +++++++++++++++++++++++++++++++++++ drivers/nvme/host/nvme.h | 4 ++ fs/aio.c | 1 + fs/cachefiles/io.c | 1 + fs/direct-io.c | 2 +- fs/fcntl.c | 22 ----------- fs/iomap/direct-io.c | 2 +- include/linux/fs.h | 8 ++++ include/linux/nvme.h | 19 ++++++++++ include/linux/rw_hint.h | 24 ++++++++++++ include/uapi/linux/io_uring.h | 10 +++++ io_uring/rw.c | 20 ++++++++++ 13 files changed, 162 insertions(+), 27 deletions(-) -- 2.25.1