Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> writes: > On Thu, 2014-01-02 at 16:22 +0530, Aneesh Kumar K.V wrote: >> > Just use config option directly: >> > >> > if (new_ptl != old_ptl || >> > IS_ENABLED(CONFIG_ARCH_THP_MOVE_PMD_ALWAYS_WITHDRAW)) >> >> >> I didn't like that. I found the earlier one easier for reading. >> If you and others strongly feel about this, I can redo the patch. >> Please let me know > > Yes, use IS_ENABLED, no need to have two indirections of #define's > > Another option is to have > > if (pmd_move_must_withdraw(new,old)) { > } > > With in a generic header: > > #ifndef pmd_move_must_withdraw > static inline bool pmd_move_must_withdraw(spinlock_t *new_ptl, ...) > { > return new_ptl != old_ptl; > } > #endif > > And in powerpc: > > static inline bool pmd_move_must_withdraw(spinlock_t *new_ptl, ...) > { > return true; > } > #define pmd_move_must_withdraw pmd_move_must_withdraw This is better i guess. It is also in-line with rest of transparent hugepage functions. I will do this. -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>