ptep_test_and_clear_young() i386 vs. x86_64

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Date: Friday, September 21, 2007 - 3:14 pm

Hi All!

Is there any special reason why ptep_test_and_clear_young()
implementation for x86_64 does not call pte_update()?

Compare the following:

include/asm-x86_64/pgtable.h:

static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, 
unsigned long addr, pte_t *ptep)
{
        if (!pte_young(*ptep))
               return 0;
        return test_and_clear_bit(_PAGE_BIT_ACCESSED, &ptep->pte);

}

include/asm-i386/pgtable.h:

#define ptep_test_and_clear_young(vma, addr, ptep) ({                   \
        int __ret = 0;                                                  \
        if (pte_young(*(ptep)))                                         \
                __ret = test_and_clear_bit(_PAGE_BIT_ACCESSED,          \
                                                &(ptep)->pte_low);       \
        if (__ret)                                                      \
                pte_update((vma)->vm_mm, addr, ptep);                   
     \
        __ret;                                                          \

})


Slava

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ptep_test_and_clear_young() i386 vs. x86_64 , Slava Abramov, (Fri Sep 21, 3:14 pm)
Re: ptep_test_and_clear_young() i386 vs. x86_64 , Hugh Dickins, (Fri Sep 21, 3:42 pm)