Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp918414lqa; Sun, 28 Apr 2024 09:44:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXZd7RDDFzPtkIRqtQIsQA0OxTpJKlMjALHOhoNJfJmKEVteg8M/LC2+jgJIXl3UPz4nJrGiN10CYqdUNbDIUF9efg6JiWECjQ/y0o3xQ== X-Google-Smtp-Source: AGHT+IGsZg7o4/HppmjnCxJEXW0T97ao2OYP0E8vyU8rNZKbPKznKtZqPfO7tS10JvGlfJaag45p X-Received: by 2002:a17:903:2302:b0:1eb:1fdc:25e7 with SMTP id d2-20020a170903230200b001eb1fdc25e7mr8846677plh.19.1714322675772; Sun, 28 Apr 2024 09:44:35 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id i18-20020a170902cf1200b001eb66b69306si2515734plg.627.2024.04.28.09.44.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Apr 2024 09:44:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-161503-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@memverge.com header.s=selector2 header.b=buw+nbXj; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-161503-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161503-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=memverge.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 5E4B6B21348 for ; Sun, 28 Apr 2024 16:44:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4941A71B52; Sun, 28 Apr 2024 16:44:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=memverge.com header.i=@memverge.com header.b="buw+nbXj" Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2117.outbound.protection.outlook.com [40.107.220.117]) (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 356AE71B20; Sun, 28 Apr 2024 16:44:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.117 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714322658; cv=fail; b=kgr1QzSzqjmv8hlEGpMciP3SK9Rxg90YI/CyZuyfIWvp4I+brROTdWIhmkecuYEsDdd0b27GJVDGiKq2WnMhc5pax2w03bJZjbw2TgQsZDCEQ4/y16ouaK7YbTNp50++MLaAC2aw6H1fLLkKwBAv6F/+lRJxHiodwZ35zF2nAEc= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714322658; c=relaxed/simple; bh=VAmuUlIrBdi8G7K2UeBcfPEWZxfD4CVzsywEYubqRQU=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=aE0Iz363Rou/+rHM1xH8tti6OG46kl/FIyZVrxwc+txZqxyilojBBeABgqm2RJfO3OgfWM2mWnRw01IPO6xOee5htkoQmJJliVJJGGz90QDGfoFY6+0m5lfKLIplbJPd9o7vfsdyMOXtlUVCJtR2pfUIbxMCrrOE+oH7PncykXA= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=memverge.com; spf=pass smtp.mailfrom=memverge.com; dkim=pass (1024-bit key) header.d=memverge.com header.i=@memverge.com header.b=buw+nbXj; arc=fail smtp.client-ip=40.107.220.117 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=memverge.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=memverge.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RwDlcFBH7LWMuid1mfyCCuNgxudaP2jHIvaKt8TJork3sxJz/5GlLyhxRRD+OtO/X/AMGHiKCeamsKvDFYSRWT/Rz9gTkUviSRbIcaNpDqXvL0zNTeieubbYd5xOZt6kn86JM7aLJuGe1MuiZsusTeMWt+PyAksh64XAIlq5rNkR7B/HlAyp0SGHxmBAEbBO1L5Cg2t73A1dKH9qcgut2pKiQgAsZiO2bA7ezm4lf1OwSOtlekErQ2tm3wtLHMm5UP7xo4qP+n4TRRZ66gYmqoig1qzeyJRPrC67/V0/Z4YuGIoopXf9v4yhLyh56Q5/Z61mzpcA43z7Bb3Ka2CoZg== 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=qpk8Sa54oYq+3APMMD2K9xPQrHgMvHfXQTWa6LfBsEs=; b=UqM6fPjKT9Nzfbsdad0mKdjo5fG8YNuZBcvg2po/+xpiZ78EYGP2CJ4JNqY3zUoBr7HvIFaF5Xadklp1gzBm/KqdbtIaGWcGj7NdIyFGubX3WZBHZ5HqFgU/eo3QdN9RTWp5MsXC3dZpcxbbN1QucqgB+t0mWD93deUXQsu8DUBqEzdDzNcHYZ7eX6zCYjIWzTLJHKPUk7gyq+q1e0Yk6CcmVRaCcb97xhMxr1vNhWezkdVDk36MtEZA/RGckDkqeLhzraCazPcUOosX+2CsHs9htxkOvh4FIWuZuwbGodVaC4iyhWNm2y3+WQVMhAP0NiCInIOEsrDXvDQfqDv/iQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=memverge.com; dmarc=pass action=none header.from=memverge.com; dkim=pass header.d=memverge.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=memverge.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qpk8Sa54oYq+3APMMD2K9xPQrHgMvHfXQTWa6LfBsEs=; b=buw+nbXjb4Y+Fmh9YW3CckooyId/3Mg7Wb9ZXsXYCZ4/DfyswJg5JjGqCzbgdwrPQX8lHwAhHikmffBnEwgr2MMI+QtbCHWMYzegF1zZuTkv4XP6r535w6rtlULUh7wVCClsgLlA0ez1d12iR+65zsaDxvnU0LCNOI6ldwJZ+B0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=memverge.com; Received: from SJ0PR17MB5512.namprd17.prod.outlook.com (2603:10b6:a03:394::19) by DS0PR17MB6031.namprd17.prod.outlook.com (2603:10b6:8:cd::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.32; Sun, 28 Apr 2024 16:44:11 +0000 Received: from SJ0PR17MB5512.namprd17.prod.outlook.com ([fe80::5d53:b947:4cab:2cc8]) by SJ0PR17MB5512.namprd17.prod.outlook.com ([fe80::5d53:b947:4cab:2cc8%4]) with mapi id 15.20.7519.031; Sun, 28 Apr 2024 16:44:11 +0000 Date: Sun, 28 Apr 2024 12:44:07 -0400 From: Gregory Price To: Dongsheng Yang Cc: Dan Williams , John Groves , axboe@kernel.dk, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev Subject: Re: [PATCH RFC 0/7] block: Introduce CBD (CXL Block Device) Message-ID: References: <20240422071606.52637-1-dongsheng.yang@easystack.cn> <66288ac38b770_a96f294c6@dwillia2-mobl3.amr.corp.intel.com.notmuch> <98ae27ff-b01a-761d-c1c6-39911a000268@easystack.cn> <8f373165-dd2b-906f-96da-41be9f27c208@easystack.cn> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8f373165-dd2b-906f-96da-41be9f27c208@easystack.cn> X-ClientProxiedBy: BYAPR06CA0027.namprd06.prod.outlook.com (2603:10b6:a03:d4::40) To SJ0PR17MB5512.namprd17.prod.outlook.com (2603:10b6:a03:394::19) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR17MB5512:EE_|DS0PR17MB6031:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d3d63a2-fcb5-42de-831a-08dc67a26e17 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|366007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?enpoTXc4NmsrZmJvclNlekxadXBzNWZpTE1laEY1M2RsZ2ZVMmlXZjRhcENT?= =?utf-8?B?eTZUQTVWRG44N0p5eFZaMkllTGtGNE1FTDVvNi9YYUFXN01LbVV1QzA1OU9Y?= =?utf-8?B?TnpBcW9Kb2ZHb2VZNEcyOUhxK096V3ZhcHlxaGozbS9WSmdhdWxucmM3dytY?= =?utf-8?B?cE1jZ3NtSzBsWXZUSi9DZjdHTHh1VE5VZmlXb2VqQk1iWGRTZUJ2aVVhVE5r?= =?utf-8?B?cEZrckNYQ3VhOGg2ZDc5U1ROQ2h0ZUl0YUJBR2ZjNGMrVHdGUHlrUzd3cWNu?= =?utf-8?B?Y0VvVmJKMkNGdkhmVEZReHRkbDE5bjNEVTJqemRKNHBaVkd4SVVlOFZVTVpy?= =?utf-8?B?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=?utf-8?B?QVMya1VFTFhpVVIrZWdwWlBwbHkreFRCOXBEYmZld1BRblI4SzZOWlhBbzVK?= =?utf-8?B?ZHVaSmNhSnBJZTdDd1Y1U3hEWmRVYnVOYXdlNEkzdjlIZi9RNDMvWFp2ajBa?= =?utf-8?B?WkpUdkluYnVNRVhkclUwMy95T2tDVkRjR05kaksyTnA5WmhvVnkvaFNDZExI?= =?utf-8?B?ZzJaazlsVk1wV25rS0Q3S2xKSEtKeUUxc3dpK0F4dUpsUzIzQTd3OFVmSk5k?= =?utf-8?B?anA0Qi9jK0QvSW5KT2VqaWNrRDR5RjYyaWVnVU43YkFWbnVvT2hPdHU5OUIy?= =?utf-8?B?N2tvYUlzN3F6UUJCWjU3M0t4aDBKSGlGVW9YWExUeFByKzgvckZsNmM1c0JH?= =?utf-8?B?TWNpTW56NUdmWnFubVFrM1p2TGRVUEV2S3JEV3NDcEowbW9FTjlvZHl0a1M3?= =?utf-8?B?dnhnNUZoTTNDZEhXTVI5ekhwbVB4QjhHRWhVcTVuLzlJZHAwWkpkbVNnPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR17MB5512.namprd17.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MFRwVDlMQ3VBWFdsbkNrZFNQM282aWhwdSszdjNOSmNXQ2ZxZnRoSGtKZytE?= =?utf-8?B?MHpIMkZNRHhvVWNqNEVudTZJcnNOVUFDQzFDMHF0VjFScU1sQUw3NmtIcy9m?= =?utf-8?B?dEdibTI5Wkk2UEFvejlVWC9QdkNPZ0dNSjg5N2hXdGVXK0c4NW81Z3BCeGNS?= =?utf-8?B?bk8rK3RrVWRVWjlsZHhrL3JIZUdFeGpWYlJSOWhXc3BuOGdxSF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Vkc0blVCaGNXbzZ2a2F1amFjM1hFY1ZwOFNvcGFCZTZGMlpPeXVC?= =?utf-8?B?RU03d2Z4NlRKYXdhbmZka1EyYk9rYmhEcStlT0JMeFhRL002U29YcGJ6U0c2?= =?utf-8?B?bG1IODJGcWoxdnpMWTM1dGpzdXdFaVBKakd5YzBvRnRXc0cyejJ6OXN0SktF?= =?utf-8?B?dlE9PQ==?= X-OriginatorOrg: memverge.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d3d63a2-fcb5-42de-831a-08dc67a26e17 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR17MB5512.namprd17.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2024 16:44:11.0807 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5c90cb59-37e7-4c81-9c07-00473d5fb682 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Jp5yIqAJklO9tU1Suq5YHIyW436qpeLXq4pFABMfvYl9MEnvLwzI7BH8774t+qP66WtUfPuKDOLt1j1lQcu3SPs30XAoNsIwDgIbqHp3N6o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR17MB6031 On Sun, Apr 28, 2024 at 01:47:29PM +0800, Dongsheng Yang wrote: > > > 在 2024/4/27 星期六 上午 12:14, Gregory Price 写道: > > On Fri, Apr 26, 2024 at 10:53:43PM +0800, Dongsheng Yang wrote: > > > > > > > > > 在 2024/4/26 星期五 下午 9:48, Gregory Price 写道: > > > > > > > > > > In (5) of the cover letter, I mentioned that cbd addresses cache coherence > > > at the software level: > > > > > > (5) How do blkdev and backend interact through the channel? > > > a) For reader side, before reading the data, if the data in this channel > > > may be modified by the other party, then I need to flush the cache before > > > reading to ensure that I get the latest data. For example, the blkdev needs > > > to flush the cache before obtaining compr_head because compr_head will be > > > updated by the backend handler. > > > b) For writter side, if the written information will be read by others, > > > then after writing, I need to flush the cache to let the other party see it > > > immediately. For example, after blkdev submits cbd_se, it needs to update > > > cmd_head to let the handler have a new cbd_se. Therefore, after updating > > > cmd_head, I need to flush the cache to let the backend see it. > > > > > > > Flushing the cache is insufficient. All that cache flushing guarantees > > is that the memory has left the writer's CPU cache. There are potentially > > many write buffers between the CPU and the actual backing media that the > > CPU has no visibility of and cannot pierce through to force a full > > guaranteed flush back to the media. > > > > for example: > > > > memcpy(some_cacheline, data, 64); > > mfence(); > > > > Will not guarantee that after mfence() completes that the remote host > > will have visibility of the data. mfence() does not guarantee a full > > flush back down to the device, it only guarantees it has been pushed out > > of the CPU's cache. > > > > similarly: > > > > memcpy(some_cacheline, data, 64); > > mfence(); > > memcpy(some_other_cacheline, data, 64); > > mfence() > > just a derp here, meant to add an explicit clflush(some_cacheline) between the copy and the mfence. But the result is the same. > > Will not guarantee that some_cacheline reaches the backing media prior > > to some_other_cacheline, as there is no guarantee of write-ordering in > > CXL controllers (with the exception of writes to the same cacheline). > > > > So this statement: > > > > > I need to flush the cache to let the other party see it immediately. > > > > Is misleading. They will not see is "immediately", they will see it > > "eventually at some completely unknowable time in the future". > > This is indeed one of the issues I wanted to discuss at the RFC stage. Thank > you for pointing it out. > > In my opinion, using "nvdimm_flush" might be one way to address this issue, > but it seems to flush the entire nd_region, which might be too heavy. > Moreover, it only applies to non-volatile memory. > The problem is that the coherence domain really ends at the root complex, and from the perspective of any one host the data is coherent. Flushing only guarantees it gets pushed out from that domain, but does not guarantee anything south of it. Flushing semantics that don't puncture through the root complex won't help > > This should be a general problem for cxl shared memory. In theory, FAMFS > should also encounter this issue. > > Gregory, John, and Dan, Any suggestion about it? > > Thanx a lot > > > > ~Gregory > >