From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1947367AbcBRUOr (ORCPT ); Thu, 18 Feb 2016 15:14:47 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:35886 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946218AbcBRUOp (ORCPT ); Thu, 18 Feb 2016 15:14:45 -0500 Date: Thu, 18 Feb 2016 21:14:40 +0100 From: Ingo Molnar To: "Luck, Tony" Cc: Linus Torvalds , Linux Kernel Mailing List , Thomas Gleixner , "H. Peter Anvin" , Peter Zijlstra Subject: Re: [PATCH v11 3/4] x86, mce: Add __mcsafe_copy() Message-ID: <20160218201440.GA25570@gmail.com> References: <20160218185217.GA17174@agluck-desk.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160218185217.GA17174@agluck-desk.sc.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Luck, Tony wrote: > On Thu, Feb 18, 2016 at 10:12:42AM -0800, Linus Torvalds wrote: > > On Wed, Feb 17, 2016 at 10:20 AM, Tony Luck wrote: > > > > > > If we faulted during the copy, then 'trapnr' will say which type > > > of trap (X86_TRAP_PF or X86_TRAP_MC) and 'remain' says how many > > > bytes were not copied. > > > > So apart from the naming, a couple of questions: > > > > - I'd like to see the actual *use* case explained, not just what it does. > > First user is libnvdimm. Dan Williams already has code to use this so that > kernel code accessing persistent memory can return -EIO to a user instead of > crashing the system if the cpu runs into an uncorrected error during the copy. Are these the memcpy_*_pmem() calls in drivers/nvdimm/pmem.c? Is there any actual patch to look at? Thanks, Ingo