From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH 3/3 v2] mm: Avoid resetting wb_start after each writeback round Date: Thu, 5 Aug 2010 17:21:07 -0700 Message-ID: <20100805172107.703ccf77.akpm@linux-foundation.org> References: <1281034399-13055-1-git-send-email-jack@suse.cz> <1281034399-13055-4-git-send-email-jack@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, hch@infradead.org, jaxboe@fusionio.com, Wu Fengguang To: Jan Kara Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:46240 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751662Ab0HFAWB (ORCPT ); Thu, 5 Aug 2010 20:22:01 -0400 In-Reply-To: <1281034399-13055-4-git-send-email-jack@suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, 5 Aug 2010 20:53:19 +0200 Jan Kara wrote: > WB_SYNC_NONE writeback is done in rounds of 1024 pages so that we don't write > out some huge inode for too long while starving writeout of other inodes. To > avoid livelocks, we record time we started writeback in wbc->wb_start and do > not write out inodes which were dirtied after this time. But currently, > writeback_inodes_wb() resets wb_start each time it is called thus effectively > invalidating this logic and making any WB_SYNC_NONE writeback prone to > livelocks. data point: that was eight-year-old code that we broke. Five months ago. How did you discover this? You have test cases which cover this scenario and things locked up?