Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp583002pxk; Wed, 16 Sep 2020 11:22:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzoCNKlXHbjr4SUb8JOXQrXIe2gghvqRnpZ08WQCZ2C2x5nAHgxI0sJ2SUnVhok1ldkdbHh X-Received: by 2002:a17:906:24d6:: with SMTP id f22mr26204978ejb.85.1600280579722; Wed, 16 Sep 2020 11:22:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600280579; cv=none; d=google.com; s=arc-20160816; b=UoACj48cMRKbmo6UQyCmMRviQKqX+6UwVt6x0Ktw9C2XaYrkAdXUZdlGHV1eQ0F/o9 l3P8kJUS1ffPDGLZmNWlQJm3GNOOybp6s8Sus//cS28bHVP9SMqtP6+LG6fxGM7M5Lyu vTq5QaUQb1W0xmpddeVSwuZF5J6kwJMKGOKD04eU1Ddyn6Vl0blhAm6GcWif550psHpA hPP/m3s9/3Mrr1pwY2AZJqeaoiPZBlcKeEJ3R3Lo8EkfHlYDc7g+RXM0C2+W5HPSRfpk 2BRcbrs4Yx9QebCuYE4e33YzlxoQW+Pch10bLNuITMt/3XLqZjq8Nqsew43Xgy6w/ThF TiSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=yFYB36o5sQGOopQLIZ3LmVh5DVkQCsLHuBBKUkF022U=; b=Q9dr/+Rp2YeF9M9CaecRi3ofxdRUxTxXZOxUcc7jO7ybL3EgQYLixZDP5Mf4r6AjCS dulX8GiAPBHI1+2trgOmxLCUpWU4Bj9Fl/mGPMH+MS3kewipmN2tJHMl1DpUE1v/Xsx5 +yW0liB3Dk3kY9pdepW8w9HCC3nMN1TqmYrPHFkkj+RUSMIGvN8KXeGaQZtGIlHzTFp+ 3CehlHaMnFDf1mu3Lc9+HorCrj1IGFW85uEaohhGFPQp0LDMncn0s389yY9Xc0B9DeOY XEVu8RZv286oLzeK8pDyfwKkKUNRAlRWzroLeJDglNhGCtTritBRILMCYDTJAWBA/rzJ NInw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=gfng9FWV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r25si12429738edo.12.2020.09.16.11.22.37; Wed, 16 Sep 2020 11:22:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=gfng9FWV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727901AbgIPSUA (ORCPT + 99 others); Wed, 16 Sep 2020 14:20:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727896AbgIPSRx (ORCPT ); Wed, 16 Sep 2020 14:17:53 -0400 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDF06C0698DE for ; Wed, 16 Sep 2020 09:21:14 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id i1so6919866edv.2 for ; Wed, 16 Sep 2020 09:21:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yFYB36o5sQGOopQLIZ3LmVh5DVkQCsLHuBBKUkF022U=; b=gfng9FWV0J0yb5BbFoXNVi6dZSBG/a54FXDC6xO+b/rTexcJnOWoPzO2/a311RfdwU DndBlAsVoWq4m+KQxFxruPUXfOu/H/4aLqR+oqmcepZCVdQTeqAY9wXyPg1oxjdISGWz gxKXAXmkYpxOqulD0ZtwHmI63UlmamOH+5KeY8Ewl5owECC7J4+/0xTe9BKFYWPLvR/G Gh4/swNnN+GowPmGP9+0t9WAvKqz9INT9J7grCQpb5LVfUk+xEjovR4QWxt/hEKBc/Ne MM/a/bzu/8Q2+EooAIv4i8PFQEts7EHmlv/ZDeS4LScQoEdZ9rnfCtw53Dx3UPFL411n 3B7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yFYB36o5sQGOopQLIZ3LmVh5DVkQCsLHuBBKUkF022U=; b=r9IHDvygdilEGw+eUJYR9/ZswrMwP9ny6Cf17+w74fjCQhg3NOiFZYKtHq+5URnXG9 N9nHzVU67KCAApJDWuTl87hVD6CElIaTWa93E7ZG9KQgYlNPIRKPDqhFcgFsR0c9gZOz 81ExcMYjK4GH7ZCxyFUmcbn2GAkflpoxvBgX41hizSHQHCdaH1nfzSJVIsZhLRLWMuxF 7ULZuKUpfwdc8TlMctMUWPPR9zaWs08djcVi8hU6X6Dyc/vE2Fe3kI6+Kvvgm2LJ5ogY XfuoiwZwhhq2xKyGNVSs3k9hZWblprTuJLVn61h+09nTjfi+RFyVuJU3CBdTylum8bNi gDkA== X-Gm-Message-State: AOAM533IwSEiBZpyDcYnvYFYGp9eHC7AD/WprciwISAhAO73lFNVuxjl RVNmVR+Qq6zJNpx8RszOtlNcyzwDNm4HRLwSbDhvTc3EIR4= X-Received: by 2002:aa7:d04d:: with SMTP id n13mr29447035edo.354.1600273273498; Wed, 16 Sep 2020 09:21:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dan Williams Date: Wed, 16 Sep 2020 09:21:02 -0700 Message-ID: Subject: Re: [PATCH] pmem: export the symbols __copy_user_flushcache and __copy_from_user_flushcache To: Mikulas Patocka Cc: Linus Torvalds , Alexander Viro , Andrew Morton , Vishal Verma , Dave Jiang , Ira Weiny , Matthew Wilcox , Jan Kara , Eric Sandeen , Dave Chinner , "Kani, Toshi" , "Norton, Scott J" , "Tadakamadla, Rajesh (DCIG/CDI/HPS Perf)" , Linux Kernel Mailing List , linux-fsdevel , linux-nvdimm Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 16, 2020 at 3:57 AM Mikulas Patocka wrote: > > > > On Tue, 15 Sep 2020, Mikulas Patocka wrote: > > > > > > > On Tue, 15 Sep 2020, Mikulas Patocka wrote: > > > > > > > - __copy_from_user_inatomic_nocache doesn't flush cache for leading and > > > > > trailing bytes. > > > > > > > > You want copy_user_flushcache(). See how fs/dax.c arranges for > > > > dax_copy_from_iter() to route to pmem_copy_from_iter(). > > > > > > Is it something new for the kernel 5.10? I see only __copy_user_flushcache > > > that is implemented just for x86 and arm64. > > > > > > There is __copy_from_user_flushcache implemented for x86, arm64 and power. > > > It is used in lib/iov_iter.c under > > > #ifdef CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE - so should I use this? Yes, but maybe not directly. > > > > > > Mikulas > > > > ... and __copy_user_flushcache is not exported for modules. So, I am stuck > > with __copy_from_user_inatomic_nocache. > > > > Mikulas > > I'm submitting this patch that adds the required exports (so that we could > use __copy_from_user_flushcache on x86, arm64 and powerpc). Please, queue > it for the next merge window. Why? This should go with the first user, and it's not clear that it needs to be relative to the current dax_operations export scheme. My first question about nvfs is how it compares to a daxfs with executables and other binaries configured to use page cache with the new per-file dax facility?