RE: [RFC PATCH] Add TRACE_IRQFLAGS_SUPPORT, LOCKDEP_SUPPORT thenenable ftrace for ia64

From: Luck, Tony
Date: Thu Sep 03 2009 - 12:03:16 EST


> > #ifdef CONFIG_LOCKDEP
> > #define PERCPU_PAGE_SHIFT 20 /* Need a Megabyte for lockdep */
> > #else
> > #define PERCPU_PAGE_SHIFT 16 /* 64K should be enough for normal use */
> > #endif
>
> Hmm, isn't all that percpu stuff in a special section, who's size you
> can query at boot time and set-up accordingly?

The size is a build time parameter (must match with a supported TLB page
size for ia64 ... i.e. even power of two ... so 64K, 256K, 1M, 4M are all
possible, but 128K, 512K, 2M, ... are not).

Any code that includes the right header files can look at PERCPU_PAGE_SHIFT
(or PERCPU_PAGE_SIZE) and make decisions about things. But in the
lockdep case the extra percpu space is statically allocated, so the special
section overflows and results in a build failure.

-Tony



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/