• Kirill Smelkov's avatar
    bigfile/tests/thread: Don't invalidate exactly same page to test general... · b0d1e540
    Kirill Smelkov authored
    bigfile/tests/thread: Don't invalidate exactly same page to test general virtmem deadlock on loadblk
    
    The main deadlock described in f49c11a3 (bigfile/virtmem: Do loadblk()
    with virtmem lock released) (V,Z in T1; Z,V in T2) can happen if in T2 V
    is taken for whatever reason - e.g. for invalidating completely
    unrelated page to what is being loaded in T1.
    
    For invalidation of the same page we have explicit separate
    test_thread_load_vs_invalidate() which verifies how loadblk handles this
    situation.
    
    This patch prepares general test_thread_lock_vs_virtmem_lock() to also
    test V vs Z deadlock for storeblk() case - when it will be called with
    virtmem lock released: for storeblk it will be forbidden by virtmem
    rules to invalidate pages of fileh for which writeout is in progress.
    
    Updates: nexedi/wendelin.core#6
    b0d1e540
test_thread.py 6.52 KB