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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 12E21C433E6 for ; Tue, 9 Feb 2021 13:39:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9AD7564ECC for ; Tue, 9 Feb 2021 13:39:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9AD7564ECC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 085B96B0075; Tue, 9 Feb 2021 08:39:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 00D446B0078; Tue, 9 Feb 2021 08:39:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E18D76B007B; Tue, 9 Feb 2021 08:39:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0172.hostedemail.com [216.40.44.172]) by kanga.kvack.org (Postfix) with ESMTP id C52AA6B0075 for ; Tue, 9 Feb 2021 08:39:35 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 879D9180295B6 for ; Tue, 9 Feb 2021 13:39:35 +0000 (UTC) X-FDA: 77798836710.24.floor64_1d05d0d27607 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 6E41A1A4A0 for ; Tue, 9 Feb 2021 13:39:35 +0000 (UTC) X-HE-Tag: floor64_1d05d0d27607 X-Filterd-Recvd-Size: 4135 Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Tue, 9 Feb 2021 13:39:34 +0000 (UTC) Received: by mail-qk1-f173.google.com with SMTP id d85so17884614qkg.5 for ; Tue, 09 Feb 2021 05:39:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=q4gBt83LBvEvfgqjMk5XxBqoQUgJu0Updm2eupI2oTY=; b=aQhoXa9jPalDWlVkfGxPk+c+I0Q9JZFKo47tCsmclHZEsPNYfreM817gCFAr4kOU8W fHBrAIQilQhVmk1iG9w5EWskZgjnukqG4cUDzLNZ6BylHXqnGvwuThK4UN4InIuRH/ze cvAS/4B/aBNt8AOe4VR/tiAtWA123wCajp47c9XzIXZFa0/I9e6/nmkjO6l7O80x9iCT kP9CrF06fB0beIFQO/9dbuqk7hvLl+4qLhMBYJj+SEwVoqE/HfXTlsjgBKUF7reYwTlf Ov9fDvgK+9WKyztUGrdI96zt7nHKT/h6nbpz8LPo9nETq4dWfycOqz7C26v5rJTgWElw YGyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=q4gBt83LBvEvfgqjMk5XxBqoQUgJu0Updm2eupI2oTY=; b=O+mn4NSdGCgYOhLe87kN7/dulPF+c8EEZ3GjC2C2Nsd8CpenY6dm8CQhShJsGgUtQv w50u5D6gorLSUhVkKu1/hkKoGbWtGGfb8TNqRvTmD+eu8DHgiJlNtvHH0aWOj40Rc1mY F+TuWdBxN04phkJva4UciVRnIi3xd/wVz+Qossmi7rp/pyruEPX8FrocZGTpTI49JPe5 QsWfhuOPEzfNfF+URlfBDUiOVoziiDeY0iSaHU7IbeNLQWZHas1GSirZYENW85q3fxrQ W5Sq8ovY+SS9wmwIYSCvBlg/IneHVGZVaiMRNLaV9DRNcrLGsVdnxcv1Ls3YfBIfWS/m L2Mg== X-Gm-Message-State: AOAM533U5xdYBQ2VNS5tSB9ZjRtbGgqPN9y3c9pcQ6eEHBfzE2un8GwM R9gwgZr9WHPeGPEQbILStBOwxg== X-Google-Smtp-Source: ABdhPJzETc8qT6BXd1BDQmX3B26rXpyj1TrCOmYb4Fqo0JHFF6LTk7HRkfK/22tofKGhVc50wAK02g== X-Received: by 2002:a37:5a45:: with SMTP id o66mr21362019qkb.446.1612877974387; Tue, 09 Feb 2021 05:39:34 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-115-133.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.115.133]) by smtp.gmail.com with ESMTPSA id m21sm17197217qtq.52.2021.02.09.05.39.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 05:39:33 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1l9TEq-005RKt-Q3; Tue, 09 Feb 2021 09:39:32 -0400 Date: Tue, 9 Feb 2021 09:39:32 -0400 From: Jason Gunthorpe To: Alistair Popple Cc: linux-mm@kvack.org, nouveau@lists.freedesktop.org, bskeggs@redhat.com, akpm@linux-foundation.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org, dri-devel@lists.freedesktop.org, jhubbard@nvidia.com, rcampbell@nvidia.com, jglisse@redhat.com Subject: Re: [PATCH 1/9] mm/migrate.c: Always allow device private pages to migrate Message-ID: <20210209133932.GD4718@ziepe.ca> References: <20210209010722.13839-1-apopple@nvidia.com> <20210209010722.13839-2-apopple@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210209010722.13839-2-apopple@nvidia.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.027931, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Feb 09, 2021 at 12:07:14PM +1100, Alistair Popple wrote: > Device private pages are used to represent device memory that is not > directly accessible from the CPU. Extra references to a device private > page are only used to ensure the struct page itself remains valid whilst > waiting for migration entries. Therefore extra references should not > prevent device private page migration as this can lead to failures to > migrate pages back to the CPU which are fatal to the user process. This should identify the extra references in expected_count, just disabling this protection seems unsafe, ZONE_DEVICE is not so special that the refcount means nothing Is this a side effect of the extra refcounts that Ralph was trying to get rid of? I'd rather see that work finished :) Jason