Hi all,
I'm encountering a deadlock problem within kernel(2.4.19smp):
A lot of data writen into a network file system and the physical memory is almost exhausted, so that the kswapd calls the kswapd_balance -> try_to_free_pages->...->shrink_cache try to free a dirty page(just name it PageA) of the file system. the file system's writepage locks the page and sends the data to a dedicated process (named ProcB)of this file system in the same node which just send the data to remote server. ProcB communicates with server by TCP/IP. when the TCP/IP layer try to alloc a free page for transmission, it also arouse the kernel to free some dirty pages, what's a pity, the PageA has been selected. Since it's locked now , the shrink_cache just calls on wait_on_page, thus a big deadlock is generated.
Is it a bug? if not, please give me some advice on how to just out of this cycle.
Thanks
Rongfeng