Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp193756rdb; Tue, 5 Dec 2023 02:51:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IHih39xNIe4lfC7zIrfsqjq062jgn/pMouddXV2RtVSJmQBbcNTnnNDUYI9gAnmwWb8rcGN X-Received: by 2002:a05:6a00:138d:b0:6ce:5fd2:dd0f with SMTP id t13-20020a056a00138d00b006ce5fd2dd0fmr1395679pfg.7.1701773498422; Tue, 05 Dec 2023 02:51:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701773498; cv=pass; d=google.com; s=arc-20160816; b=eC4wGvc9IiBIuPk6Q9lCrLKmFYIAaKe3A7VwAu0NHGhKy5n9XSce2E+Rfj34l/qUnS Gubdpp6FqU+EMPGrRvt9TdkGXRFqOxp1RVrI4sL99fKYB5CDDA0BaZ/0Q9eil/WORWek WMx5uCc8lXeD1SFjIpguvlcl0ybuSGELeRC1UvF5IDxJEPSipdWpHjoy5FR9iNELC4aX eM7O5XpK9cOM6IfdEgMjL9K9qDk6XihVAQ7CF6WHwMedrDyTmVZK5ebZgwoBUcvbqe5W 3hB9c8Fo12n1Q6BjzRT+RB8QXwu2i7/8JbLShpAa1Y41exVa3lIhif/kJmjBJ0iYtDA1 hi5Q== 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:content-language:references:cc:to:subject :from:user-agent:date:message-id:dkim-signature:dkim-signature; bh=aUwHFs/kOANQOITnej+rb4yMlD3xDnhdEORkX4bGh9E=; fh=eohSbp/eZpkB4uCsoX1G934MJ07KRQXmNjJ4fX0rTK8=; b=X9RLWAMigFqrwujc9kS6uTmdq7Tym8rBCT9mG7tcgy2s0dragqaRf/MQxvU4mp1FOn dGfkXTye0xCYNR/dfmYQsv1KWfgeRu4MZYAVYYeOECbuquv4WERvapeqNDsCqzBIQwna GMkyAU4PW6MMGnYcAiXejCFRXotvWqaCOZGYI3sDfr0uyu1KyDkQ/Kwzmww5fLq+Njod pU5GLpkOGYW5ZLSUQD/aJuLxF2VWB2Sd+PagogPwXFU1qNifKgeZWgH7BMh/cLaq+Dia 3SuiTcmRYQeAlgo6gN2/zDq6JynYX0s6wpO1rUG2CSuW2cupsQJ1Lt6jtUrfQrJXftNi 4LuA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=OK4zaIEE; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=MsjBr4oS; 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 2620:137:e000::3:6 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. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id q21-20020a056a00085500b006ce5ba43015si2466202pfk.179.2023.12.05.02.51.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 02:51:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=OK4zaIEE; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=MsjBr4oS; 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 2620:137:e000::3:6 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 735E5809A80A; Tue, 5 Dec 2023 02:51:01 -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 S1376662AbjLEKuW (ORCPT + 99 others); Tue, 5 Dec 2023 05:50:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376569AbjLEKuS (ORCPT ); Tue, 5 Dec 2023 05:50:18 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F8BCB9; Tue, 5 Dec 2023 02:50:23 -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 3B5ATarH008762; Tue, 5 Dec 2023 10:49:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : from : subject : to : cc : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-11-20; bh=aUwHFs/kOANQOITnej+rb4yMlD3xDnhdEORkX4bGh9E=; b=OK4zaIEEYHRrUPxMxC/PxyNK2C24b3/Eg3U2F/s+w9kAIwamUQLYUoSh5Z3g+9RnUhH8 rFoLZpzUI7lJwSKBwCz9VCHarsvfcAOTza1CFKXgmBDupxpETmiZYxHRp9HTIgkMrOai x8v+Ebu23cE98mnW8V2bIrCkcv0RFnLoM9IbgPEFc2gGllyGwiLmZkwKapKgq1WUl+W0 TxMm/HiAIjcLkzrBKuCOfkLQQByp9XUr9ZWhEL5Y/pzfh7Du/kqKTiPMrSr9WIpFU39T OyldhJmElvQY4PZHPg9vNBD8YXfFiczFI4J6fs4AZsRcNuwwVnyz14JA/RI0QlgsZVo7 FQ== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ut0xw89pn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 10:49:57 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B59WqiM018432; Tue, 5 Dec 2023 10:49:56 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2101.outbound.protection.outlook.com [104.47.70.101]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3uqu177yev-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 10:49:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U20oE5ksvJ8BYvveEXYHz9LnaPNCZs6afeFon5hkrwfSoBlg5XdlKTEGibTc/8I3z0DYFP1Ik5fl1Ryq5ak+YEUZllYwAsImdy9dRwSC9rFNwas62ESrR58pn6Qvvving/B4ggs+BSxMLvk/rxTZ0t78XDA/EZX2xqayPa1kcgNAHeCnQ9DKb2JEc5FuL9lgRdJA9DGOQWVNttSG7ss9qfqjeRdY5O/TBiuCPfEcSOJTlTOqJcgiBFMmblBEwXBRcu3zQu+lPzNGtLz0ARh83jdMMoIBtb62/UTTSKBRbixPSZJH3rni7VvgNMBlM3vLdkQF0uK8/zTKx90MgRWUNw== 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=aUwHFs/kOANQOITnej+rb4yMlD3xDnhdEORkX4bGh9E=; b=Zg0iKTlD4kefEYO4iFcq5jtThGyLqVPgjVJLFB6rVER8SH+wGuR56nFrEwr7wDXijXuI/7lbPaiK5c9wICD3seFHxtVqnXC9pMtWX+lov2bikRvBEr9K5tUdyGqPnrnPdN3wK/SV0zpSheDIbW9/wH0J6+a9EnSERh/UMDA8hz9ZaJqK2MKhGyp4OL3Xy7BD3N9AJ+ci/zk3tpDmy0PIqExAMon4LRgulk/XbV+kpACPaFab78B8JxR5UbwmyssbNbimu8rvnGQ9dIkzZJJzX+SrbSAYsAlBJALoOGBhXQx2auZxESw22jc9z0vAZd3gguDa4Ast+tLUvHp944pvrQ== 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=aUwHFs/kOANQOITnej+rb4yMlD3xDnhdEORkX4bGh9E=; b=MsjBr4oSy8YggfVVvqD5WuU5A6puMlbokNCoM4MhgSiKxECZuBwRXB4G8J2sj/w3ishlA6l1iGlJrMFrNqFPXhp/BKQFPwfBXcKL//L26jLnCVjtQR0YpGPnY1S78fDWYUXKhtmixFQ6W4Pc75zDygQwJjJioqVdBWf82yV5mIg= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by SN7PR10MB7029.namprd10.prod.outlook.com (2603:10b6:806:346::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.34; Tue, 5 Dec 2023 10:49:54 +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.034; Tue, 5 Dec 2023 10:49:54 +0000 Message-ID: Date: Tue, 5 Dec 2023 10:49:49 +0000 User-Agent: Mozilla Thunderbird From: John Garry 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 Organization: Oracle Corporation In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0049.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:60::13) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|SN7PR10MB7029:EE_ X-MS-Office365-Filtering-Correlation-Id: e2f1ffe5-6b04-42b3-bb19-08dbf57fea2d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CfRYh11NyMV4zACCikr3CgbVmOzb3geUP+BOXW0+nnFk2nkXlOYoRJn8KYdsAcxBDTWnElHo6c+wbO9iNaOv/sTCVF8sFfvfaaC1aCmOMXYtABPGcdeQ8YLZ521I/vhNGKgjA27xNGUPzvKmkmaLaGstq8ihstV189I6LO5qmAtilMg5CKyfD7k8RbrKsTl5AqZVfDcGhS5MXsmRJqyj0oqSW61VrY2ulvG7fZo4K1ruV9mWpeckWA0n0xsigtfH+m/AAPesakW+UzLTW4I3JTkqAzXeHLl7/bKG33UpbKNcl2tw1rmdywvt7BMz1WBoTUmE+Fz9WzczmOklP3EeDFdAXEOGDUHXvkT0dtcXT1jlt0qGdoF4+FP/cbis2tx0+zH8p2d86A+PyJGBKb2luZNNkQhkf3qs/5VBO1FEgEtzqxc6xZo43MicB9rWftHAvaWxQs5rKz/FXBEo+QCLNlE0fwuUcpSDQXbhKonXzjoSOnPLiThDZ3GsVCObM8nWlRf4OncyLCOXnoEF1IhHyYe8oXiAXDVEIA/yuvYPEzudVs/cMb5PoZ3ieR/D2ptuE6tMmjRXEhJRgR9a95A8860iuzGSmFz6Pt78X9stEZSHnmKDv/4LbRG5wljVl0NgkCaGHXZjAQ9xnRWxnJ2ESA== 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)(39860400002)(136003)(346002)(366004)(376002)(396003)(230922051799003)(451199024)(186009)(64100799003)(1800799012)(53546011)(2616005)(41300700001)(6512007)(36756003)(86362001)(83380400001)(31696002)(26005)(6486002)(316002)(6916009)(66476007)(66946007)(66556008)(6666004)(4326008)(8676002)(8936002)(36916002)(6506007)(478600001)(31686004)(38100700002)(7416002)(2906002)(5660300002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RmtnZEQ5TzFkMTYvRm1SZmhRK0o2MVBKN1pvOEQzTXJOSUh4Y0RTRER6Vng1?= =?utf-8?B?RHNUd3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?ZXpFWTY4QUM2amJSRWxsKzRUSUt1cWw1a2t6TEVnPT0=?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e2f1ffe5-6b04-42b3-bb19-08dbf57fea2d X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2023 10:49:54.3727 (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: OiOwUs5OLHM+Y0tHSs01DxXUS4GtFUQ0VLC3gt7rZVyJh8yJCr9xPIshFFhTWZxu3pZEUJRC2yok87QCHBGPSw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR10MB7029 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-05_05,2023-12-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 adultscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312050086 X-Proofpoint-ORIG-GUID: YFRaGwbod_tIGaYt3ja9Szj-47iLa6qz X-Proofpoint-GUID: YFRaGwbod_tIGaYt3ja9Szj-47iLa6qz 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]); Tue, 05 Dec 2023 02:51:01 -0800 (PST) On 05/12/2023 01:45, Ming Lei wrote: >> Right, we do expect userspace to use a fixed block size, but we give scope >> in the API to use variable size. > Maybe it is enough to just take atomic_write_unit_min_bytes > only, and allow length to be N * atomic_write_unit_min_bytes. > > But it may violate atomic write boundary? About atomic boundary, we just don't allow a merge which will result in a write which will straddle a boundary as there are no guarantees of atomicity then. Having said this, atomic write boundary is just relevant to NVMe, so if we don't have merges there, then we could just omit this code. > >>> 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) > Can you provide actual NVMe boundary value? > > Firstly natural aligned write won't cross boundary, so boundary should > be >= write_unit_max, Correct > see blow code from patch 10/21: > > +static bool bio_straddles_atomic_write_boundary(loff_t bi_sector, > + unsigned int bi_size, > + unsigned int boundary) > +{ > + loff_t start = bi_sector << SECTOR_SHIFT; > + loff_t end = start + bi_size; > + loff_t start_mod = start % boundary; > + loff_t end_mod = end % boundary; > + > + if (end - start > boundary) > + return true; > + if ((start_mod > end_mod) && (start_mod && end_mod)) > + return true; > + > + return false; > +} > + > > Then if the WRITE size is <= boundary, the above function should return > false, right? Actually if WRITE > boundary then we must be crossing a boundary and should return true, which is what the first condition checks. However 2x naturally-aligned atomic writes could be less than atomic_write_max_bytes but still straddle if merged. > Looks like it is power_of(2) & aligned atomic_write_max_bytes? > >> - virt boundary (from NVMe) > virt boundary is applied on bv_offset and bv_len, and NVMe's virt > bounary is (4k - 1), it shouldn't be one issue in reality. On a related topic, as I understand, for NVMe we just split bios according to virt boundary for PRP, but we won't always use PRP. So is there value in not splitting bio according to PRP if SGL will actually be used? > >> And, as I mentioned elsewhere, I am still not 100% comfortable that we don't >> pay attention to regular max_sectors_kb... > max_sectors_kb should be bigger than atomic_write_max_bytes actually, > then what is your concern? My concern is that we don't enforce that, so we may issue atomic writes which exceed max_sectors_kb. If we did enforce it, then atomic_write_unit_min_bytes, atomic_write_unit_max_bytes, and atomic_write_max_bytes all need to be limited according to max_sectors_kb. Thanks, John