On Thu, 17 Sep 2015 22:31:52 +0300 Cyrill Gorcunov <gorcunov@xxxxxxxxx> wrote: > Thus when CONFIG_MEM_SOFT_DIRTY = n, the unuse_pte will be the same > as it were without the patch, calling pte_same. > > Now to the bit itself > > #ifdef CONFIG_MEM_SOFT_DIRTY > #define _PAGE_SWP_SOFT_DIRTY_PAGE_PSE > #else > #define _PAGE_SWP_SOFT_DIRTY_PAGE_PSE(_AT(pteval_t, 0)) > #endif > > it's 0 if CONFIG_MEM_SOFT_DIRTY=n, so any setup of this > bit will simply become nop Ok, that is what I have been missing with my soft dirty patch for s390. _PAGE_BIT_SOFT_DIRTY is always defined but the _PAGE_SOFT_DIRTY and _PAGE_SWP_SOFT_DIRTY are conditional. The primitives are always defined but turn into nops with CONFIG_MEM_SOFT_DIRTY=n. > #ifdef CONFIG_HAVE_ARCH_SOFT_DIRTY > static inline pte_t pte_swp_mksoft_dirty(pte_t pte) > { > return pte_set_flags(pte, _PAGE_SWP_SOFT_DIRTY); > } > > static inline int pte_swp_soft_dirty(pte_t pte) > { > return pte_flags(pte) & _PAGE_SWP_SOFT_DIRTY; > } > > static inline pte_t pte_swp_clear_soft_dirty(pte_t pte) > { > return pte_clear_flags(pte, _PAGE_SWP_SOFT_DIRTY); > } > #endif > > So I fear I'm lost where this "set" of the bit comes from > when CONFIG_MEM_SOFT_DIRTY=n. > > Martin, could you please elaborate? Seems I'm missing > something obvious. It is me who missed something.. thanks for the explanation. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. -- 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>