Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp625430pxu; Wed, 7 Oct 2020 11:26:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzP8JpgVbXBnFtAQJu2SCcYEKu3/DvbtC46kVS+WPUhYr0fSD6ECv/Vj/xpZ0qQFJj2IrAA X-Received: by 2002:aa7:d785:: with SMTP id s5mr4826966edq.154.1602095178070; Wed, 07 Oct 2020 11:26:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602095178; cv=none; d=google.com; s=arc-20160816; b=mSA/yZz7P9MO02UZg9PbIIfdALhRw0sg3VbC8o9Ork/+mtkSr6c0VE7wRh94IhFe3R P5C0pVTaVfA6b4JGdHDgfo2wjInsA+/BRWwinPA+2V46OH2SYU0zmhBmLOdAAcnlUkot epvhaTiGfDj1Jw7MvTLW6+t8t25XjMxeTsoLI3lAfT31uLR4UT0zScsMxZkyL9doLRcF suRuFUgedbA0Dh96nOOibBlq/HKgg1xbt+l70klmDwqw000Dr7NVH+aQmGD274UICUjC s7Oi/gZJP5mp8MI/HXgKD0H4EzNDASRYxVFjZhVoVEUitUusuK4cOizBjX6wKNw5AKaD 5IwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=lUvgpT2dTAjc7L2GQJN23iB+8LFxnscOP+RQUFKZzSU=; b=OhWMJiQS1wa+7LctjVWegkEDQ/CpW0R3dl8CCyajx8NsNcm7fnfcnTxon87kp3XJdC yn/qaxCBSXbxnNtXHBH4OrWROKVv5L2tX/JrLLedZHB+1/71CCrS7byt9dIhePOVetBD IHJRp6CpeB/kszlwqFzlrOYm75a5y4xZkCFUczJ9IWrypyUjMkcENEc6TbZUPokcOwwi NAiZwuCsKltNQYK7zOVmTnxNatGVv7nB9p+VXCUZAdt0E9w9jpW/0LtAAL3H7Zh2z1ZT m89iiMMcudMok1Y7P4ZC6eeZfDYMi3U9wS64UFcdHU08jycZuBzknPWgYrpMcvO68WgK /MHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=o+FdvXOp; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p17si2008155edx.292.2020.10.07.11.25.46; Wed, 07 Oct 2020 11:26:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=o+FdvXOp; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728810AbgJGSMm (ORCPT + 99 others); Wed, 7 Oct 2020 14:12:42 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:6009 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727033AbgJGSMm (ORCPT ); Wed, 7 Oct 2020 14:12:42 -0400 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Wed, 07 Oct 2020 11:11:46 -0700 Received: from rcampbell-dev.nvidia.com (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 7 Oct 2020 18:12:40 +0000 Subject: Re: [PATCH] ext4/xfs: add page refcount helper To: Jan Kara CC: , , , , , , Dan Williams , Matthew Wilcox , "Alexander Viro" , Theodore Ts'o , "Christoph Hellwig" , Andreas Dilger , "Darrick J. Wong" , Andrew Morton References: <20201006230930.3908-1-rcampbell@nvidia.com> <20201007082517.GC6984@quack2.suse.cz> X-Nvconfidentiality: public From: Ralph Campbell Message-ID: Date: Wed, 7 Oct 2020 11:12:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20201007082517.GC6984@quack2.suse.cz> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1602094306; bh=lUvgpT2dTAjc7L2GQJN23iB+8LFxnscOP+RQUFKZzSU=; h=Subject:To:CC:References:X-Nvconfidentiality:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:Content-Type:Content-Language: Content-Transfer-Encoding:X-Originating-IP:X-ClientProxiedBy; b=o+FdvXOp7EzIyvwJEGGRsWIIvAKdYxiUjP4FaudBCF5tqtRlUM5mSnvldVEx36PfR 1aWjXJX3cbuJ7Atpubl/0AHI642RUHyderrltQL3vMBrDg8gwiwV7U9TzPMU/ZJHwL Q8ZSz2uk/NvYwAsL3dgNttmxAQlPr1SM/DIUjacJVlS/BWCCGPh0LfkAt0rILq8Ydx 9WXnyAZ3kmgVCXUpIpyKRfB7115WfJo9GwBDm0wtRxubW5SSlC6khrlAyfPqtAwipT xKAu+/xSyEM++gga5LHl6KFTQoOC1yVE4sPLYQHQ8enCOgH/tllJl9uOy2ayx+RLbP 5Q+o0MZ9gWpQA== Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 10/7/20 1:25 AM, Jan Kara wrote: > On Tue 06-10-20 16:09:30, Ralph Campbell wrote: >> There are several places where ZONE_DEVICE struct pages assume a reference >> count == 1 means the page is idle and free. Instead of open coding this, >> add a helper function to hide this detail. >> >> Signed-off-by: Ralph Campbell >> Reviewed-by: Christoph Hellwig > > Looks as sane direction but if we are going to abstract checks when > ZONE_DEVICE page is idle, we should also update e.g. > mm/swap.c:put_devmap_managed_page() or > mm/gup.c:__unpin_devmap_managed_user_page() (there may be more places like > this but I found at least these two...). Maybe Dan has more thoughts about > this. > > Honza I think this is a good point but I would like to make that a follow on patch rather than add to this one.