• Andrew Morton's avatar
    [PATCH] s390: physical dirty/referenced bits. · 465235cb
    Andrew Morton authored
    From: Martin Schwidefsky <schwidefsky@de.ibm.com>
    
    this is another s/390 related mm patch. It introduces the concept of
    physical dirty and referenced bits into the common mm code. I always
    had the nagging feeling that the pte functions for setting/clearing
    the dirty and referenced bits are not appropriate for s/390. It works
    but it is a bit of a hack. 
    After the wake of rmap it is now possible to put a much better solution
    into place. The idea is simple: since there are not dirty/referenced
    bits in the pte make these function nops on s/390 and add operations
    on the physical page to the appropriate places. For the referenced bit
    this is the page_referenced() function. For the dirty bit there are
    two relevant spots: in page_remove_rmap after the last user of the
    page removed its reverse mapping and in try_to_unmap after the last
    user was unmapped. There are two new functions to accomplish this:
    
     * page_test_and_clear_dirty: Test and clear the dirty bit of a
       physical page. This function is analog to ptep_test_and_clear_dirty
       but gets a struct page as argument instead of a pte_t pointer.
    
     * page_test_and_clear_young: Test and clear the referenced bit
       of a physical page. This function is analog to ptep_test_and_clear_young
       but gets a struct page as argument instead of a pte_t pointer.
    
    Its pretty straightforward and with it the s/390 mm makes much more
    sense. You'll need the tls flush optimization patch for the patch.
    Comments ?
    465235cb
rmap.c 13.7 KB