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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 8AF8FC43461 for ; Wed, 16 Sep 2020 16:21:19 +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 E5019206B7 for ; Wed, 16 Sep 2020 16:21:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel-com.20150623.gappssmtp.com header.i=@intel-com.20150623.gappssmtp.com header.b="gfng9FWV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E5019206B7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.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 6EC24143418D0; Wed, 16 Sep 2020 09:21:18 -0700 (PDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::543; helo=mail-ed1-x543.google.com; envelope-from=dan.j.williams@intel.com; receiver= Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 84E9C13FE81B8 for ; Wed, 16 Sep 2020 09:21:15 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id w1so6907872edr.3 for ; Wed, 16 Sep 2020 09:21:15 -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=hXsztMZ8VsGmE5s+T6n09vTfW4U0EbmO5vwkvyFyW48WrvlGeLFpas/Xs844WC6tk1 UTwElil4ML+y31sPTpOvh7XYGsmxHWn/RpFmJiTjzkuisTnuxsVBTsBH1JwCnoqIeFRi BaHeHJZcG4pHxfFlgAl/BYKqdubVCIue0XycUbk4MKzbHs+QCN6HH9Dmt9CoKXZNYeYV pxmJ6bpTJsG/syvsWy0r63kkGy7i4KLrHoe0mhuUR+DYEGzUuWPR9ekhdYh3/DKPUMRr HiPIvJhdpk1p3k2nIqpweym5Hi2Hc9EICG8fh5NMSNLwJo462f9JnrbAApsgni8qxPmV 7hyQ== X-Gm-Message-State: AOAM531WWV227T2h9j+mW5d27gBmsyTmrWJxPe8udXSygswDiqTDoKgT PR/r6JWgbkj8CvScAStTF3RZ8nznzKK1QkhyJRw5KQ== X-Google-Smtp-Source: ABdhPJwI88G6wJzJR/w0a81ppKmua0R7ZF2T841uxc4i05zvl4D9vTqu2QlDOKyf+whND4urfI7hRks/8DB+WSLHUoA= 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 Message-ID-Hash: ZYXR272VH535Y4P4WKQXDAWPLARD4RDD X-Message-ID-Hash: ZYXR272VH535Y4P4WKQXDAWPLARD4RDD X-MailFrom: dan.j.williams@intel.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: Linus Torvalds , Alexander Viro , Andrew Morton , Matthew Wilcox , Jan Kara , Eric Sandeen , Dave Chinner , "Tadakamadla, Rajesh (DCIG/CDI/HPS Perf)" , Linux Kernel Mailing List , linux-fsdevel , linux-nvdimm 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 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? _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org 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=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 E107DC43461 for ; Wed, 16 Sep 2020 18:20:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 833E921655 for ; Wed, 16 Sep 2020 18:20:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=intel-com.20150623.gappssmtp.com header.i=@intel-com.20150623.gappssmtp.com header.b="gfng9FWV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727849AbgIPSUK (ORCPT ); Wed, 16 Sep 2020 14:20:10 -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-Google-Smtp-Source: ABdhPJwI88G6wJzJR/w0a81ppKmua0R7ZF2T841uxc4i05zvl4D9vTqu2QlDOKyf+whND4urfI7hRks/8DB+WSLHUoA= 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?