linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	aarcange@redhat.com, linux-mm@kvack.org
Subject: Re: [PATCH] mm/page_alloc.c: drop dead destroy_compound_page()
Date: Thu,  8 Jan 2015 16:10:04 +0200 (EET)	[thread overview]
Message-ID: <20150108141004.AB3461A2@black.fi.intel.com> (raw)
In-Reply-To: <20150107134039.25d4edfad92b62f3eee8b570@linux-foundation.org>

Andrew Morton wrote:
> On Mon,  5 Jan 2015 13:46:22 +0200 "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> wrote:
> 
> > The only caller is __free_one_page(). By the time we should have
> > page->flags to be cleared already:
> > 
> >  - for 0-order pages though PCP list:
> > 	free_hot_cold_page()
> > 		free_pages_prepare()
> > 			free_pages_check()
> > 				page->flags &= ~PAGE_FLAGS_CHECK_AT_PREP;
> > 		<put the page to PCP list>
> > 
> > 	free_pcppages_bulk()
> > 		page = <withdraw pages from PCP list>
> > 		__free_one_page(page)
> > 
> >  - for non-0-order pages:
> > 	__free_pages_ok()
> > 		free_pages_prepare()
> > 			free_pages_check()
> > 				page->flags &= ~PAGE_FLAGS_CHECK_AT_PREP;
> > 		free_one_page()
> > 			__free_one_page()
> > 
> > So there's no way PageCompound() will return true in __free_one_page().
> > Let's remove dead destroy_compound_page() and put assert for page->flags
> > there instead.
> 
> Well.  An alternative would be to fix up the call site so those
> useful-looking checks actually get to check things.  Perhaps under
> CONFIG_DEBUG_VM.

Something like this?

  reply	other threads:[~2015-01-08 14:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-05 11:46 [PATCH] mm/page_alloc.c: drop dead destroy_compound_page() Kirill A. Shutemov
2015-01-06 17:43 ` Vlastimil Babka
2015-01-06 18:29   ` Kirill A. Shutemov
2015-01-07 21:40 ` Andrew Morton
2015-01-08 14:10   ` Kirill A. Shutemov [this message]
2015-01-10  0:24     ` Andrew Morton
2015-01-10  0:41       ` Kirill A. Shutemov
2015-01-10  1:06         ` Andrew Morton
2015-01-10  1:15           ` Kirill A. Shutemov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150108141004.AB3461A2@black.fi.intel.com \
    --to=kirill.shutemov@linux.intel.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).