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 E7D37C48BDF for ; Sun, 13 Jun 2021 18:53:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4FFFF61285 for ; Sun, 13 Jun 2021 18:53:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4FFFF61285 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A23CC6B0036; Sun, 13 Jun 2021 14:53:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9D53C6B006E; Sun, 13 Jun 2021 14:53:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8742A6B0070; Sun, 13 Jun 2021 14:53:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0173.hostedemail.com [216.40.44.173]) by kanga.kvack.org (Postfix) with ESMTP id 596CC6B0036 for ; Sun, 13 Jun 2021 14:53:42 -0400 (EDT) Received: from smtpin35.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id E3256180AD802 for ; Sun, 13 Jun 2021 18:53:41 +0000 (UTC) X-FDA: 78249599442.35.BE61EC6 Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by imf23.hostedemail.com (Postfix) with ESMTP id D50BDA000240 for ; Sun, 13 Jun 2021 18:53:33 +0000 (UTC) Received: by mail-lf1-f53.google.com with SMTP id a1so17212641lfr.12 for ; Sun, 13 Jun 2021 11:53:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jIwBuaKEyUe8RPybEEGjfCPj/QP2GIowPZPUUKF9Zo4=; b=JGOFEBDm1r/vyu8Dznn4PgkQZZWr85EZTSQAnko+JKmdIrLZyXiN9aTqjDJtNxuUdV S7oHqQk+bVfMmj7VLfuc+USUe2nhB5mIYNWJDi0FjK5W6kohDOSsk1QcKhyW+Zu2ShV/ lJvSJHD1xWrnsdeoPReSdGSt+vPCltoXOb+M4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jIwBuaKEyUe8RPybEEGjfCPj/QP2GIowPZPUUKF9Zo4=; b=CR+06nPUePJF9tccbxIp2bGo6th/ye0rHOuw+aWNDb6SnS4fz2P60e5CAHrz9EfgDU 13z4HWsq829+FihhJokES4Vl09z4r7k0JZj2wCEhMaJ8eI5hx4fZ1vP8yzABOCnxg8ty QIRVYxirxad9KpeqyeQJiVCYmlG1La6U/nSoXtUNjZe5TJE3gRcgfRGqGYvjGmLs3yzk GWTnWO9LiFRMQr2atU0tQp+Ckldc8UAlQd6c0IGLaaoIeSIZdoDlh4urSSCQX8UtYHqO LbffEnJg5mIuq92PJpkmARV/OuZRdvUl/WqSjzsWjtmp0SBn5BuCKuBH/TI6RsMOw5jK yjqg== X-Gm-Message-State: AOAM531/mruYggjP1/3NqsVp7cDgMugp7Vvpz+NiKztGy1bYPiJn7enu LSxvRfTP9msQO4k1BZo7yW5AVsD6mwdlgrTZ X-Google-Smtp-Source: ABdhPJzweImc4KzlgjO1C2YdEIGdQPit8ntlZfvu49e/7S/yF8h/CDuFmIT/m/8ON9odyAMmR5UN5g== X-Received: by 2002:a19:7d89:: with SMTP id y131mr9419767lfc.108.1623610417667; Sun, 13 Jun 2021 11:53:37 -0700 (PDT) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com. [209.85.167.43]) by smtp.gmail.com with ESMTPSA id l12sm1250927lfe.36.2021.06.13.11.53.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 13 Jun 2021 11:53:36 -0700 (PDT) Received: by mail-lf1-f43.google.com with SMTP id p7so17286571lfg.4 for ; Sun, 13 Jun 2021 11:53:36 -0700 (PDT) X-Received: by 2002:a05:6512:3d13:: with SMTP id d19mr9490584lfv.41.1623610415825; Sun, 13 Jun 2021 11:53:35 -0700 (PDT) MIME-Version: 1.0 References: <20210610083549.386085-1-aneesh.kumar@linux.ibm.com> <20210610083549.386085-6-aneesh.kumar@linux.ibm.com> <87wnqy9lru.fsf@linux.ibm.com> In-Reply-To: <87wnqy9lru.fsf@linux.ibm.com> From: Linus Torvalds Date: Sun, 13 Jun 2021 11:53:20 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 5/6] mm/mremap: Use pmd/pud_poplulate to update page table entries To: "Aneesh Kumar K.V" Cc: Nick Piggin , Linux-MM , Kalesh Singh , Joel Fernandes , "Kirill A . Shutemov" , Andrew Morton , linuxppc-dev Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=JGOFEBDm; dmarc=none; spf=pass (imf23.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.167.53 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org X-Stat-Signature: m1ofgbueewyg1rnjsde7rorqnuxyp3g4 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: D50BDA000240 X-HE-Tag: 1623610413-228290 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 Sun, Jun 13, 2021 at 2:06 AM Aneesh Kumar K.V wrote: > > IIUC the reason why we do have pmd_pgtable() is that pgtable_t type > is arch dependent. On some architecture it is pte_t * and on the other > struct page *. The reason being highmem and level 4 page table can > be located in highmem. Honestly, the same confusion is real - in a different way - about pud_page_vaddr(). I really hate that function. Just grep for the uses, and the definitions, to see what I mean. It's crazy. I'm perfectly happy not having a "pud_pagetable()" function, but that cast on pud_page_vaddr() is indicative of real problems. One solution might be to just say "pud_page_vaddr()" must return a "pmd_t *". I think it's what all the users actually want anyway. Linus