Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1440313

Re: [RFC][PATCH v2 3/3] mm/page_owner: track page free call chain

From Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH v2 3/3] mm/page_owner: track page free call chain
Date 2016-07-11 09:30 +0200
Message-ID <rTDPb-3Uh-9@gated-at.bofh.it> (permalink)
References <rSCVb-4Fq-5@gated-at.bofh.it> <rSCVc-4Fq-15@gated-at.bofh.it> <rTCJs-3gm-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC][PATCH v2 0/3] mm/page:_owner: track page free call chain Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-07-08 14:20 +0200
  [RFC][PATCH v2 3/3] mm/page_owner: track page free call chain Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-07-08 14:20 +0200
    Re: [RFC][PATCH v2 3/3] mm/page_owner: track page free call chain Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-07-11 08:20 +0200
      Re: [RFC][PATCH v2 3/3] mm/page_owner: track page free call chain Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-07-11 09:30 +0200
    [PATCH 3/3] mm/page_owner: track page free call chain Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-07-11 16:30 +0200
  [RFC][PATCH v2 2/3] mm/page_owner: rename PAGE_EXT_OWNER flag Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-07-08 14:20 +0200
  [RFC][PATCH v2 1/3] mm/page_owner: rename page_owner functions Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-07-08 14:20 +0200

csiph-web