From patchwork Thu Jan 5 01:24:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 134395 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 7E4CFB6F70 for ; Thu, 5 Jan 2012 12:24:56 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757568Ab2AEBYz (ORCPT ); Wed, 4 Jan 2012 20:24:55 -0500 Received: from mail-iy0-f174.google.com ([209.85.210.174]:62717 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757506Ab2AEBYv (ORCPT ); Wed, 4 Jan 2012 20:24:51 -0500 Received: by iaeh11 with SMTP id h11so65548iae.19 for ; Wed, 04 Jan 2012 17:24:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=1dLDLw4qVtRx0Q2vdOOKL2pDq/o3ETRJMKSyV67rVXs=; b=n+j1zeL6pBbhzH8Qu1NsfrS+dzBnHfyXZU8td6aQqr1MHCyD72hdlekpon2hcZeN/O 2Tak9xC7/TQ9/jm+ST2qJHhvHiBqwlTXKmMx5cLkqbrf+vncKt0/R5/kLIs8zQmFcW/z uqpGyeHew2MqaBlu/k2vdNFWIqN+wR6FX9pxc= Received: by 10.50.207.72 with SMTP id lu8mr13242igc.0.1325726690978; Wed, 04 Jan 2012 17:24:50 -0800 (PST) Received: from google.com (wtj.mtv.corp.google.com [172.18.96.96]) by mx.google.com with ESMTPS id j3sm195420133ibj.1.2012.01.04.17.24.47 (version=SSLv3 cipher=OTHER); Wed, 04 Jan 2012 17:24:48 -0800 (PST) Date: Wed, 4 Jan 2012 17:24:45 -0800 From: Tejun Heo To: Jens Axboe Cc: Hugh Dickins , Shaohua Li , Andrew Morton , Stephen Rothwell , linux-next@vger.kernel.org, LKML , linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH block/for-3.3/core] block: an exiting task should be allowed to create io_context Message-ID: <20120105012445.GP31746@google.com> References: <20111228164836.GP17712@google.com> <20111228211918.GA3516@google.com> <20120103173500.GB31746@google.com> <20120103175922.GC31746@google.com> <20120103200906.GG31746@google.com> <4F03631C.8080501@kernel.dk> <20120103221301.GH31746@google.com> <20120103223505.GI31746@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20120103223505.GI31746@google.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Hello, again. On Tue, Jan 03, 2012 at 02:35:05PM -0800, Tejun Heo wrote: > > Hmmm... I disabled cfqq merge logic (commented out > > cfq_close_cooperator() and the following cfq_setup_merge() calls) in > > cfq_select_queue() and neither is triggering for quite a while now. > > Maybe cfqq refcnt is getting borked over cfqq merging / splitting? It > > would also explain the low frequency of the issue too. I'll try to > > further isolate it but It would be awesome if someone more familiar > > with the logic can go over that part. > > Scrap that. It triggered and yeah cfq_get_next_queue() is retrieving > empty cfqq from the service tree. Update: I've been running with ELEVATOR_INSERT_SORT_MERGE disabled and none of the issues triggered for about three hours now. It usually triggers under an hour. Hugh, can you please verify whether the patch appended at the end makes the problem go away? Thanks. --- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/block/elevator.c b/block/elevator.c index 99838f4..2e172d2 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -644,6 +644,9 @@ void __elv_add_request(struct request_queue *q, struct request *rq, int where) rq->q = q; + if (where == ELEVATOR_INSERT_SORT_MERGE) + where = ELEVATOR_INSERT_SORT; + if (rq->cmd_flags & REQ_SOFTBARRIER) { /* barriers are scheduling boundary, update end_sector */ if (rq->cmd_type == REQ_TYPE_FS ||