From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751550AbbKGGvP (ORCPT ); Sat, 7 Nov 2015 01:51:15 -0500 Received: from www.linutronix.de ([62.245.132.108]:34743 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750884AbbKGGvO (ORCPT ); Sat, 7 Nov 2015 01:51:14 -0500 Date: Sat, 7 Nov 2015 07:50:16 +0100 (CET) From: Thomas Gleixner To: "H. Peter Anvin" cc: Dan Williams , Ross Zwisler , Jeff Moyer , linux-nvdimm , X86 ML , Dave Chinner , "linux-kernel@vger.kernel.org" , Ingo Molnar , Jan Kara Subject: Re: [PATCH 0/2] "big hammer" for DAX msync/fsync correctness In-Reply-To: <563D4B2F.9010608@zytor.com> Message-ID: References: <1446070176-14568-1-git-send-email-ross.zwisler@linux.intel.com> <20151028225112.GA30284@linux.intel.com> <563D4B2F.9010608@zytor.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 6 Nov 2015, H. Peter Anvin wrote: > On 11/06/15 15:17, Dan Williams wrote: > >> > >> Is it really required to do that on all cpus? > > > > I believe it is, but I'll double check. > > > > It's required on all CPUs on which the DAX memory may have been dirtied. > This is similar to the way we flush TLBs. Right. And that's exactly the problem: "may have been dirtied" If DAX is used on 50% of the CPUs and the other 50% are plumming away happily in user space or run low latency RT tasks w/o ever touching it, then having an unconditional flush on ALL CPUs is just wrong because you penalize the uninvolved cores with a completely pointless SMP function call and drain their caches. Thanks, tglx