From: Jan Kara Subject: [PATCH 4/5] mm: Remove low limit from sync_writeback_pages() Date: Fri, 4 Feb 2011 02:38:53 +0100 Message-ID: <1296783534-11585-5-git-send-email-jack@suse.cz> References: <1296783534-11585-1-git-send-email-jack@suse.cz> Cc: linux-mm@kvack.org, Jan Kara , Andrew Morton , Christoph Hellwig , Dave Chinner , Wu Fengguang , Peter Zijlstra To: linux-fsdevel@vger.kernel.org Return-path: Received: from cantor2.suse.de ([195.135.220.15]:44633 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753902Ab1BDBjS (ORCPT ); Thu, 3 Feb 2011 20:39:18 -0500 In-Reply-To: <1296783534-11585-1-git-send-email-jack@suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: sync_writeback_pages() limited minimal amount of pages to write in balance_dirty_pages() to 3/2*ratelimit_pages (6 MB) to submit reasonably sized IO. Since we do not submit any IO anymore, be more fair and let the task wait only for 3/2*(the amount dirtied). CC: Andrew Morton CC: Christoph Hellwig CC: Dave Chinner CC: Wu Fengguang CC: Peter Zijlstra Signed-off-by: Jan Kara --- mm/page-writeback.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 8533032..b855973 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -43,16 +43,11 @@ static long ratelimit_pages = 32; /* - * When balance_dirty_pages decides that the caller needs to perform some - * non-background writeback, this is how many pages it will attempt to write. - * It should be somewhat larger than dirtied pages to ensure that reasonably - * large amounts of I/O are submitted. + * When balance_dirty_pages decides that the caller needs to wait for some + * writeback to happen, this is how many pages it will attempt to write. */ static inline long sync_writeback_pages(unsigned long dirtied) { - if (dirtied < ratelimit_pages) - dirtied = ratelimit_pages; - return dirtied + dirtied / 2; } -- 1.7.1