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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 059F4C43334 for ; Sat, 2 Jul 2022 04:25:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 871BB6B0071; Sat, 2 Jul 2022 00:25:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 821176B0073; Sat, 2 Jul 2022 00:25:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 711356B0074; Sat, 2 Jul 2022 00:25:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 632936B0071 for ; Sat, 2 Jul 2022 00:25:54 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 3DEE6120C91 for ; Sat, 2 Jul 2022 04:25:54 +0000 (UTC) X-FDA: 79640871828.24.14A9D9A Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf01.hostedemail.com (Postfix) with ESMTP id A2F9640039 for ; Sat, 2 Jul 2022 04:25:53 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C301E608C3; Sat, 2 Jul 2022 04:25:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2C8EC34114; Sat, 2 Jul 2022 04:25:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1656735952; bh=CnLxEWfEVwpNoTxWsiwQ1LQuKst+72BKDbjbXAesDa4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LQCMYCHDQR6Snh03VJXykPrYGM58AdpZzxwBcPzIoKS+eBA9CKb8Ndukm4D2HfPUa i4yAErDdhscv7vlgetKrJZ7oiJZp8dU98i+LE/12HMErHBMVVau0tOR8gyM7ntkFIH yJLFkEd0F9svS2uuJzXBntMgT6QOg+GCbOO/3Vn8= Date: Fri, 1 Jul 2022 21:25:51 -0700 From: Andrew Morton To: David Hildenbrand Cc: Felix Kuehling , Alex Sierra , jgg@nvidia.com, linux-mm@kvack.org, rcampbell@nvidia.com, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, hch@lst.de, jglisse@redhat.com, apopple@nvidia.com, willy@infradead.org Subject: Re: [PATCH v7 01/14] mm: rename is_pinnable_pages to is_pinnable_longterm_pages Message-Id: <20220701212551.7198162dbd65746a69bc41b4@linux-foundation.org> In-Reply-To: <49315889-96de-8e41-f8ee-dd5b33c5e1db@redhat.com> References: <20220629035426.20013-1-alex.sierra@amd.com> <20220629035426.20013-2-alex.sierra@amd.com> <575b48a6-e372-acda-9a7c-449f307a588c@amd.com> <49315889-96de-8e41-f8ee-dd5b33c5e1db@redhat.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656735953; a=rsa-sha256; cv=none; b=TKyDHdsSskR8pfNWW2FsxVbD/Ms3rYrwjNszA1yXMSgDcvbLz6JwknumdFTibngMCP6yt1 H2Niw5cozXGvShYPTJhAk/v0GkZ6nbrtc8bAULj7bn9hoU64RE/0GT9H7ztGwXzp/DFm69 wzWz7ufNvNx9f7LN9dC+ytuZkp2uxKM= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=LQCMYCHD; dmarc=none; spf=pass (imf01.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656735953; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=8TPq2QHC1dMN1FwAY/RTveuNB7xP9/TWa46LlQkJ5PQ=; b=gfe0ZN3Yiof1mnuaPFJJkBo/5kBS/KGAq34i9qUtHMpioDxuz2nnqSCMUollkgfIKWonUf 3jpWH2IFX7O92Xao90nGNhiERZuYz8fhAbANIbt6Z5HRXbcnL2tPmG39S/NXGm1ICevZs5 I1dA8U+mbzoN6WzsbK4yh2cL/Yg02tE= X-Stat-Signature: uayiyeaek8ur55gwu5poourau71ebqh1 X-Rspamd-Queue-Id: A2F9640039 Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=LQCMYCHD; dmarc=none; spf=pass (imf01.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1656735953-377583 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, 30 Jun 2022 00:15:06 +0200 David Hildenbrand wrote: > On 30.06.22 00:08, Felix Kuehling wrote: > > On 2022-06-29 03:33, David Hildenbrand wrote: > >> On 29.06.22 05:54, Alex Sierra wrote: > >>> is_pinnable_page() and folio_is_pinnable() were renamed to > >>> is_longterm_pinnable_page() and folio_is_longterm_pinnable() > >>> respectively. These functions are used in the FOLL_LONGTERM flag > >>> context. > >> Subject talks about "*_pages" > >> > >> > >> Can you elaborate why the move from mm.h to memremap.h is justified? > > > > Patch 2 adds is_device_coherent_page in memremap.h and updates > > is_longterm_pinnable_page to call is_device_coherent_page. memremap.h > > cannot include mm.h because it is itself included by mm.h. So the choice > > was to move is_longterm_pinnable_page to memremap.h, or move > > is_device_coherent_page and all its dependencies to mm.h. The latter > > would have been a bigger change. > > I really don't think something mm generic that compiles without > ZONE_DEVICE belongs into memremap.h. Please find a cleaner way to get > this done. (without having bothered to look at the code...) The solution is always to create a new purpose-specific header file.