Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756839Ab2FYNa6 (ORCPT ); Mon, 25 Jun 2012 09:30:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42499 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756365Ab2FYNa5 (ORCPT ); Mon, 25 Jun 2012 09:30:57 -0400 Date: Mon, 25 Jun 2012 09:30:47 -0400 From: Vivek Goyal To: Josh Hunt Cc: Jens Axboe , linux-kernel@vger.kernel.org, tj@kernel.org Subject: Re: multi-second application stall in open() Message-ID: <20120625133047.GA9394@redhat.com> References: <20120621203217.GC14095@redhat.com> <20120622141211.GB18409@redhat.com> <20120622204207.GA22063@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1237 Lines: 38 On Fri, Jun 22, 2012 at 04:34:07PM -0500, Josh Hunt wrote: [..] > Shouldn't the queue stay on the RR list until it is empty? This does look odd. cfqq should stay on service tree as long as it has requests. Can you attach the full log again. Also make sure that blktrace is not dropping any trace events. In slice_expire() we check following. if (cfq_cfqq_on_rr(cfqq) && RB_EMPTY_ROOT(&cfqq->sort_list)) cfq_del_cfqq_rr(cfqd, cfqq); So for some reason RB_EMPTY_ROOT() is returning true. But we must have added the request and it should not have been empty. cfq_insert_request() cfq_add_rq_rb() elv_rb_add() So may be little more tracing after request addition will help. Just check that RB_EMPTY_ROOT() is not true after addition of request and also print number of requests queued. In slice_expired() we can probably put a BUG_ON() which checks following. BUG_ON(RB_EMPTY_ROOT(&cfqq->sort_list) && (cfqq->queued[0] || cfqq->queued[1])); Thanks Vivek -- 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/