2004-04-27 08:30:06

by Rongfeng Tang

[permalink] [raw]
Subject: deadlock encountered for my network file system

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


Attachments:
fox.gif (9.30 kB)