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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 E463BC433DB for ; Tue, 2 Mar 2021 12:02:09 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 89C1160232 for ; Tue, 2 Mar 2021 12:02:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89C1160232 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=nouveau-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E8D0389DBF; Tue, 2 Mar 2021 12:02:08 +0000 (UTC) Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id F09526E92D; Tue, 2 Mar 2021 12:02:07 +0000 (UTC) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 02 Mar 2021 04:02:07 -0800 Received: from nvdebian.localnet (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 2 Mar 2021 12:02:03 +0000 From: Alistair Popple To: Christoph Hellwig Date: Tue, 2 Mar 2021 23:02:01 +1100 Message-ID: <3345714.hC2lq6CL0I@nvdebian> In-Reply-To: <2110609.1zlQqR5hOE@nvdebian> References: <20210226071832.31547-1-apopple@nvidia.com> <20210226155909.GA2907711@infradead.org> <2110609.1zlQqR5hOE@nvdebian> MIME-Version: 1.0 X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1614686527; bh=b4u8wlHSQs9FvZtrdld+N7bU6bKVR4VIsqvExBaD4Rs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Content-Type: X-Originating-IP:X-ClientProxiedBy; b=dCvuFv2nHakCS7lmDYO2pxF6pGlzQ4j5wasHy/HwPnpQbwFTJ4SkzTAsw+V480/yo GU6GDIY5sCyead7VMxIwQxY9J+SH+Dd1Yc+whx/HTBCLcXBAYtUmQ7vRQ1ZLts7uGI ORtUa8tOqSxCxJfrpOM1lbvVDuEBaKlc5aeB+qOT8QzxQA7XZwcVrgkSOQ5J55/qsT 5omouGzUjYOojRdozUTNKFqLaHURFqh5FOyeJSzvikrM97UDKkytICAKlRXXTB3Jg7 AnhYQA/D2u2YQeGtcqeGkNKxCsDG7H/6I77qB8qOrbv0JzI4ERftAYolHKQ9e2ejGX zGJjSgT2MgSyg== Subject: Re: [Nouveau] [PATCH v3 1/8] mm: Remove special swap entry functions X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rcampbell@nvidia.com, daniel@ffwll.ch, linux-doc@vger.kernel.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mm@kvack.org, bskeggs@redhat.com, jgg@nvidia.com, akpm@linux-foundation.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" On Tuesday, 2 March 2021 7:52:53 PM AEDT Alistair Popple wrote: > On Saturday, 27 February 2021 2:59:09 AM AEDT Christoph Hellwig wrote: > > > - struct page *page = migration_entry_to_page(entry); > > > + struct page *page = pfn_to_page(swp_offset(entry)); > > > > I wonder if keeping a single special_entry_to_page() helper would still > > me a useful. But I'm not entirely sure. There are also two more open > > coded copies of this in the THP migration code. > > I think it might be if only to clearly document where these entries are used. > Will add it for the next version to see what it looks like. Actually the main advantage ends up being that it becomes easy to retain the page locked check for migration entries. - Alistair _______________________________________________ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau