From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 0/2] Make task doing heavy writing killable Date: Mon, 14 Nov 2011 07:05:46 -0500 Message-ID: <20111114120546.GA31037@infradead.org> References: <1321269030-6019-1-git-send-email-jack@suse.cz> <20111114115912.GA3224@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kara , "linux-fsdevel@vger.kernel.org" , Al Viro , "k-mio@sx.jp.nec.com" , Andrew Morton , Christoph Hellwig To: Wu Fengguang Return-path: Received: from 173-166-109-252-newengland.hfc.comcastbusiness.net ([173.166.109.252]:57634 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751413Ab1KNMFv (ORCPT ); Mon, 14 Nov 2011 07:05:51 -0500 Content-Disposition: inline In-Reply-To: <20111114115912.GA3224@localhost> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Nov 14, 2011 at 07:59:12PM +0800, Wu Fengguang wrote: > On Mon, Nov 14, 2011 at 07:10:28PM +0800, Jan Kara wrote: > > > > Hello, > > > > these two patches aim at making task waiting in balance_dirty_pages() > > killable. This is desirable because otherwise if filesystem stops accepting > > writes (e.g. if device has been removed or other serious error condidion) we > > have a task stuck in D state forever. > > Agreed totally. I myself has run into such conditions and get very > annoyed not being able to kill the hard throttled tasks -- they just > stuck there for ever if the error condition does not change. > > > I'm not sure who should merge these two patches... Al, Fengguang? > > I'd like to do it -- otherwise there will obviously be merge conflicts. > > Actually I also queued a patch to do this (attached). Your patches do > better on TASK_KILLABLE and the use of signal_pending() in write > routines, while mine goes further to add the break to various > filesystems. How about combining them together? Can you make balance_dirty_pages(_ratelimited) return an error instead of opencoding the fatal signal check everywhere? That would make the interface a bit more obvious.