Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4661062ybz; Tue, 28 Apr 2020 15:56:04 -0700 (PDT) X-Google-Smtp-Source: APiQypLAAY7Um5LIwRa/qCOx4MUSDUzhxiS4NITrzVQD8rh/khQT2ypS7ARlf1k/RagFZtgl9UAS X-Received: by 2002:a17:906:808:: with SMTP id e8mr51511ejd.372.1588114564615; Tue, 28 Apr 2020 15:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588114564; cv=none; d=google.com; s=arc-20160816; b=izfrR2f2qyemPFero4+KGg+SdogAJXDy4j27MlKRiMHQP5cI/sOB4VF3+jT3OQnEnR S3i8dcBMN70UQ59+UZryz1zoPr75majOqDqm67ABW9OBerMoVVMeb64pGuvf+7H+/P7X WHU6S4uxFy3VM35hBVb3/ei5p672PcioNRFzt6GzGLhd+CP32eumBH35aEVaeC6EspU0 A5j9FpNqYrWcKdR0C9TdJl1TfulF+Y6yrmo0xEhuJyfdO7c3zEetRKaqaKa882vHq6Id KHMhI+2BLDWa7DCAtpODPesS4lA+vNRChHfpbeOMCe0ogBPXDrMiiO9IcJI9rGSJC8VI UNdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=F9aCSU3b/Wdv+eJFJpzYKn7Vwg6tH9sCBL5A5XUpJ4o=; b=tnCPxI0szhuQosNganlfJWRP5C5XMXe75QtzZcb/oBH3bMivyBuYAC59+Ps+iXOxxQ zmqEs/4O5LYfLF9q2XBsULI/U1SX8mtSdPEKxkwaZLhy4omIhncouswmF1MSNASUH/rY YyEBlH9IEc/CJ/YnrOD97LjneeYjDzgh2PwCGJeMuDm3MIIPqqSN7IBIYdPn33AGKSh7 yXib74nVElEk+2kuZOgdAyKk985i/CQW5LZEJ3rVF1r43Gu7MypVWvUbnCGsT439koL9 o5LXTMJO/TnTC8VkLTPcc/pabHg3oafVKA+Pq9w0eEl5tZVAs8+PkCGAidZgt9Z6FJfS Bn8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=d4rtNymu; 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 dp18si3337623ejc.498.2020.04.28.15.55.17; Tue, 28 Apr 2020 15:56:04 -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=d4rtNymu; 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 S1726509AbgD1Ww4 (ORCPT + 99 others); Tue, 28 Apr 2020 18:52:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726042AbgD1Wwz (ORCPT ); Tue, 28 Apr 2020 18:52:55 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FB14C03C1AC; Tue, 28 Apr 2020 15:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=F9aCSU3b/Wdv+eJFJpzYKn7Vwg6tH9sCBL5A5XUpJ4o=; b=d4rtNymuOqppTdZC6DJck2NtJL kjY0+YaEI3w4ebKpcllV7qIhx/P1D+TCuaw3XpmPMqUZhgkznKZ8dv3o7HSGtFWRi35AM13gWXI2S +oe/7fHyUfs7Zg1Iyx/H86z7wDagVQVC0Vw0zbn9kBL7S6XNudqlpL3qU0hLsMkj9rjjyFlJ3tmyd mdxPiXctEgyIcVboBqHvfOM8AKNoZ2bC+gQC1tYQQcDHXbQf81Hgr33ITRo7Bcm44ykPAgtX6mknN c3xC7RBbMjR3phdMIKElDEQ5j3uTQ4w0MWqdcEk5J8MxHaV542ZrfutfYx3ov4O5RY21sJiVzaivg 5RFmQQdw==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jTZ5w-0008Qz-1R; Tue, 28 Apr 2020 22:52:52 +0000 Date: Tue, 28 Apr 2020 15:52:51 -0700 From: Matthew Wilcox To: Ira Weiny Cc: linux-mm@kvack.org, 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: Re: [PATCH 1/7] mm: Document x86 uses a linked list of pgds Message-ID: <20200428225251.GM29705@bombadil.infradead.org> References: <20200428194449.22615-1-willy@infradead.org> <20200428194449.22615-2-willy@infradead.org> <20200428214109.GB406458@iweiny-DESK2.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200428214109.GB406458@iweiny-DESK2.sc.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 28, 2020 at 02:41:09PM -0700, Ira Weiny wrote: > On Tue, Apr 28, 2020 at 12:44:43PM -0700, Matthew Wilcox wrote: > > 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. > > Shouldn't pgd_list_{add,del}() use this list head variable instead of lru to > complete the documentation? > > Probably the list iteration loops arch/x86/* as well? Yes, but I felt that was out of scope for this patchset. Untangling the uses of struct page is a long and messy business; if we have to fix everything at once, we'll never get anywhere. There's also the slab users of page->lru instead of page->slab_list. What I actually want to get to is: struct page { unsigned long flags; union { struct file_page file; struct anon_page anon; struct pt_page pt; struct slab_page slab; struct tail_page tail; struct rcu_head rcu; }; union { atomic_t _mapcount; ... }; atomic_t refcount; ... }; and then we can refer to page->pt.list and so on.