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.8 required=3.0 tests=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 2F7EAC2D0C8 for ; Sat, 21 Dec 2019 00:51:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E78972070C for ; Sat, 21 Dec 2019 00:51:25 +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="pKfg9UEB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E78972070C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 983C78E01D8; Fri, 20 Dec 2019 19:51:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 933D78E019D; Fri, 20 Dec 2019 19:51:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7FC098E01D8; Fri, 20 Dec 2019 19:51:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0022.hostedemail.com [216.40.44.22]) by kanga.kvack.org (Postfix) with ESMTP id 66E5D8E019D for ; Fri, 20 Dec 2019 19:51:25 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 0ABC5180AD807 for ; Sat, 21 Dec 2019 00:51:25 +0000 (UTC) X-FDA: 76287320130.06.cup91_4672233ec4f51 X-HE-Tag: cup91_4672233ec4f51 X-Filterd-Recvd-Size: 5491 Received: from mail-ot1-f67.google.com (mail-ot1-f67.google.com [209.85.210.67]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Sat, 21 Dec 2019 00:51:23 +0000 (UTC) Received: by mail-ot1-f67.google.com with SMTP id 59so14045672otp.12 for ; Fri, 20 Dec 2019 16:51:23 -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=f33NX0mVyrexoBKmQnsG32ndr6o8M91RbejlTLuxhxw=; b=pKfg9UEBLsx6njksUWHLBV9YCmC5Ieahekn+9soc7jLMlGZN8QDuUe3MhuCdhXgXC6 g0gDbbESs7X3oUrBExJ9JsdMsONU9A10XuSMv7r8Td92VT1lvZSJH3UfCQW1i7Y0MISg uS2PRHygg40RsyzjDa8SUbOj6VLjR2LDyqGO5Ul/NJDf/46uh1PoxGQX+YfMU/CyyhtG IsL2jFD1nFl5Z6Er0wIUYcOuiqmnJVB2yzStFIksAJDkZZdbo/uCNxgEImf+VVc9jwa2 glafhYHVftVEBCWLnGSypqNiji5kRigGyeEpI9CJW0wN6LfgAQUPFbSEuCWO48b4Xx35 0q0A== 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=f33NX0mVyrexoBKmQnsG32ndr6o8M91RbejlTLuxhxw=; b=CYbt0CER0bdg99d3wYo1Ux7FuOUem0j8OxseQCsj1DFUyvZ2U8ulijupvc9oHMXpD9 SHNbjYaK/ghDArS7FXJWfA4CDnuHVWcf0aGqxeC6z8rp4hJHCZl6cRlxW3EQ1Xe/QFMV Ew0q/dZYY9jA90WmKnF8uC5HwVGvyaeoD0NUqn4/gqlb/ASrzpxf2XOgRGoraKhAo6I4 KyLaMvRMXzL2Abf/LRIZFABSGUXbQk1zSBzYFiChrwzXyJLShH34QnkBcJ6vRccw/8nk cVuj5eGWNyC3aiBVi48kbzbjempx7XaLX70CfLQ1/tExjtAO2+eBQoyLfVYsi+JMozvk eLqw== X-Gm-Message-State: APjAAAUF+DVaXqITQScBZ7Hx5GMFWBZVfmSnl4zW5ODMNbUEeplFY/v5 lVmbth0FlH4LR/0KClxkobHh4ZpidaHdAhmeTFg+bQ== X-Google-Smtp-Source: APXvYqxbY+fIz2rYDoZ2kDh5L9IxT6HAH53HFulCDl1AVxBdn9qKQM5q+s8gqlaKrOEYdyRgaFLwOdCutzqFOh8YHY0= X-Received: by 2002:a9d:6f11:: with SMTP id n17mr4302678otq.126.1576889483302; Fri, 20 Dec 2019 16:51:23 -0800 (PST) MIME-Version: 1.0 References: <20191216222537.491123-1-jhubbard@nvidia.com> <20191219132607.GA410823@unreal> <20191220092154.GA10068@quack2.suse.cz> <437f2bff-13ba-0ae9-2f3c-bc8eb82d20f0@nvidia.com> In-Reply-To: <437f2bff-13ba-0ae9-2f3c-bc8eb82d20f0@nvidia.com> From: Dan Williams Date: Fri, 20 Dec 2019 16:51:12 -0800 Message-ID: Subject: Re: [PATCH v11 00/25] mm/gup: track dma-pinned pages: FOLL_PIN To: John Hubbard Cc: Jan Kara , Leon Romanovsky , Andrew Morton , Al Viro , Alex Williamson , Benjamin Herrenschmidt , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Christoph Hellwig , Daniel Vetter , Dave Chinner , David Airlie , "David S . Miller" , Ira Weiny , Jason Gunthorpe , Jens Axboe , Jonathan Corbet , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Magnus Karlsson , Mauro Carvalho Chehab , Michael Ellerman , Michal Hocko , Mike Kravetz , Paul Mackerras , Shuah Khan , Vlastimil Babka , bpf@vger.kernel.org, Maling list - DRI developers , KVM list , linux-block@vger.kernel.org, Linux Doc Mailing List , linux-fsdevel , linux-kselftest@vger.kernel.org, "Linux-media@vger.kernel.org" , linux-rdma , linuxppc-dev , Netdev , Linux MM , LKML , Maor Gottlieb Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Dec 20, 2019 at 4:41 PM John Hubbard wrote: > > On 12/20/19 4:33 PM, Dan Williams wrote: > ... > >> I believe there might be also a different solution for this: For > >> transparent huge pages, we could find a space in 'struct page' of the > >> second page in the huge page for proper pin counter and just account pins > >> there so we'd have full width of 32-bits for it. > > > > That would require THP accounting for dax pages. It is something that > > was probably going to be needed, but this would seem to force the > > issue. > > > > Thanks for mentioning that, it wasn't obvious to me yet. > > How easy is it for mere mortals outside of Intel, to set up a DAX (nvdimm?) > test setup? I'd hate to go into this without having that coverage up > and running. It's been sketchy enough as it is. :) You too can have the power of the gods for the low low price of a kernel command line parameter, or a qemu setup. Details here: https://nvdimm.wiki.kernel.org/how_to_choose_the_correct_memmap_kernel_parameter_for_pmem_on_your_system https://nvdimm.wiki.kernel.org/pmem_in_qemu