Michal Hocko <mhocko@xxxxxxx> writes: > On Thu 14-06-12 19:26:18, Aneesh Kumar K.V wrote: >> From: "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxxxxxxxxxx> >> >> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx> >> --- >> include/linux/hugetlb.h | 2 +- >> mm/hugetlb.c | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h >> index 9650bb1..0f0877e 100644 >> --- a/include/linux/hugetlb.h >> +++ b/include/linux/hugetlb.h >> @@ -23,7 +23,7 @@ struct hugepage_subpool { >> }; >> >> extern spinlock_t hugetlb_lock; >> -extern int hugetlb_max_hstate; >> +extern int hugetlb_max_hstate __read_mostly; > > It should be used only for definition > I looked at the rest of the source and found multiple place where we specify __read_mostly in extern. arch/x86/kernel/cpu/perf_event.h extern struct x86_pmu x86_pmu __read_mostly; arch/x86/kernel/cpu/perf_event.h extern u64 __read_mostly hw_cache_event_ids arch/x86/kernel/cpu/perf_event.h extern u64 __read_mostly hw_cache_extra_regs drivers/gpu/drm/i915/i915_drv.h extern int i915_panel_ignore_lid __read_mostly; drivers/gpu/drm/i915/i915_drv.h extern unsigned int i915_powersave __read_mostly; drivers/gpu/drm/i915/i915_drv.h extern int i915_semaphores __read_mostly; drivers/gpu/drm/i915/i915_drv.h extern unsigned int i915_lvds_downclock __read_mostly; drivers/gpu/drm/i915/i915_drv.h extern int i915_lvds_channel_mode __read_mostly; drivers/gpu/drm/i915/i915_drv.h extern int i915_panel_use_ssc __read_mostly; drivers/gpu/drm/i915/i915_drv.h extern int i915_vbt_sdvo_panel_type __read_mostly; drivers/gpu/drm/i915/i915_drv.h extern int i915_enable_rc6 __read_mostly; drivers/gpu/drm/i915/i915_drv.h extern int i915_enable_fbc __read_mostly; drivers/gpu/drm/i915/i915_drv.h extern bool i915_enable_hangcheck __read_mostly; drivers/gpu/drm/i915/i915_drv.h extern int i915_enable_ppgtt __read_mostly; -aneesh -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>