Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755838AbXKDS1N (ORCPT ); Sun, 4 Nov 2007 13:27:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752467AbXKDS07 (ORCPT ); Sun, 4 Nov 2007 13:26:59 -0500 Received: from x346.tv-sign.ru ([89.108.83.215]:55389 "EHLO mail.screens.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751037AbXKDS06 (ORCPT ); Sun, 4 Nov 2007 13:26:58 -0500 Date: Sun, 4 Nov 2007 22:32:21 +0300 From: Oleg Nesterov To: Andrew Morton , Jens Axboe Cc: Nick , Randy Dunlap , linux-kernel@vger.kernel.org Subject: [PATCH] cfq: fix IOPRIO_CLASS_IDLE accounting Message-ID: <20071104193221.GA12373@tv-sign.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1070 Lines: 31 (untested, needs an ack from maintainer) Spotted by Nick , hopefully can explain the second trace in http://bugzilla.kernel.org/show_bug.cgi?id=9180. If ->async_idle_cfqq != NULL cfq_put_async_queues() puts it IOPRIO_BE_NR times in a loop. Fix this. Signed-off-by: Oleg Nesterov --- cfq/block/cfq-iosched.c~ 2007-08-09 19:59:26.000000000 +0400 +++ cfq/block/cfq-iosched.c 2007-11-04 22:23:42.000000000 +0300 @@ -2065,9 +2065,10 @@ static void cfq_put_async_queues(struct cfq_put_queue(cfqd->async_cfqq[0][i]); if (cfqd->async_cfqq[1][i]) cfq_put_queue(cfqd->async_cfqq[1][i]); - if (cfqd->async_idle_cfqq) - cfq_put_queue(cfqd->async_idle_cfqq); } + + if (cfqd->async_idle_cfqq) + cfq_put_queue(cfqd->async_idle_cfqq); } static void cfq_exit_queue(elevator_t *e) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/