Received: by 10.213.65.68 with SMTP id h4csp881538imn; Thu, 22 Mar 2018 10:35:52 -0700 (PDT) X-Google-Smtp-Source: AG47ELvpJr2xzHyTylg4mkWBLXYaQpF8/NzDyupAJz+e+0sXkmMYh+nM0Y3zQAQArWjALPZg1Nx6 X-Received: by 2002:a17:902:9:: with SMTP id 9-v6mr26888683pla.42.1521740152439; Thu, 22 Mar 2018 10:35:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521740152; cv=none; d=google.com; s=arc-20160816; b=ghYvzS820aU1ycpnQmImZpJLawlqN7qMvah5lwNA31T0Oy9RRz9QvB+hD7qK8sYwzg UdJfzx8NOtKCnF6Bx72ADgAQTv1MKR7MZdFQPfskzSSfz3hs1ZFfM05kj+a+DWxb3II1 kQrduopn8niZ7bqrE6l0R3s/jM4vs8nORwG4g6Q+Ovi4zbL73MOGd12YRW2vfhELyTGv AjdpsfAUGbCgUi/KE+rjkbF4I5MScLJcQP9TbT8fvfgkslQrJDMtsBmsRhXLxgapFwgj xmnRvSsWn8Pogjc8IWlFbhOFhxjgJn3wx2PNIumDa8RR5uMbGOZYm1jjvJCn25ydjOn1 yMWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=q3l50dafrbBaNP2ALxBSevzoDEYws3qoRZlCVSGN1XM=; b=j11MZzNRMOKSuw0XZXWAM4f+0mMXhPSKobmrqCylrcuR5HH6VeZx7h61KI1KzXneaz gWRFfqFRhQs4hro7A6TWRdYOQlmO2bjYPUsgkDNnbaAQkaeFIoM63AIhowcLiIe7qrMQ 12r3EM7EBBdno0fnwR2JXOX8RUEKQjojHZ9crmJlyzWalbhd/QWezbNhSeDHFLztZFD4 cqZe25dJYSooJ6qINbkvLcwuZ3HMS+Vtvo3CbkpxTNmiWaXyezpl9GYLlg9y4gBoj0kX OcZ+j6T68eNgMUt2Zm0eNJdluADfb3gvOOONNN73rHhJnkNgzWJqyFVYf3bm1vR7J/0A hAoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UeuU7/LA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e20si5087589pfi.359.2018.03.22.10.35.36; Thu, 22 Mar 2018 10:35:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UeuU7/LA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751848AbeCVRem (ORCPT + 99 others); Thu, 22 Mar 2018 13:34:42 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34036 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751796AbeCVRei (ORCPT ); Thu, 22 Mar 2018 13:34:38 -0400 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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=q3l50dafrbBaNP2ALxBSevzoDEYws3qoRZlCVSGN1XM=; b=UeuU7/LARqFi0Jk+i7CfxgaG8 T6zBTJJFlul25tV01wA3OxnEpWkW5ODooBR2iVHDrWFBKNAoQT/r/DpMhdN90Qb/sJu27OZLN27xn DNeZxqZ309X5RQ/s+5NjtLB/itWoUqhCi2tqtdTvexQpInxe7cbsfR7XwTziLB7QVNKztNs+Mflpf RTfjtax8i4xM2NhgvRk1eRyCB8rwyDMbwk/orCzQeJR/kSXPRGr0Knk4qAs+5b8Qu59JXgpTgP0/R n3IUU650On5Qjzh1DyjQncqW9c94Nf9l9JyVie/dDm+etNTzfXLQOu4oE98zBGrKml4wNg2cGsYJ6 zUcpHtAEQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1ez3ns-0001Z7-Eq; Thu, 22 Mar 2018 17:15:04 +0000 Date: Thu, 22 Mar 2018 10:15:03 -0700 From: Matthew Wilcox To: Aaron Lu Cc: Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Huang Ying , Dave Hansen , Kemi Wang , Tim Chen , Andi Kleen , Michal Hocko , Mel Gorman , Daniel Jordan Subject: Re: [RFC PATCH v2 2/4] mm/__free_one_page: skip merge for order-0 page unless compaction failed Message-ID: <20180322171503.GH28468@bombadil.infradead.org> References: <20180320085452.24641-1-aaron.lu@intel.com> <20180320085452.24641-3-aaron.lu@intel.com> <7b1988e9-7d50-d55e-7590-20426fb257af@suse.cz> <20180320141101.GB2033@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180320141101.GB2033@intel.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 20, 2018 at 10:11:01PM +0800, Aaron Lu wrote: > > > A new document file called "struct_page_filed" is added to explain > > > the newly reused field in "struct page". > > > > Sounds rather ad-hoc for a single field, I'd rather document it via > > comments. > > Dave would like to have a document to explain all those "struct page" > fields that are repurposed under different scenarios and this is the > very start of the document :-) > > I probably should have explained the intent of the document more. Dave and I are in agreement on "Shouldn't struct page be better documented". I came up with this a few weeks ago; never quite got round to turning it into a patch: +---+-----------+-----------+--------------+----------+--------+--------------+ | B | slab | pagecache | tail 1 | anon | tail 1 | hugetlb | +===+===========+===========+==============+==========+========+==============+ | 0 | flags | +---+ | | 4 | | +---+-----------+-----------+--------------+----------+--------+--------------+ | 8 | s_mem | mapping | cmp_mapcount | anon_vma | defer | mapping | +---+ | +--------------+ | list | | |12 | | | | | | | +---+-----------+-----------+--------------+----------+ +--------------+ |16 | freelist | index | | index | +---+ | | | (shifted) | |20 | | | | | +---+-----------+-------------------------------------+--------+--------------+ |24 | counters | mapcount | +---+ +-----------+--------------+----------+--------+--------------+ |28 | | refcount | | | | refcount | +---+-----------+-----------+--------------+----------+--------+--------------+ |32 | next | lru | cmpd_head | | lru | +---+ | | +-------------------+ + |36 | | | | | | +---+-----------+ +--------------+-------------------+ + |40 | pages | | dtor / order | | | +---+-----------+ +--------------+-------------------+ + |44 | pobjects | | | | | +---+-----------+-----------+--------------+----------------------------------+ |48 | slb_cache | private | | | +---+ | +--------------+----------------------------------+ |52 | | | | | +---+-----------+-----------+--------------+----------------------------------+