From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758024AbcGKH01 (ORCPT ); Mon, 11 Jul 2016 03:26:27 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:35960 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757969AbcGKH0Z (ORCPT ); Mon, 11 Jul 2016 03:26:25 -0400 Date: Mon, 11 Jul 2016 16:24:17 +0900 From: Sergey Senozhatsky To: Joonsoo Kim Cc: Sergey Senozhatsky , Andrew Morton , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky Subject: Re: [RFC][PATCH v2 3/3] mm/page_owner: track page free call chain Message-ID: <20160711072417.GA524@swordfish> References: <20160708121132.8253-1-sergey.senozhatsky@gmail.com> <20160708121132.8253-4-sergey.senozhatsky@gmail.com> <20160711062115.GC14107@js1304-P5Q-DELUXE> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160711062115.GC14107@js1304-P5Q-DELUXE> User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (07/11/16 15:21), Joonsoo Kim wrote: [..] > > +void __page_owner_free_pages(struct page *page, unsigned int order) > > +{ > > + int i; > > + depot_stack_handle_t handle = save_stack(0); > > + > > + for (i = 0; i < (1 << order); i++) { > > + struct page_ext *page_ext = lookup_page_ext(page + i); > > + > > + if (unlikely(!page_ext)) > > + continue; > > + > > + page_ext->handles[PAGE_OWNER_HANDLE_FREE] = handle; > > + __set_bit(PAGE_EXT_OWNER_FREE, &page_ext->flags); > > + __clear_bit(PAGE_EXT_OWNER_ALLOC, &page_ext->flags); > > + } > > +} > > I can't find any clear function to PAGE_EXT_OWNER_FREE. Isn't it > intended? If so, why? the PAGE_EXT_OWNER_FREE bit is not heavily used now. the only place is this test in __dump_page_owner() if (!test_bit(PAGE_EXT_OWNER_ALLOC, &page_ext->flags) && !test_bit(PAGE_EXT_OWNER_FREE, &page_ext->flags)) { pr_alert("page_owner info is not active (free page?)\n"); return; } other than that it's for symmetry/future use. [..] > > @@ -1073,6 +1073,9 @@ static void pagetypeinfo_showmixedcount_print(struct seq_file *m, > > if (!test_bit(PAGE_EXT_OWNER_ALLOC, &page_ext->flags)) > > continue; > > > > + if (!test_bit(PAGE_EXT_OWNER_FREE, &page_ext->flags)) > > + continue; > > + > > I don't think this line is correct. Above PAGE_EXT_OWNER_ALLOC > check is to find allocated page. you are right. that PAGE_EXT_OWNER_FREE test is wrong, indeed. thanks for spotting. -ss