From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4794CC433E1 for ; Thu, 21 May 2020 14:39:09 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 16B16206F6 for ; Thu, 21 May 2020 14:39:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iHoAQ7QQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16B16206F6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6FDC611674CA0; Thu, 21 May 2020 07:35:37 -0700 (PDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=205.139.110.61; helo=us-smtp-delivery-1.mimecast.com; envelope-from=jmoyer@redhat.com; receiver= Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1A23A1003EFBE for ; Thu, 21 May 2020 07:35:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590071944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=m8VG2QgwBfpblyw8hILYr69QUKO0fYRc6Rd54EOPW8Q=; b=iHoAQ7QQbalQEBpi4JAMPkbMJtei92oTtm6m9B7JFwVKhaE7WZ/a2Dy//oRZEd9VHWfpcV hy0AkQJP239PalOOpme6dGEehiMogaMYDTO0Rvg8QKc7y/nb0cHk4gVVG420zs3ewIirfh sgXgTvCTR1+8gEJvIrxOCNSQv8TTaTQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-380-PeNqcxDYOHKsxQkwu_xzYw-1; Thu, 21 May 2020 10:39:01 -0400 X-MC-Unique: PeNqcxDYOHKsxQkwu_xzYw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6A169106B244; Thu, 21 May 2020 14:39:00 +0000 (UTC) Received: from segfault.boston.devel.redhat.com (segfault.boston.devel.redhat.com [10.19.60.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 135CC12A4D; Thu, 21 May 2020 14:38:58 +0000 (UTC) From: Jeff Moyer To: "Aneesh Kumar K.V" , Dan Williams Subject: Re: [PATCH v2 3/5] libnvdimm/nvdimm/flush: Allow architecture to override the flush barrier References: <20200513034705.172983-1-aneesh.kumar@linux.ibm.com> <20200513034705.172983-3-aneesh.kumar@linux.ibm.com> <87v9kspk3x.fsf@linux.ibm.com> <87d070f2vs.fsf@linux.ibm.com> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 Date: Thu, 21 May 2020 10:38:58 -0400 In-Reply-To: (Dan Williams's message of "Tue, 19 May 2020 11:59:30 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: JZTITTTZLFVPLJXR5ENY2JEFULVGGYBQ X-Message-ID-Hash: JZTITTTZLFVPLJXR5ENY2JEFULVGGYBQ X-MailFrom: jmoyer@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: linuxppc-dev , Michael Ellerman , linux-nvdimm , alistair@popple.id.au, mpatocka@redhat.com X-Mailman-Version: 3.1.1 Precedence: list List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Dan Williams writes: >> But I agree with your concern that if we have older kernel/applications >> that continue to use `dcbf` on future hardware we will end up >> having issues w.r.t powerfail consistency. The plan is what you outlined >> above as tighter ecosystem control. Considering we don't have a pmem >> device generally available, we get both kernel and userspace upgraded >> to use these new instructions before such a device is made available. I thought power already supported NVDIMM-N, no? So are you saying that those devices will continue to work with the existing flushing and fencing mechanisms? > Ok, I think a compile time kernel option with a runtime override > satisfies my concern. Does that work for you? The compile time option only helps when running newer kernels. I'm not sure how you would even begin to audit userspace applications (keep in mind, not every application is open source, and not every application uses pmdk). I also question the merits of forcing the administrator to make the determination of whether all applications on the system will work properly. Really, you have to rely on the vendor to tell you the platform is supported, and at that point, why put further hurdles in the way? The decision to require different instructions on ppc is unfortunate, but one I'm sure we have no control over. I don't see any merit in the kernel disallowing MAP_SYNC access on these platforms. Ideally, we'd have some way of ensuring older kernels don't work with these new platforms, but I don't think that's possible. Moving on to the patch itself--Aneesh, have you audited other persistent memory users in the kernel? For example, drivers/md/dm-writecache.c does this: static void writecache_commit_flushed(struct dm_writecache *wc, bool wait_for_ios) { if (WC_MODE_PMEM(wc)) wmb(); <========== else ssd_commit_flushed(wc, wait_for_ios); } I believe you'll need to make modifications there. Cheers, Jeff _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org