From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753071AbcBATvn (ORCPT ); Mon, 1 Feb 2016 14:51:43 -0500 Received: from g4t3425.houston.hp.com ([15.201.208.53]:36080 "EHLO g4t3425.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751289AbcBATvl (ORCPT ); Mon, 1 Feb 2016 14:51:41 -0500 Message-ID: <1454356235.7165.5.camel@hpe.com> Subject: Re: [PATCH 0/2] Fix BTT data corruptions after crash From: Toshi Kani To: Dan Williams Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Borislav Petkov , Ross Zwisler , Vishal L Verma , micah.parrish@hpe.com, brian.boylston@hpe.com, X86 ML , "linux-nvdimm@lists.01.org" , "linux-kernel@vger.kernel.org" Date: Mon, 01 Feb 2016 12:50:35 -0700 In-Reply-To: References: <1454004770-6318-1-git-send-email-toshi.kani@hpe.com> <1454013825.2576.31.camel@hpe.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5 (3.16.5-3.fc22) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2016-01-30 at 09:44 -0800, Dan Williams wrote: > On Thu, Jan 28, 2016 at 12:43 PM, Toshi Kani wrote: > > On Thu, 2016-01-28 at 12:12 -0800, Dan Williams wrote: > [..] > > > I'm wondering if we should just document that this routine does not > > > support unaligned transfers? Maybe backed by a debug mode that does > > > the alignment check. > > > > Yes, I agree. For this debug mode, do you have something in mind? Or > > should we add a new CONFIG option like CONFIG_PMEM_DEBUG? > > > > I hesitated to say yes to this since some simple alignment checks > seems like a thin reason to add a new Kconfig symbol. However, one > way we can test that memcpy_to_pmem() properly bypasses the cache is > to invalidate the cache contents that it touches. This would have > caught this bug without needing to do a power cycle test. In > otherwords in debug mode run an 'invd' loop after the copy. That sounds like a good idea to try out. Since this approach no longer depends on patch 1/2, I will separate this change from patch 1/2. Thanks, -Toshi