Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2696160rdb; Mon, 4 Dec 2023 05:14:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IHTjhc5mM6FdwxLJDjyLfcDHeC7ZfZ0R8+jP9cuf6tzJaxmFTW8B/MlOt/yiqF/gKbgZcOE X-Received: by 2002:aa7:88c6:0:b0:6ce:4b97:b894 with SMTP id k6-20020aa788c6000000b006ce4b97b894mr2543321pff.17.1701695699079; Mon, 04 Dec 2023 05:14:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701695699; cv=pass; d=google.com; s=arc-20160816; b=wmvftqpyeI8wR3LcUSA7nFzJNpiwNpyzCOK6Zue8jOLsieBR3HlaKJEaBwKQ+CYMK/ 9SYbr5HKc3qMhKOXwret06oCPN94xo+qJ2seETZGCT/UjbLW7f4GQTBl2WGI2iJ7P3OT t4l4nyg2BJeakWaNRlm8cPrrSWtyB1uWcpJCd9cYpXm+gsvvD00Mr1BX7J77QBfKHScO 4DbCRoqqIHZk3f9VzAAI+N8vEW8BAjwuJf+W7tQK0WR/K6PyCSbVYTDAtoxciq5r4VSx hGOdZzoIsxRsSJ8gxsg6zJBHmUm21+X3syZjW2/dVDtXj+CJGBkB3jhOFzRKIMNnlDtt Qi6g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:organization:from:content-language:references:cc:to :subject:user-agent:date:message-id:dkim-signature:dkim-signature; bh=u1Me0c0pDT1iHHvXjJKtxlWtoZZ8ms6sKrr84vSGuTM=; fh=eohSbp/eZpkB4uCsoX1G934MJ07KRQXmNjJ4fX0rTK8=; b=KpiVJYd6j0YpYL3svwaCFuo9x2o5KVpGZyS295BYmXrznoJswgnq+wWFXzy9lBhe9D 0XFM1MqzDxjWFBQlJYmfsfVb6hUpqkNFm3rJEaLZzeKKq7RUqjfDR06kcnftv3aLavDY gKS3ctdtF98Q9Yu+eHLpTn2Nn26di2ieqCcYX1YrNTNlx0HfbM0LGVs2gLJd+R7W8G/h eWbo32RsGF7bm2rY977AzFPe1/ljiWaBlzYByQc8AXbD00rAJl6tzYjwM2OVAGW+76mk VhvHr7CkfeG9peuVkZn7Ec6TXQ2H7zL4H3V+e1OmuoyYkSWSNs/pKB9yt6xFaN1I0AVS 7FGQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b="RmsV/a50"; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=FbJ1w5Qx; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id g3-20020a63f403000000b005c2791fedb1si7645341pgi.874.2023.12.04.05.14.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 05:14:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b="RmsV/a50"; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=FbJ1w5Qx; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id EF22B808D8CA; Mon, 4 Dec 2023 05:14:55 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233473AbjLDNOj (ORCPT + 99 others); Mon, 4 Dec 2023 08:14:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229711AbjLDNOh (ORCPT ); Mon, 4 Dec 2023 08:14:37 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADBBE95; Mon, 4 Dec 2023 05:14:43 -0800 (PST) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4D0vNR017820; Mon, 4 Dec 2023 13:14:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-11-20; bh=u1Me0c0pDT1iHHvXjJKtxlWtoZZ8ms6sKrr84vSGuTM=; b=RmsV/a50L2D6iayPDKXeMiDnDn8dRxCb3RmQwTnrUYpIUr+N989DK5+9SQThMCkdNVMY axorSmp7HvRU/3ZeAAw0HqaQYDS9zbZgjzNpKe7C7/o4Dgx4SRwtjzGVg8iRWWtoV126 MoZptoDR2V4izgf7pWu0lyDXyUNJdgzPA/OZfz378Sq8YBHNBBNUElJFyPay8Sowpotp TO2ZRfGdJamNI6MhE21dKmqwJAGXE4ZIGH6YTQmt58zsBObhABgXOexGdGpDz4Z4kZZz YXrJ6jYQa3KdGSJCEjrwON65Bpuke3cVKgIdkfiPvA7Y43jbiYcKD57VYlI6oRPNUdIV 6w== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3usf9f02k7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 Dec 2023 13:14:20 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4BcVS6006056; Mon, 4 Dec 2023 13:14:18 GMT Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam04lp2168.outbound.protection.outlook.com [104.47.73.168]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3uqu15j3vc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 Dec 2023 13:14:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fX7W+gm1O/dgxrMY2qPVAN8e5kZKZThVbzcAAwCyt0YgsztzLTggUS/DR/rOcHZ2LoMieYsgbOXxwHrma4s2H506hdzDMae+D7+1C7bCNgoKrsJJWV1QrHoVjXprYg3nNfAE0T2L5as0Uto+Nz9/eiCEW0btIcohENdsPVBWypGg/OJkF2oFcLqFgPTn4W5JDZEpoEt185G+p4UrNFzq6Z5JckblZ3+ZGgVPqahYllTDhUImVNIJg1tcrFlJzb+6YYW954kuOoK/D9h2NIFOzti7BivUfNxSwrJBdTFxNE4TdayzcInbsah87gcw1qxrj8MN3qf12E67DQoXVBj9nA== 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=u1Me0c0pDT1iHHvXjJKtxlWtoZZ8ms6sKrr84vSGuTM=; b=gaKXVOx2x8Uuu7u8UJdxOE0pTlVXMM58SBne5HYOpheR7rjV87HEVs+rIX4DUQNAv+wgyqgRPpnEAyHE/YI+ePO8uhdbhQAhNA1PtoCDYrFoPqhEtLpEIQAQC1SWOixpGe3Qtq8SSihz4LubnIC4UmxtR8lAm+YsibRZbZfsKRQ+5lxwWGOPLzlbYYwndKCxJthVZ+vnxj4yTaPMPXzH1DWiN+dAQvxfiVX9J7soTGhGHlM+5wN4dyfqY98GICFPgASN7xQP/MVJuuTJV7WHycnmwAl3NUHnDEzQrsiJYK/Kwzhr+JfcVAxeDJk9jM/8yP8iLA+Gw3Ike2eh5/Aajw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u1Me0c0pDT1iHHvXjJKtxlWtoZZ8ms6sKrr84vSGuTM=; b=FbJ1w5Qx+VJtFhBGwTIACMVKS+sddDTh/QSdOPhHTxO2gtSsHdCCwx3FwWhyutOnp960D91tIRqED75X6a5FL9+kCMG5v9Ec6UK38OwG/YDJ9X1Ez0EAgjtzJl5dqJ6m5Im4gpo5bCp6Z5pQPjBQyYJz3CGhvi36xwOIx+jCVDk= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by PH7PR10MB5855.namprd10.prod.outlook.com (2603:10b6:510:13f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.33; Mon, 4 Dec 2023 13:14:09 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::102a:f31:30c6:3187]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::102a:f31:30c6:3187%4]) with mapi id 15.20.7046.033; Mon, 4 Dec 2023 13:14:09 +0000 Message-ID: Date: Mon, 4 Dec 2023 13:13:55 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 10/21] block: Add fops atomic write support To: Ming Lei Cc: axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me, jejb@linux.ibm.com, martin.petersen@oracle.com, djwong@kernel.org, viro@zeniv.linux.org.uk, brauner@kernel.org, chandan.babu@oracle.com, dchinner@redhat.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, tytso@mit.edu, jbongio@google.com, linux-api@vger.kernel.org References: <20230929102726.2985188-1-john.g.garry@oracle.com> <20230929102726.2985188-11-john.g.garry@oracle.com> <03a87103-0721-412c-92f5-9fd605dc0c74@oracle.com> Content-Language: en-US From: John Garry Organization: Oracle Corporation In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SI2PR02CA0052.apcprd02.prod.outlook.com (2603:1096:4:196::18) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|PH7PR10MB5855:EE_ X-MS-Office365-Filtering-Correlation-Id: 94e4349b-2d7f-4349-1608-08dbf4cae685 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tleAg7ML2Pr43bxARln1SCZPvjrEgx6D6hCVirQ57noXbMM0SO09EP0F5Gf4PebHvisLYDS8CjOR2MvfwkbCf3ESkLLrj8b/l9k3K7GqmO8y+tDjrg0oj/wrHkiRKl7G+99TnjBkXDNfLUcCn5112/L3HvgZ2T+f8fKOv2KBvRf/9sGafXZ/GazaPtmWBwi7zq49uQ4hxffAGmP/+rRDjc6ST5v4vec5B7grIbtn8z+/wVJUrILzP4rVszgclgSNW9IgnLiyiCnAyuvxrl4ClbOEx6t0uhl+8r5Bh6vEskjfpGMvjK8N0z90AEuFXuErUSYfftAAq4X4vY+Y4ZMsNq0Khd7DvMBYy5Lv73nd2xnxjQDZ93aYFCmtN6jAJPKIA4kWfWX3wu7uc2HK97EIpyOoutgq7Cn1ifcC3pJq+yqO0tQ4B68avUYWvxpBSZARsHJ+D+fvdNLzrvl58CdUK/tBMnj15nDgr0th7D8qi+x4WJXJJcWuO5VIZwGgEYoy5S72L/R6CRftcB6DftnOLQtD4M6bdmfq6OM1JVO+gjQ30+zW67vBzMns6IKhZUKriF4oEmJSsR9aQOi7t3b2SWIodxLSp3WfL+a6VgR9HdjgieRP24MNm9LJK3mYmaqQBmykG0NQvhwGObgEBjdFkA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR10MB4313.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(136003)(376002)(39860400002)(346002)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(41300700001)(31686004)(6666004)(31696002)(86362001)(7416002)(5660300002)(2906002)(83380400001)(66476007)(4326008)(8676002)(66946007)(8936002)(36756003)(316002)(66556008)(2616005)(6506007)(36916002)(478600001)(6486002)(6512007)(26005)(38100700002)(6916009)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eDM1bFJvKzNnTXRlQjB6NTJPNjh2NUxZdlRueDYwQVJYcTkxbktxYmdWcTI1?= =?utf-8?B?VTdxOFcrTFZ4WW5HV0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8?B?cGVjNzNEVkx6VW5HWXFrdHRsNkpzUFZ3RmFLT293PT0=?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 94e4349b-2d7f-4349-1608-08dbf4cae685 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2023 13:14:09.4242 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WIXlHHz6wMqETQ2kVFlZ6c8qCzaOkLJi/2lC6NcQQEHpSsmwdsuZr9mAcCy7q/zLxJyI0YqH7ez7bhykqp6UVA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB5855 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-04_11,2023-12-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 phishscore=0 malwarescore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312040099 X-Proofpoint-GUID: elMMzkmnQdMeBEHJ9Jdlda51XxvUS9jm X-Proofpoint-ORIG-GUID: elMMzkmnQdMeBEHJ9Jdlda51XxvUS9jm X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 04 Dec 2023 05:14:56 -0800 (PST) >> >> I added this here (as opposed to the caller), as I was not really worried >> about speeding up the failure path. Are you saying to call even earlier in >> submission path? > atomic_write_unit_min is one hardware property, and it should be checked > in blk_queue_atomic_write_unit_min_sectors() from beginning, then you > can avoid this check every other where. ok, but we still need to ensure in the submission path that the block device actually supports atomic writes - this was the initial check. > >>>> + if (pos % atomic_write_unit_min_bytes) >>>> + return false; >>>> + if (iov_iter_count(iter) % atomic_write_unit_min_bytes) >>>> + return false; >>>> + if (!is_power_of_2(iov_iter_count(iter))) >>>> + return false; >>>> + if (iov_iter_count(iter) > atomic_write_unit_max_bytes) >>>> + return false; >>>> + if (pos % iov_iter_count(iter)) >>>> + return false; >>> I am a bit confused about relation between atomic_write_unit_max_bytes and >>> atomic_write_max_bytes. >> I think that naming could be improved. Or even just drop merging (and >> atomic_write_max_bytes concept) until we show it to improve performance. >> >> So generally atomic_write_unit_max_bytes will be same as >> atomic_write_max_bytes, however it could be different if: >> a. request queue nr hw segments or other request queue limits needs to >> restrict atomic_write_unit_max_bytes >> b. atomic_write_unit_max_bytes does not need to be a power-of-2 and >> atomic_write_max_bytes does. So essentially: >> atomic_write_unit_max_bytes = rounddown_pow_of_2(atomic_write_max_bytes) >> > plug merge often improves sequential IO perf, so if the hardware supports > this way, I think 'atomic_write_max_bytes' should be supported from the > beginning, such as: > > - user space submits sequential N * (4k, 8k, 16k, ...) atomic writes, all can > be merged to single IO request, which is issued to driver. > > Or > > - user space submits sequential 4k, 4k, 8k, 16K, 32k, 64k atomic writes, all can > be merged to single IO request, which is issued to driver. Right, we do expect userspace to use a fixed block size, but we give scope in the API to use variable size. > > The hardware should recognize unit size by start LBA, and check if length is > valid, so probably the interface might be relaxed to: > > 1) start lba is unit aligned, and this unit is in the supported unit > range(power_2 in [unit_min, unit_max]) > > 2) length needs to be: > > - N * this_unit_size > - <= atomic_write_max_bytes Please note that we also need to consider: - any atomic write boundary (from NVMe) - virt boundary (from NVMe) And, as I mentioned elsewhere, I am still not 100% comfortable that we don't pay attention to regular max_sectors_kb... > > >>> Here the max IO length is limited to be <= atomic_write_unit_max_bytes, >>> so looks userspace can only submit IO with write-atomic-unit naturally >>> aligned IO(such as, 4k, 8k, 16k, 32k, ...), >> correct >> >>> but these user IOs are >>> allowed to be merged to big one if naturally alignment is respected and >>> the merged IO size is <= atomic_write_max_bytes. >> correct, but the resultant merged IO does not have have to be naturally >> aligned. >> >>> Is my understanding right? >> Yes, but... >> >>> If yes, I'd suggest to document the point, >>> and the last two checks could be change to: >>> >>> /* naturally aligned */ >>> if (pos % iov_iter_count(iter)) >>> return false; >>> >>> if (iov_iter_count(iter) > atomic_write_max_bytes) >>> return false; >> .. we would not be merging at this point as this is just IO submission to >> the block layer, so atomic_write_max_bytes does not come into play yet. If >> you check patch 7/21, you will see that we limit IO size to >> atomic_write_max_bytes, which is relevant merging. > I know the motivation of atomic_write_max_bytes, and now I am wondering > atomic_write_max_bytes may be exported to userspace for the sake of > atomic write performance. It is available from sysfs for the request queue, but in an earlier series Dave Chinner suggested doing more to expose to the application programmer. So here that would mean a statx member. I'm still not sure... it just didn't seem like a detail which the user would need to know or be able to do much with. Thanks, John