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.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 244CCC47082 for ; Sat, 29 May 2021 06:42:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B904E611AE for ; Sat, 29 May 2021 06:42:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B904E611AE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 562FA6B006E; Sat, 29 May 2021 02:42:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 512636B0071; Sat, 29 May 2021 02:42:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3B3306B0072; Sat, 29 May 2021 02:42:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0145.hostedemail.com [216.40.44.145]) by kanga.kvack.org (Postfix) with ESMTP id 0C4CF6B006E for ; Sat, 29 May 2021 02:42:29 -0400 (EDT) Received: from smtpin32.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 9A23DA8E5 for ; Sat, 29 May 2021 06:42:29 +0000 (UTC) X-FDA: 78193324818.32.FAAA835 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf16.hostedemail.com (Postfix) with ESMTP id 5690F8019344 for ; Sat, 29 May 2021 06:42:20 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 91C9968B05; Sat, 29 May 2021 08:42:27 +0200 (CEST) Date: Sat, 29 May 2021 08:42:27 +0200 From: Christoph Hellwig To: Felix Kuehling Cc: felix.kuehling@amd.com, akpm@linux-foundation.org, linux-mm@kvack.org, hch@lst.de, jglisse@redhat.com, jgg@nvidia.com, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, Alex Sierra Subject: Re: [RFC PATCH 5/5] mm: changes to unref pages with Generic type Message-ID: <20210529064227.GD15834@lst.de> References: <20210527230809.3701-1-Felix.Kuehling@amd.com> <20210527230809.3701-6-Felix.Kuehling@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210527230809.3701-6-Felix.Kuehling@amd.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Rspamd-Queue-Id: 5690F8019344 Authentication-Results: imf16.hostedemail.com; dkim=none; dmarc=none; spf=none (imf16.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de X-Rspamd-Server: rspam04 X-Stat-Signature: b5dnqyueam5q14thpnqec1uzw84fpyz6 X-HE-Tag: 1622270540-402357 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 Thu, May 27, 2021 at 07:08:09PM -0400, Felix Kuehling wrote: > From: Alex Sierra > > pages in device mapping refcounts are 1-based, instead > of 0-based. If refcount 1, means it can be freed. > This logic is not set for Generic memory type. Therefore, > its release is threated as a normal page, instead of > the callback device driver release it. So we really need to stop this magic one off refcount. We had a WIP patchset to do that, and we need to finish that off instad of piling on more hacks.