The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Valentin Rothberg <valentinrothberg@gmail.com>
Cc: rostedt@goodmis.org, mingo@redhat.com,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	ziegler@cs.fau.de, Paul Bolle <pebolle@tiscali.nl>
Subject: Re: compaction.h: undefined CONFIG_ZONE_HIGHMEM_
Date: Wed, 23 Sep 2015 11:34:33 +0200	[thread overview]
Message-ID: <56027229.40206@suse.cz> (raw)
In-Reply-To: <20150923084320.GA16863@ubuntu-vm>

On 09/23/2015 10:43 AM, Valentin Rothberg wrote:
> Hi Vlastimil,
> 
> your commit 1434c81a47e3 ("mm, compaction: export tracepoints zone names
> to userspace") has shown up in todays linux-next tree (i.e., 20150923)
> adding the following lines of code:
> 
> --- a/include/trace/events/compaction.h
> +++ b/include/trace/events/compaction.h
> @@ -18,6 +18,31 @@
> [...]
> +#ifdef CONFIG_ZONE_HIGHMEM_
> +#define IFDEF_ZONE_HIGHMEM(X) X
> +#else
> +#define IFDEF_ZONE_HIGHMEM(X)
> +#endif
> 
> At the current state, the #ifdef block will not see a compiler since
> CONFIG_ZONE_HIGHMEM_ is not defined anywhere. 

Ah damn, that's why a simple compile test won't catch this typo.

> At first I thought it's a
> typo as it ends with '_', but even ZONE_HIGHMEM isn't defined in
> Kconfig.  Is there a patch queued somewhere to fix the issue?

It's actually just CONFIG_HIGHMEM (who needs consistency anyway?). Patch
below. I didn't rename the IFDEF_ZONE_HIGHMEM as it's internal.

When looking at zone_names I've noticed a CONFIG_ZONE_DEVICE. I assume
compaction can't be run on this one so I'll ignore it. At worst the
tracepoint string would be missing.

> I detected the issue with undertaker-checkpatch from [1].  We run a
> bot daily on linux-next to detect some Kconfig related issues and
> bugs.

Yeah I've heard about it on last year's Plumbers. Thanks for catching this!

> Kind regards, Valentin
> 
> [1] https://undertaker.cs.fau.de

------8<------
From: Vlastimil Babka <vbabka@suse.cz>
Date: Wed, 23 Sep 2015 11:31:10 +0200
Subject: [PATCH] mm, compaction: export tracepoints zone names to
 userspace-fix

Through undertaker-checkpatch it was reported that HighMem would be missing
in the tracepoint output due to checking CONFIG_ZONE_HIGHMEM_ instead of
CONFIG_HIGHMEM. Fix it.

Reported-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
---
 include/trace/events/compaction.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/trace/events/compaction.h b/include/trace/events/compaction.h
index 5604994..c92d1e1 100644
--- a/include/trace/events/compaction.h
+++ b/include/trace/events/compaction.h
@@ -31,7 +31,7 @@
 #define IFDEF_ZONE_DMA32(X)
 #endif
 
-#ifdef CONFIG_ZONE_HIGHMEM_
+#ifdef CONFIG_HIGHMEM
 #define IFDEF_ZONE_HIGHMEM(X) X
 #else
 #define IFDEF_ZONE_HIGHMEM(X)
-- 
2.5.1



 


  reply	other threads:[~2015-09-23  9:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-23  8:43 compaction.h: undefined CONFIG_ZONE_HIGHMEM_ Valentin Rothberg
2015-09-23  9:34 ` Vlastimil Babka [this message]
2015-09-23 10:13   ` Valentin Rothberg

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=56027229.40206@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pebolle@tiscali.nl \
    --cc=rostedt@goodmis.org \
    --cc=valentinrothberg@gmail.com \
    --cc=ziegler@cs.fau.de \
    /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