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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 DFF1AC48BCF for ; Sun, 13 Jun 2021 10:50:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 224FC6108E for ; Sun, 13 Jun 2021 10:50:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 224FC6108E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5DB506B006C; Sun, 13 Jun 2021 06:50:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 58B1A6B006E; Sun, 13 Jun 2021 06:50:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 452EA6B0070; Sun, 13 Jun 2021 06:50:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0153.hostedemail.com [216.40.44.153]) by kanga.kvack.org (Postfix) with ESMTP id 1584A6B006C for ; Sun, 13 Jun 2021 06:50:32 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 96F68181AEF15 for ; Sun, 13 Jun 2021 10:50:31 +0000 (UTC) X-FDA: 78248381862.17.458B757 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf25.hostedemail.com (Postfix) with ESMTP id DD79A6000148 for ; Sun, 13 Jun 2021 10:50:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ht7UkFQTId64jmEDxIRXNFLs7JwLP2CL1sHUhegGjNA=; b=nOox4sTP5ai7M0T+fRF6UG2p8I fSIv9r6N0IsEnVs43YRqRZSZiXQd1IJmiRSS+tGRsRXnirrC0/X8U1dCOyUqOpCGJlK8qkaE2Sui5 moq5sbsVE65ULB1MuaVHHQ6v2CVCCxsOebwxdSBZOL+G2HhlV8th3JdK/MJZ/nmF8CqJsjLqNljDY SG5a7Ayj7HP/76BS6PURkLJXYBkMUdT4rrFCTlEzaByrVKZKLKSv3QfFCVhwNKJYwiDSEq2be7A69 m7uTX3JOJUhf4xfsgKrCU3rbxcakdfQgTehvrhoCo/S3qkj6uHyrmUS5xELFXxyaKWEwGJs+s6jCL PAWDCQMQ==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lsNh2-004T8m-H4; Sun, 13 Jun 2021 10:50:17 +0000 Date: Sun, 13 Jun 2021 11:50:16 +0100 From: Matthew Wilcox To: "Aneesh Kumar K.V" Cc: Linus Torvalds , Nick Piggin , Linux-MM , Kalesh Singh , Joel Fernandes , "Kirill A . Shutemov" , Andrew Morton , linuxppc-dev Subject: Re: [PATCH 5/6] mm/mremap: Use pmd/pud_poplulate to update page table entries Message-ID: References: <20210610083549.386085-1-aneesh.kumar@linux.ibm.com> <20210610083549.386085-6-aneesh.kumar@linux.ibm.com> <87wnqy9lru.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wnqy9lru.fsf@linux.ibm.com> X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: DD79A6000148 Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=nOox4sTP; spf=none (imf25.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Stat-Signature: 9mts4ys69d4yquxj79hykur1jzriruno X-HE-Tag: 1623581422-586339 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 02:36:13PM +0530, 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. That is ahistorical. See 2f569afd9ced9ebec9a6eb3dbf6f83429be0a7b4 -- we have pgtable_t for the benefit of s390's crazy sub-page page table sizes. Also, please stop numbering page tables upside down. PTEs are first level, not fourth. 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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 B7ACDC48BCF for ; Sun, 13 Jun 2021 10:51:13 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 0BE24610A2 for ; Sun, 13 Jun 2021 10:51:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0BE24610A2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4G2rwc1PCQz306S for ; Sun, 13 Jun 2021 20:51:12 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=nOox4sTP; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=infradead.org (client-ip=2001:8b0:10b:1236::1; helo=casper.infradead.org; envelope-from=willy@infradead.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=nOox4sTP; dkim-atps=neutral Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4G2rw36mNtz2yXh for ; Sun, 13 Jun 2021 20:50:41 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ht7UkFQTId64jmEDxIRXNFLs7JwLP2CL1sHUhegGjNA=; b=nOox4sTP5ai7M0T+fRF6UG2p8I fSIv9r6N0IsEnVs43YRqRZSZiXQd1IJmiRSS+tGRsRXnirrC0/X8U1dCOyUqOpCGJlK8qkaE2Sui5 moq5sbsVE65ULB1MuaVHHQ6v2CVCCxsOebwxdSBZOL+G2HhlV8th3JdK/MJZ/nmF8CqJsjLqNljDY SG5a7Ayj7HP/76BS6PURkLJXYBkMUdT4rrFCTlEzaByrVKZKLKSv3QfFCVhwNKJYwiDSEq2be7A69 m7uTX3JOJUhf4xfsgKrCU3rbxcakdfQgTehvrhoCo/S3qkj6uHyrmUS5xELFXxyaKWEwGJs+s6jCL PAWDCQMQ==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lsNh2-004T8m-H4; Sun, 13 Jun 2021 10:50:17 +0000 Date: Sun, 13 Jun 2021 11:50:16 +0100 From: Matthew Wilcox To: "Aneesh Kumar K.V" Subject: Re: [PATCH 5/6] mm/mremap: Use pmd/pud_poplulate to update page table entries Message-ID: References: <20210610083549.386085-1-aneesh.kumar@linux.ibm.com> <20210610083549.386085-6-aneesh.kumar@linux.ibm.com> <87wnqy9lru.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wnqy9lru.fsf@linux.ibm.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev , Nick Piggin , Linux-MM , Kalesh Singh , Joel Fernandes , "Kirill A . Shutemov" , Andrew Morton , Linus Torvalds Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Sun, Jun 13, 2021 at 02:36:13PM +0530, 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. That is ahistorical. See 2f569afd9ced9ebec9a6eb3dbf6f83429be0a7b4 -- we have pgtable_t for the benefit of s390's crazy sub-page page table sizes. Also, please stop numbering page tables upside down. PTEs are first level, not fourth.