Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4519999ybz; Tue, 28 Apr 2020 12:49:25 -0700 (PDT) X-Google-Smtp-Source: APiQypJCISx/K7Hf91b4JTADkbDdkMTYv60P0QMoTg2qIWqxyPNVq3xcw5gFkRf7kK6EqwZWMTPX X-Received: by 2002:a17:906:ef2:: with SMTP id x18mr8277424eji.234.1588103365641; Tue, 28 Apr 2020 12:49:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588103365; cv=none; d=google.com; s=arc-20160816; b=q8I7bSJL5LDGyi9wwQFqE8+aRKYW6FC5gx01PL8cwmWudpV7UBvZ4YYQU+w+9dv5q6 ag2GVd1jCZMtxVkP8QAQndbUS4Rx5DeyMHEy5FieTV5gMz5RG2qXHKsMO5P06rOBEINF ITjNXjqJbvqI+Pfp0CYj9Qk2Eq8HLl8NzVBM8b3tumtlnRqrG8k4YyZY3TXEF2kI1Hdt H1+EbBeBWcPE5DSsxamUMx+au63M7F6KECGrorfv4V2V+7KCaDCDJHc/a/rXQR9He43c 2LLSRaPbp0PX7BfhLMUUXcM8tGzQrS/WGOrEAFpTf+ijTFRQUMYKzEQpzwRmJsFRXtQe SrbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ozJ4/VCCoOCPsRdSc3NikpEPmevttfRVGSWHfGtgyPo=; b=YUBna28iWipwsIsY5T4zQfANPsYJD09XPZNR67jYYDEabrYadepECKMKdxwSk2ty4X zA971vfzXoQZEoJtqBUoH/XtKTFt18eS8ihWlCe9pnh5obTguXy8kr06Bula4nVgxgd6 FGPfczBeuTt20+fSuxGUZD4Ew8XOCXlgCqbY2RF0op7vdcIzTjfu8ZYD9UPRXzBSI79e nxyUFhg6nJDJbx8pH1nt8Ph9MDH/AvhudBNicUMXk8thtPiTjANnFjxPpwdxDY7BXolo 0cSOXjIs3TKQhr/ssLTMM1fsng0dvo27PSJpjEW9kitK/AjMhQ7nCU18udp5+Jbx6AEs /UuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=X097XksK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h22si2398065ejq.363.2020.04.28.12.49.01; Tue, 28 Apr 2020 12:49:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=X097XksK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729245AbgD1TpI (ORCPT + 99 others); Tue, 28 Apr 2020 15:45:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728703AbgD1TpH (ORCPT ); Tue, 28 Apr 2020 15:45:07 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B720AC03C1AB; Tue, 28 Apr 2020 12:45:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=ozJ4/VCCoOCPsRdSc3NikpEPmevttfRVGSWHfGtgyPo=; b=X097XksKF4UJYy1M1UQSEzc/TX wSx6mHzP0Pg7Lyy3l4oJPeFr3jUWzn18Hmdo73qxJ84N80PzFceLS+XkuPpVpIyrEczeLGCljKXCA LstVM5ix6YN91UPAre63NSEEuYBVMgjie7FrTjktpVI1GLc3HIEbGm4sDrFKtT0/OtRqaOd9Ycyx2 ZBWbA9d/XkyEioVunlmS82vG+CkUMbDhPi3Tedd2bqVzuc+GclRHpMZxRPwM8w2mZv2BIRUK/XCXd Jmj70qYwEAKbJajKBWiqFVA6zP3P6fux5euO+6RsMsEurvYdTCB3wYrmb6wKKcvG8lbjB+uo/95EP /2EgeWCg==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jTW9y-0005uQ-TN; Tue, 28 Apr 2020 19:44:50 +0000 From: Matthew Wilcox To: linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Will Deacon , Catalin Marinas , Russell King , Geert Uytterhoeven , linux-m68k@lists.linux-m68k.org Subject: [PATCH 1/7] mm: Document x86 uses a linked list of pgds Date: Tue, 28 Apr 2020 12:44:43 -0700 Message-Id: <20200428194449.22615-2-willy@infradead.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200428194449.22615-1-willy@infradead.org> References: <20200428194449.22615-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Matthew Wilcox (Oracle)" x86 uses page->lru of the pages used for pgds, but that's not immediately obvious to anyone looking to make changes. Add a struct list_head to the union so it's clearly in use for pgds. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/mm_types.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 4aba6c0c2ba8..9bb34e2cd5a5 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -142,8 +142,13 @@ struct page { struct list_head deferred_list; }; struct { /* Page table pages */ - unsigned long _pt_pad_1; /* compound_head */ - pgtable_t pmd_huge_pte; /* protected by page->ptl */ + union { + struct list_head pgd_list; /* x86 */ + struct { + unsigned long _pt_pad_1; + pgtable_t pmd_huge_pte; + }; + }; unsigned long _pt_pad_2; /* mapping */ union { struct mm_struct *pt_mm; /* x86 pgds only */ -- 2.26.2