From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934065AbZJGIJL (ORCPT ); Wed, 7 Oct 2009 04:09:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933971AbZJGIBv (ORCPT ); Wed, 7 Oct 2009 04:01:51 -0400 Received: from mga14.intel.com ([143.182.124.37]:35820 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932945AbZJGIBr (ORCPT ); Wed, 7 Oct 2009 04:01:47 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,518,1249282800"; d="scan'208";a="195971315" Message-Id: <20091007074906.370852398@intel.com> User-Agent: quilt/0.48-1 Date: Wed, 07 Oct 2009 15:38:58 +0800 From: Wu Fengguang To: Andrew Morton CC: Theodore Tso , Christoph Hellwig , Dave Chinner , Chris Mason , Peter Zijlstra , "Li Shaohua" , "Myklebust Trond" , "jens.axboe@oracle.com" , Jan Kara , Nick Piggin , , Michael Rubin , Peter Zijlstra Cc: Wu Fengguang , LKML Subject: [PATCH 40/45] writeback: requeue_io_wait() on I_SYNC locked inode References: <20091007073818.318088777@intel.com> Content-Disposition: inline; filename=writeback-more_io_wait-b.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use requeue_io_wait() if inode is being synced by others. This queue won't be busy retried, so avoids busy loops. Cc: Jan Kara Cc: Michael Rubin Cc: Peter Zijlstra Signed-off-by: Fengguang Wu --- fs/fs-writeback.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- linux.orig/fs/fs-writeback.c 2009-10-07 14:32:51.000000000 +0800 +++ linux/fs/fs-writeback.c 2009-10-07 14:32:52.000000000 +0800 @@ -526,14 +526,14 @@ writeback_single_inode(struct inode *ino if (inode->i_state & I_SYNC) { /* * If this inode is locked for writeback and we are not doing - * writeback-for-data-integrity, move it to b_more_io so that - * writeback can proceed with the other inodes on s_io. + * writeback-for-data-integrity, move it to b_more_io_wait so + * that writeback can proceed with the other inodes on b_io. * * We'll have another go at writing back this inode when we * completed a full scan of b_io. */ if (!wait) { - requeue_io(inode); + requeue_io_wait(inode); return 0; }