From: Bernd Schubert Subject: deadlock balance_dirty_pages() to be expected? Date: Fri, 07 Oct 2011 14:34:33 +0200 Message-ID: <4E8EF1D9.8050700@itwm.fraunhofer.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Wu Fengguang To: linux-fsdevel@vger.kernel.org Return-path: Received: from mailgw1.uni-kl.de ([131.246.120.220]:58792 "EHLO mailgw1.uni-kl.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752498Ab1JGMeh (ORCPT ); Fri, 7 Oct 2011 08:34:37 -0400 Received: from itwm2.itwm.fhg.de (itwm2.itwm.fhg.de [131.246.191.3]) by mailgw1.uni-kl.de (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p97CYYuw023322 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT) for ; Fri, 7 Oct 2011 14:34:35 +0200 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hello, while I'm working on the page cached mode in FhGFS (*) I noticed a deadlock in balance_dirty_pages(). sysrq-w showed that it never started background write-out due to if (bdi_nr_reclaimable > bdi_thresh) { pages_written += writeback_inodes_wb(&bdi->wb, (write_chunk); and therefore also did not leave that loop with if (pages_written >= write_chunk) break; /* We've done our duty */ So my process stay in uninterruptible D-state forever. Once I added basic inode->i_data.backing_dev_info bdi support to our file system, the deadlock did not happen anymore. So my question is simply if we should expect this deadlock, if the file system does not set up backing device information and if so, shouldn't this be documented? Thanks, Bernd PS: While FhGFS has a proprietary license right now, we will soon at least provide the client kernel modules under the GPL.