Comment 8 for bug 1824827

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Verification successful on Cosmic.

Updated the test-case kernel part (attached), and repeated it 20+ times, without any process hanging.

In all cases, the new function call into write_cache_pages() is observed in thread 0, between page index 2 and page index 1.

[ 150.914872] mod_init():161 :: hello
[ 150.917828] mod_init():207 :: kernel version: prop/-19/cosmic

[ 150.950322] Program running, TID = 1429
[ 150.951566] kp1_pre_handler():073 :: state 0 .... :: pid = 1429, mapping = 0xffff8abcba385570, comm = 'test'
[ 150.954205] kp1_pre_handler():082 :: state 0 -> 1 :: pid = 1429, mapping = 0xffff8abcba385570
[ 150.956518] kp2_pre_handler():122 :: state 1 .... :: pid = 1429, page index = 1
[ 150.958410] kp3_pre_handler():147 :: state 1 .... :: pid = 1429, page index = 1, calling writepage()
[ 150.961047] kp2_pre_handler():122 :: state 1 .... :: pid = 1429, page index = 2
[ 150.964788] kp3_pre_handler():147 :: state 1 .... :: pid = 1429, page index = 2, calling writepage()

[ 151.973660] Thread 0 running, TID = 1430!
[ 151.977071] kp1_pre_handler():073 :: state 1 .... :: pid = 7, mapping = 0xffff8abcba385570, comm = 'kworker/u8:0'
[ 151.984836] kp1_pre_handler():104 :: state 1 -> 2 :: pid = 7, mapping = 0xffff8abcba385570, comm ('kworker/u8:0') is kworker AND wbc->range_cyclic (0x1) is true AND mapping->writeback_index (0x2) is 0x2.
[ 152.017726] kp2_pre_handler():122 :: state 2 .... :: pid = 7, page index = 2
[ 152.027193] kp3_pre_handler():147 :: state 2 .... :: pid = 7, page index = 2, calling writepage()
[ 152.038466] kp1_pre_handler():073 :: state 2 .... :: pid = 7, mapping = 0xffff8abcba385570, comm = 'kworker/u8:0'
[ 152.048736] kp2_pre_handler():122 :: state 2 .... :: pid = 7, page index = 1
[ 152.056642] kp2_pre_handler():126 :: state 2 -> 3 :: pid = 7, page index = 1, spin 5 seconds before lock_page()...

[ 152.973731] Thread 1 running, TID = 1431!
[ 152.974943] kp1_pre_handler():073 :: state 3 .... :: pid = 1431, mapping = 0xffff8abcba385570, comm = 'test'
[ 152.977489] kp2_pre_handler():122 :: state 3 .... :: pid = 1431, page index = 1
[ 152.979140] kp3_pre_handler():147 :: state 3 .... :: pid = 1431, page index = 1, calling writepage()
[ 152.981928] kp2_pre_handler():122 :: state 3 .... :: pid = 1431, page index = 2

[ 153.973895] Thread 2 running, TID = 1432!
[ 153.975160] kp1_pre_handler():073 :: state 3 .... :: pid = 1432, mapping = 0xffff8abcba385570, comm = 'test'
[ 153.978573] kp2_pre_handler():122 :: state 3 .... :: pid = 1432, page index = 1
[ 157.033588] kp2_pre_handler():130 :: state 3 -> 4 :: pid = 7, page index = 1, spun 5 seconds before lock_page().
[ 157.036151] kp3_pre_handler():147 :: state 4 .... :: pid = 1431, page index = 2, calling writepage()
[ 157.038804] kp3_pre_handler():147 :: state 4 .... :: pid = 1432, page index = 1, calling writepage()
[ 157.041212] kp2_pre_handler():122 :: state 4 .... :: pid = 1432, page index = 2
[ 157.058880] mod_exit():230 :: bye