Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2585056rdb; Mon, 4 Dec 2023 01:27:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IG+MnELdI9bdYD9RqeyDYCK9f0XOOfD4LqAkqKhI+HCQCN1QVgXB10Kv5NYi83JALOc9FSg X-Received: by 2002:a05:6a20:8f1d:b0:18c:ae67:c1e8 with SMTP id b29-20020a056a208f1d00b0018cae67c1e8mr5034377pzk.24.1701682075605; Mon, 04 Dec 2023 01:27:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701682075; cv=pass; d=google.com; s=arc-20160816; b=EKBdVRV4CEBSCfJGmrOSHx9nRd/oj+neCXxWLwxnrWOn2qVIhbqbpxPpZQhkhqkB+3 VzdR9EHE3ztikgsdBKY6k37cvdfHINP9qf3COJONjiVWs/cNL6GJ21abkEmQQBStXZNZ pGF4e4bK+eP84EznwM7J8CkdaDfPFF5DqcmN/PJlMKu8OwRoFCE6rVShgEanBhbw7dW4 NOXKxB5+gP5fvAym33PAaf78RNHaaZA/4m3981uFnYVJBMkKG8X/aSt12CNU7AA7XUfR 3yVSHuaE5Ff8MWdvzcZiFZOnfzgSdCI6KeHiiE/RqIgLEQ/EsAOjTwf53s8LEzxevXTU Cmpg== 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:references:cc:to:content-language :subject:user-agent:date:message-id:dkim-signature:dkim-signature; bh=mHOSP91UGlrDyTekPdpCVZ0JFoRE6i1/0MxMuFLxR5Q=; fh=eohSbp/eZpkB4uCsoX1G934MJ07KRQXmNjJ4fX0rTK8=; b=qSKgwYOUd3Sz/ycSYNH56FFr9Rbf/AfNIXZLmcJroboXB1BfLCZs5yC47WQMUHkMqV T83sEk3Jb1mfDKH+WiNydh0E1vNm6obJ4a7yVZL627QOEBFWpZIHji8rHyphpR6ce9vv gDFAbO06LiyUEke9QznMrS1bbam2TjGBYjjDNuu31kRX8scPWZA58cCD1SufLOzaEtIn vRuM4GZfy6N/+/xB1u55/bbVdJo1mOSfnI8hnt85i1sXRTVrb06+KXwsyEGPWwnzCNtF S+kaVjKWHOhHi/x7pvGV2OTkv38BTYJWq6OEgJSlVFKaZhB9G/3ZxOzOjG39s6O0TFRx NNEw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=FkYIMgNK; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=JFDn1qtf; 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 h130-20020a636c88000000b005c66a7d710bsi2995993pgc.459.2023.12.04.01.27.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 01:27:55 -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=FkYIMgNK; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=JFDn1qtf; 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 C98668057E18; Mon, 4 Dec 2023 01:27:52 -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 S229576AbjLDJ1e (ORCPT + 99 others); Mon, 4 Dec 2023 04:27:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbjLDJ1c (ORCPT ); Mon, 4 Dec 2023 04:27:32 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2381FCD; Mon, 4 Dec 2023 01:27:39 -0800 (PST) Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B49HTHx023343; Mon, 4 Dec 2023 09:27:09 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=mHOSP91UGlrDyTekPdpCVZ0JFoRE6i1/0MxMuFLxR5Q=; b=FkYIMgNKfOulFFjo023MIWo5TjuqPjV0H+M3HvfEVHeERoaou+j6bUW20R4Kq6uDPwt5 ptlL6NKNiYYh+MyVrgiZt+7ntWFEZM3d7NzBqM1WJEtsGd2BQchlMoPBs/Rr2xKS2bY9 vCose2er6j+TvOHv3nOpMUUyjZTqAhB+AyGNVUrBNPvV4g5+pNxQQVDUpaeTR4FwoF64 XXMEFPs8hAg8P/pozo38KI+dTy/oqE5+p5ad+iU3ulFbRJdrO757K6jwbbPJujRztbhA iQ0q5eZbBayCSrfnODR5dYxoHYvWIYVAbWQUmtFZ1Eya2hvNlV9yiY/kY3M6fW+4PVRH kw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3usc0h80qh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 Dec 2023 09:27:09 +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 3B47rX8o005997; Mon, 4 Dec 2023 09:27:08 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2040.outbound.protection.outlook.com [104.47.51.40]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3uqu15a1d5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 Dec 2023 09:27:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MmSvJ/NN6QDO16q5jc+9V0uaztZB4xSKtAi82G/4fxBbVf5/LItnUKb+AXOquMZ8+2vCSyBVjaodJPnarUF0zrR1ghCQjAVOgcyRKDvBt2gNP9uyPSDapjA9ENRXvRU7eLGTgIghC2hSsuesI0YrvD1JzRfK0MU1NIhz8FdNFepVyMZxBxzYu9EImMTOlYEu1RYKuFKRxCfj/+CsFfksKau13D7eSQWw7LRsTCLZqfZHLNfDjIb9QE0keQYvM0GACpE1xPRkhDcW4NxGYKm9N9uj5YXJ5zbmf7F3L08Sik/Uj57gL4jMTh/HnAgP6tQIe+5hct1r42Ouai0LBpKdTg== 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=mHOSP91UGlrDyTekPdpCVZ0JFoRE6i1/0MxMuFLxR5Q=; b=TokWqO1uQvJqqtoCM0UMxDFDYg32Rps8zKiY8aEfY8GZvz4on3Wp3bIRLY3/wgvJt9wYobsWFYN+FKB/+sPigTT5zTPrS9Tqjrs3lbhRhGJy9kpZPGiVjurKBA6YJT06+hxNZAZtX1ALdkNZdlMYcz0GcPTEbrHbsL3A/86AFWPpL4jPS2jE9kPGeGmHDSgs6+J+R4Z5JARpulU7qd0rb/0OZaXjozL0Xp3ryMhJXgkMxwe3OMEnOTnM9vlhG7Gg+1A51dJUCQqdr+6dHKlZPxcmIYkxumGqRV7xUtyhURYYesz60A98zmyx/IReqSPZ+uF3xlWRjv2wdED20W5yCA== 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=mHOSP91UGlrDyTekPdpCVZ0JFoRE6i1/0MxMuFLxR5Q=; b=JFDn1qtfN+1LTrNSCWeXgjV80hnlQS4HULhlDa3iw9dOFW8qQx6IXabwzBQXutEhR98slB1pK9082gCooAguV3Wi3KNE9sTJjhXqnbOgoRwjs1B/AQJ4vlGJQ+8sJdqAtbNo9uniVMvod/TNasGzLbmY50wG8G+Yico8HV67eAA= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by SA2PR10MB4521.namprd10.prod.outlook.com (2603:10b6:806:117::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 09:27:05 +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 09:27:05 +0000 Message-ID: <03a87103-0721-412c-92f5-9fd605dc0c74@oracle.com> Date: Mon, 4 Dec 2023 09:27:00 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 10/21] block: Add fops atomic write support Content-Language: en-US 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> From: John Garry Organization: Oracle Corporation In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0265.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a1::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_|SA2PR10MB4521:EE_ X-MS-Office365-Filtering-Correlation-Id: e17f6d68-81aa-411d-0969-08dbf4ab2e3a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mENNQiMjcBWLqAkWq0JODPGZ2ZuWIu41DTAJXmCRtKCTu55rpmCvLq3Q8Sz+DzY3xcp81HAphuyGFAlpSUDd+5H/lISrLz5XUB0+DIWmg66VXqdZaNhjFjR+Lf1a8cnfsyUTFiLWu1b33T1sekqJ6nAIrQDvFrfRbIkk6bK+AwF/Uqe6bjTkKQs3uhxW6zUjoiVacYZbYY1ecAGI/UG22phL5vhg+RP4//NMQDNc9nGgYnPcSfdLPGcDB+1iaW0p4jfvQR86k1ujP6ThooXLNPpe0nRZl4UvACJenkVVqedckarUaV0O5yXeGbTHR4/x0ijACSHh27xXqTcsWJbYtyIX4fC4OKLSzNmoJgjZCC3KT0k2Gzvh8KR/Q5rIR4lndc0uZaXHVwCD+GHppLlObc0QxRsVG4UaFLWdvfdIt+vuc5X0WRVfm+sAcAPrE/cos0YKYe7tX05sdaRMzHluXQqIhCIKh2bYmq0F/ITjCNADRj0TV8DOOFV5uwMPRfn4sSj3s3vyb6cV/bBJHHeAGAAyKBD/KROtlZrX39Iit82XLwk567YrDfReFfgPoUA+Gm3N/Agj7AReWSxzXsc4lZaYrskp2sPaBZsAZYhrrVv6BqhdHlNznG/lnzTNmJxrm6ob185HXHfFndyqS1X26A== 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)(396003)(136003)(376002)(366004)(346002)(230922051799003)(186009)(64100799003)(451199024)(1800799012)(66556008)(66476007)(66946007)(316002)(6916009)(478600001)(6486002)(6666004)(7416002)(5660300002)(41300700001)(36756003)(38100700002)(2906002)(31696002)(86362001)(4326008)(8676002)(8936002)(31686004)(2616005)(83380400001)(26005)(6512007)(53546011)(36916002)(6506007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bVpIbVkrY1pQSmxhZGlRRUszbWdUbkMwRFc2U0dPRU5BOVdSY3huVWlkcW1n?= =?utf-8?B?akZxVk1FZGt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f-8?B?NFV3N1BtemxpRnBra244aXRWMkhWdGpSOCtIQlBRPT0=?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e17f6d68-81aa-411d-0969-08dbf4ab2e3a X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2023 09:27:05.7153 (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: OQGsHtfjfmijZRYE5SSNDzqBb1Wu+X5PsetSp78c6FkGeQY7wy9j29t9JDRCUe1DfHM/5Yko1WdtBb6UrmhD4w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4521 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_06,2023-11-30_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-2312040071 X-Proofpoint-GUID: lq9WZejnx554_9JE7ZNA1YXnizVtAzIZ X-Proofpoint-ORIG-GUID: lq9WZejnx554_9JE7ZNA1YXnizVtAzIZ 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 01:27:53 -0800 (PST) On 04/12/2023 02:30, Ming Lei wrote: Hi Ming, >> +static bool blkdev_atomic_write_valid(struct block_device *bdev, loff_t pos, >> + struct iov_iter *iter) >> +{ >> + unsigned int atomic_write_unit_min_bytes = >> + queue_atomic_write_unit_min_bytes(bdev_get_queue(bdev)); >> + unsigned int atomic_write_unit_max_bytes = >> + queue_atomic_write_unit_max_bytes(bdev_get_queue(bdev)); >> + >> + if (!atomic_write_unit_min_bytes) >> + return false; > The above check should have be moved to limit setting code path. Sorry, I didn't fully understand your point. 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? > >> + 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) > > 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. Thanks, John