linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Oscar Salvador <osalvador@techadventures.net>
Cc: linux-mm@kvack.org, mhocko@suse.com, vbabka@suse.cz,
	jaewon31.kim@samsung.com
Subject: Re: [PATCH] mm/page_ext.c: Make page_ext_init a noop when CONFIG_PAGE_EXTENSION but nothing uses it
Date: Thu, 11 Jan 2018 16:43:15 -0800	[thread overview]
Message-ID: <20180111164315.ca96f3ca533ee6684269d7f5@linux-foundation.org> (raw)
In-Reply-To: <20180105130235.GA21241@techadventures.net>

On Fri, 5 Jan 2018 14:02:35 +0100 Oscar Salvador <osalvador@techadventures.net> wrote:

> static struct page_ext_operations *page_ext_ops[] always contains debug_guardpage_ops,
> 
> static struct page_ext_operations *page_ext_ops[] = {
>         &debug_guardpage_ops,
>  #ifdef CONFIG_PAGE_OWNER
>         &page_owner_ops,
>  #endif
> ...
> }
> 
> but for it to work, CONFIG_DEBUG_PAGEALLOC must be enabled first.
> If someone has CONFIG_PAGE_EXTENSION, but has none of its users,
> eg: (CONFIG_PAGE_OWNER, CONFIG_DEBUG_PAGEALLOC, CONFIG_IDLE_PAGE_TRACKING), we can shrink page_ext_init()
> to a simple retq.
> 
> $ size vmlinux  (before patch)
>    text	   data	    bss	    dec	    hex	filename
> 14356698	5681582	1687748	21726028	14b834c	vmlinux
> 
> $ size vmlinux  (after patch)
>    text	   data	    bss	    dec	    hex	filename
> 14356008	5681538	1687748	21725294	14b806e	vmlinux
> 
> On the other hand, it might does not even make sense, since if someone
> enables CONFIG_PAGE_EXTENSION, I would expect him to enable also at least
> one of its users, but I wanted to see what you guys think.

Presumably the CONFIG_PAGE_EXTENSION users should `select'
CONFIG_PAGE_EXTENSION so the situation doesn't arise.

(or does it?  I have a vague memory that if CONFIG_A selects CONFIG_B
and you then set CONFIG_A=n, CONFIG_B remains enabled?)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2018-01-12  0:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05 13:02 Oscar Salvador
2018-01-12  0:43 ` Andrew Morton [this message]

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=20180111164315.ca96f3ca533ee6684269d7f5@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=jaewon31.kim@samsung.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=osalvador@techadventures.net \
    --cc=vbabka@suse.cz \
    /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