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=-1.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=unavailable 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 9EC5FC282DA for ; Wed, 17 Apr 2019 21:54:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6BCE22183E for ; Wed, 17 Apr 2019 21:54:52 +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="nE8Uv15i" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387528AbfDQVyv (ORCPT ); Wed, 17 Apr 2019 17:54:51 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:39178 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387494AbfDQVyt (ORCPT ); Wed, 17 Apr 2019 17:54:49 -0400 Received: by mail-oi1-f195.google.com with SMTP id n187so20023oih.6 for ; Wed, 17 Apr 2019 14:54:48 -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=0gzMaLLaGdWl3hSChkCJQp0aKInJbM+8lmL2ZmU73jg=; b=nE8Uv15i9sJ9T2QCxWTOE/iQD1bpVlwdwn8GzP1/6K5ajHJB2ThscCe1BBipf81sRG 7Ki4ZanzmXpROhRumbSMNtBcN0vgTQuSWTzTYdQPEoZGpjwEVEhJ59WUlSTFALaQX/w3 Ao2ANSK+tabdBGgLtc8Px76vWply/4r5eKmyAhe8o5f2HGs6ABsSLSDvV9HFg1Yuv+XG bB6bFe5tJ3nBzUWG3kffvZ5VncmP81eRT0m7NHbSaZaiAzOell6TbvdTtFLkBs9XmX/2 Zvzd5gGqyvR+yJ3vNotGqM57OTMZwvzIHihHOHg5eo1Kr57GoOghV8lV5p12oyDmYs7D VfqA== 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=0gzMaLLaGdWl3hSChkCJQp0aKInJbM+8lmL2ZmU73jg=; b=Awg342r41Rk+AJl2Ic/rGhiPNXpMgvRVM7VR9lZiBpYpxA5ECQYVe+LOK7xAL+wi3I mpcRNMGwrk+xSSukvocwOewcFKDbe8Mzb3K4WaHTbof3XOUUtc3FtNHCtBNSU2nCdQgL ftBY52SZUohG2JVaAFOaQzk8bgA0WMK+4YR8dGAGWu3wNl7Ss1TPVamf6h7eVx9jPc6h miSQRHnRNAx+Ooj8fOV92JzyLd76TijXRBRoxRp4fsxIJfEBFMZ5H6/UDHEabPu1mdfH DeHGsowYmahRhCNfpEOud07+1fJxKi65EMdkRWlFGH63rjI1yjuU2MT+dWsBRreZFvFl yJ6Q== X-Gm-Message-State: APjAAAXzQfTiVKD5lneta0UaUKUZ6UNNe0fvgJ71uqq47db0ftIfv8wu swKcOk3gV+lVsqfvr61cuivh40T1+OPtzipPtEbufg== X-Google-Smtp-Source: APXvYqyqbZkKrQu9PG9OfbWt5ClCfO+XAk2lSd/W1ElRySi/w9Gfz2hltItUkNjyrAWhso6NLBnigyhcnGeWvHliB84= X-Received: by 2002:aca:d513:: with SMTP id m19mr548506oig.73.1555538087242; Wed, 17 Apr 2019 14:54:47 -0700 (PDT) MIME-Version: 1.0 References: <20190411210834.4105-1-jglisse@redhat.com> <2c124cc4-b97e-ee28-2926-305bc6bc74bd@plexistor.com> <20190416185922.GA12818@kmo-pixel> In-Reply-To: From: Dan Williams Date: Wed, 17 Apr 2019 14:54:36 -0700 Message-ID: Subject: Re: [PATCH v1 00/15] Keep track of GUPed pages in fs and block To: Boaz Harrosh Cc: Kent Overstreet , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Linux Kernel Mailing List , linux-fsdevel , linux-block@vger.kernel.org, Linux MM , John Hubbard , Jan Kara , Alexander Viro , Johannes Thumshirn , Christoph Hellwig , Jens Axboe , Ming Lei , Jason Gunthorpe , Matthew Wilcox , Steve French , linux-cifs@vger.kernel.org, Yan Zheng , Sage Weil , Ilya Dryomov , Alex Elder , ceph-devel@vger.kernel.org, Eric Van Hensbergen , Latchesar Ionkov , Mike Marshall , Martin Brandenburg , devel@lists.orangefs.org, Dominique Martinet , v9fs-developer@lists.sourceforge.net, Coly Li , linux-bcache@vger.kernel.org, =?UTF-8?Q?Ernesto_A=2E_Fern=C3=A1ndez?= 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 Tue, Apr 16, 2019 at 12:28 PM Boaz Harrosh wrote: > > On 16/04/19 22:12, Dan Williams wrote: > > On Tue, Apr 16, 2019 at 11:59 AM Kent Overstreet > > wrote: > <> > > This all reminds of the failed attempt to teach the block layer to > > operate without pages: > > > > https://lore.kernel.org/lkml/20150316201640.33102.33761.stgit@dwillia2-desk3.amr.corp.intel.com/ > > > > Exactly why I want to make sure it is just a [pointer | flag] and not any kind of pfn > type. Let us please not go there again? > > >> > >> Question though - why do we need a flag for whether a page is a GUP page or not? > >> Couldn't the needed information just be determined by what range the pfn is not > >> (i.e. whether or not it has a struct page associated with it)? > > > > That amounts to a pfn_valid() check which is a bit heavier than if we > > can store a flag in the bv_pfn entry directly. > > > > I'd say create a new PFN_* flag, and make bv_pfn a 'pfn_t' rather than > > an 'unsigned long'. > > > > No, please please not. This is not a pfn and not a pfn_t. It is a page-ptr > and a flag that says where/how to put_page it. IE I did a GUP on this page > please do a PUP on this page instead of regular put_page. So no where do I mean > pfn or pfn_t in this code. Then why? If it's not a pfn then it shouldn't be an unsigned long named "bv_pfn".