linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Hillf Danton" <hillf.zj@alibaba-inc.com>
To: "'Jérémy Lefaure'" <jeremy.lefaure@lse.epita.fr>,
	"'Andrew Morton'" <akpm@linux-foundation.org>,
	"'Kirill A. Shutemov'" <kirill.shutemov@linux.intel.com>
Cc: linux-mm@kvack.org
Subject: Re: [PATCH] thb: propagate conditional compilation to code depending on sysfs in khugepaged.c
Date: Mon, 14 Nov 2016 11:16:21 +0800	[thread overview]
Message-ID: <024001d23e25$79591900$6c0b4b00$@alibaba-inc.com> (raw)
In-Reply-To: <20161113033328.9250-1-jeremy.lefaure@lse.epita.fr>

> 
> Commit b46e756f5e47 ("thp: extract khugepaged from mm/huge_memory.c")
> moved code from huge_memory.c to khugepaged.c. Some of this code should
> be compiled only when CONFIG_SYSFS is enabled but the condition around
> this code was not moved into khugepaged.c. The result is a compilation
> error when CONFIG_SYSFS is disabled:
> 
> mm/built-in.o: In function `khugepaged_defrag_store':
> khugepaged.c:(.text+0x2d095): undefined reference to
> `single_hugepage_flag_store'
> mm/built-in.o: In function `khugepaged_defrag_show':
> khugepaged.c:(.text+0x2d0ab): undefined reference to
> `single_hugepage_flag_show'
> 
> This commit adds the #ifdef CONFIG_SYSFS around the code related to
> sysfs.
> 
> Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
> ---

Hey, can you spin with the subject line corrected, please?

>  mm/khugepaged.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/mm/khugepaged.c b/mm/khugepaged.c
> index 728d779..87e1a7ca 100644
> --- a/mm/khugepaged.c
> +++ b/mm/khugepaged.c
> @@ -103,6 +103,7 @@ static struct khugepaged_scan khugepaged_scan = {
>  	.mm_head = LIST_HEAD_INIT(khugepaged_scan.mm_head),
>  };
> 
> +#ifdef CONFIG_SYSFS
>  static ssize_t scan_sleep_millisecs_show(struct kobject *kobj,
>  					 struct kobj_attribute *attr,
>  					 char *buf)
> @@ -295,6 +296,7 @@ struct attribute_group khugepaged_attr_group = {
>  	.attrs = khugepaged_attr,
>  	.name = "khugepaged",
>  };
> +#endif /* CONFIG_SYSFS */
> 
>  #define VM_NO_KHUGEPAGED (VM_SPECIAL | VM_HUGETLB)
> 
> --
> 2.10.2
> 

--
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:[~2016-11-14  3:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-13  3:33 Jérémy Lefaure
2016-11-14  3:16 ` Hillf Danton [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='024001d23e25$79591900$6c0b4b00$@alibaba-inc.com' \
    --to=hillf.zj@alibaba-inc.com \
    --cc=akpm@linux-foundation.org \
    --cc=jeremy.lefaure@lse.epita.fr \
    --cc=kirill.shutemov@linux.intel.com \
    --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