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=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 32043C2BA83 for ; Fri, 7 Feb 2020 17:06:48 +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 0846421741 for ; Fri, 7 Feb 2020 17:06:47 +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="xOuwqNiX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0846421741 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 2928110FC3586; Fri, 7 Feb 2020 09:10:05 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::241; helo=mail-oi1-x241.google.com; envelope-from=dan.j.williams@intel.com; receiver= Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) (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 3F71C10FC3584 for ; Fri, 7 Feb 2020 09:10:02 -0800 (PST) Received: by mail-oi1-x241.google.com with SMTP id p125so2623481oif.10 for ; Fri, 07 Feb 2020 09:06:44 -0800 (PST) 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=zeTa1kMSEl3fLJZjvubhBF7lLU+TSysbdNVa6LXQMGs=; b=xOuwqNiXcHB10xcosisChgV9ONSo/c2Qus/rR544MZlBpD5Ay7hfJC9WVKAzaAd+7f U/ogZnw+r/oWo8eLbbH1uz2FRsW4ncL3QQaYOXB5tMGUNUgy9QHudVLVGzSGf8tXQiLG G6FWY4st3CWg8CfeGHSGW+U0i4wcqLAm7c9T7Azgx+NnGbBA+0LfgBRgJ8ftSQl4fhml Ib9zZx/YscmftDwtkfPV4UTOHlsHGOZr/rD9r64BmBjyAr0bHE9Q0BvufvvHXSJLVzc9 NuNjDbXAE4Jh3nBxliXXwfSgHCDqAqeTlhhwOsS2lluLxXV//IML04qYltBOcwek/+nD vPfQ== 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=zeTa1kMSEl3fLJZjvubhBF7lLU+TSysbdNVa6LXQMGs=; b=q7WUdJ3o9cwDR7UJJUxR0kZfF7nsEb60DzztZwIWKqr4r8Tw4AZHyw9KpccHpQQTJF YA0eQlrSIfs8VKorrwFnUpEz2eBH0DsfS2+8x30ChQ6GysbgY8voiFW2I5mCSXxqzNz5 XJy9V38YS+coHskmXzy7uLJ9bhhvoXSlckUQi0fQxygwmGvokUeEEKx5eWyVF8E/qXUz 35uPgyg0PtXzqIOYZI84bIo1Tgdt3iqj9gl56BiXVlVpTq0JnAoOkckzka2uoaE9i4l8 xAKUpaNzmiXOy3qDzo/KZ0i98OQ1Vb+kiHTOSzj4Yjz5O2xv3iXpO50lw2iadowzJUjk 05Lg== X-Gm-Message-State: APjAAAWRbvCBv/ILI4TeZS1fW0+trt0DiDgG6rZKRSwaeCCh6AZQgmR2 Su13P4EKqOcRY/yyTc9/lsUCQiyjYcNL0N0PqGi5Gg== X-Google-Smtp-Source: APXvYqyM78u7JQAugFgv5zZBfNuG8N7zn04ejIqfum6zEtPcj48HqoBLg00kLaeSxn3H7xzZslVIa+EkM26FbgU/wvs= X-Received: by 2002:a05:6808:a83:: with SMTP id q3mr2851359oij.0.1581095203775; Fri, 07 Feb 2020 09:06:43 -0800 (PST) MIME-Version: 1.0 References: <20200203200029.4592-1-vgoyal@redhat.com> <20200203200029.4592-2-vgoyal@redhat.com> <20200205183050.GA26711@infradead.org> <20200205200259.GE14544@redhat.com> <20200206074142.GB28365@infradead.org> <20200207170150.GC11998@redhat.com> In-Reply-To: <20200207170150.GC11998@redhat.com> From: Dan Williams Date: Fri, 7 Feb 2020 09:06:32 -0800 Message-ID: Subject: Re: [PATCH 1/5] dax, pmem: Add a dax operation zero_page_range To: Vivek Goyal Message-ID-Hash: JEPU4FP7T3HFLQH6XOQDZ34YKUFQVDWV X-Message-ID-Hash: JEPU4FP7T3HFLQH6XOQDZ34YKUFQVDWV 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: Christoph Hellwig , linux-fsdevel , linux-nvdimm , device-mapper development 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 Fri, Feb 7, 2020 at 9:02 AM Vivek Goyal wrote: > > On Fri, Feb 07, 2020 at 08:57:39AM -0800, Dan Williams wrote: > > On Wed, Feb 5, 2020 at 11:41 PM Christoph Hellwig wrote: > > > > > > On Wed, Feb 05, 2020 at 04:40:44PM -0800, Dan Williams wrote: > > > > > I don't have any reason not to pass phys_addr_t. If that sounds better, > > > > > will make changes. > > > > > > > > The problem is device-mapper. That wants to use offset to route > > > > through the map to the leaf device. If it weren't for the firmware > > > > communication requirement you could do: > > > > > > > > dax_direct_access(...) > > > > generic_dax_zero_page_range(...) > > > > > > > > ...but as long as the firmware error clearing path is required I think > > > > we need to do pass the pgoff through the interface and do the pgoff to > > > > virt / phys translation inside the ops handler. > > > > > > Maybe phys_addr_t was the wrong type - but why do we split the offset > > > into the block device argument into a pgoff and offset into page instead > > > of a single 64-bit value? > > > > Oh, got it yes, that looks odd for sub-page zeroing. Yes, let's just > > have one device relative byte-offset. > > So what's the best type to represent this offset. "u64" or "phys_addr_t" > or "loff_t" or something else. I like phys_addr_t followed by u64. Let's make it u64. phys_addr_t has already led to confusion in this thread because the first question I ask when I read it is "why call ->direct_access() to do the translation when you already have the physical address?". _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org