From patchwork Thu Sep 9 20:14:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Snitzer X-Patchwork-Id: 165481 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o89KFLLO020574 for ; Thu, 9 Sep 2010 20:15:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754728Ab0IIUPA (ORCPT ); Thu, 9 Sep 2010 16:15:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38136 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751730Ab0IIUO7 (ORCPT ); Thu, 9 Sep 2010 16:14:59 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o89KEqLb019896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 9 Sep 2010 16:14:52 -0400 Received: from localhost (dhcp-100-19-150.bos.redhat.com [10.16.19.150]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o89KEk4Z026661 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 9 Sep 2010 16:14:47 -0400 Date: Thu, 9 Sep 2010 16:14:46 -0400 From: Mike Snitzer To: Ryan Harper Cc: Tejun Heo , Mikulas Patocka , dm-devel@redhat.com, Vivek Goyal , john.cooper@redhat.com, rusty@rustcorp.com.au, hch@infradead.org, kvm@vger.kernel.org Subject: Re: [REGRESSION][BISECTED] virtio-blk serial attribute causes guest to hang [Was: Re: [PATCH UPDATED 4/5] dm: implement REQ_FLUSH/FUA support for request-based dm] Message-ID: <20100909201445.GA19656@redhat.com> References: <20100902032246.GA31484@redhat.com> <20100909152658.GA8118@redhat.com> <20100909154442.GI30086@us.ibm.com> <20100909155726.GA9081@redhat.com> <20100909160324.GJ30086@us.ibm.com> <20100909175537.GA9589@redhat.com> <20100909183554.GK30086@us.ibm.com> <20100909191555.GA14486@redhat.com> <20100909194300.GA16908@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100909194300.GA16908@redhat.com> User-Agent: Mutt/1.5.20 (2009-12-10) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 09 Sep 2010 20:15:21 +0000 (UTC) Index: linux-2.6/block/blk-sysfs.c =================================================================== --- linux-2.6.orig/block/blk-sysfs.c 2010-09-01 09:23:55.000000000 -0400 +++ linux-2.6/block/blk-sysfs.c 2010-09-01 17:55:50.000000000 -0400 @@ -36,6 +36,19 @@ static ssize_t queue_requests_show(struc return queue_var_show(q->nr_requests, (page)); } +static ssize_t queue_requests_used_show(struct request_queue *q, char *page) +{ + struct request_list *rl = &q->rq; + + printk("Vivek: count[sync]=%d count[async]=%d" + " congestion_on_thres=%d queue_congestion_off_threshold=%d\n", + rl->count[BLK_RW_SYNC], rl->count[BLK_RW_ASYNC], + queue_congestion_on_threshold(q), + queue_congestion_off_threshold(q)); + + return queue_var_show(rl->count[BLK_RW_SYNC], (page)); +} + static ssize_t queue_requests_store(struct request_queue *q, const char *page, size_t count) { @@ -266,6 +279,11 @@ static struct queue_sysfs_entry queue_re .store = queue_requests_store, }; +static struct queue_sysfs_entry queue_requests_used_entry = { + .attr = {.name = "nr_requests_used", .mode = S_IRUGO | S_IWUSR }, + .show = queue_requests_used_show, +}; + static struct queue_sysfs_entry queue_ra_entry = { .attr = {.name = "read_ahead_kb", .mode = S_IRUGO | S_IWUSR }, .show = queue_ra_show, @@ -371,6 +389,7 @@ static struct queue_sysfs_entry queue_ra static struct attribute *default_attrs[] = { &queue_requests_entry.attr, + &queue_requests_used_entry.attr, &queue_ra_entry.attr, &queue_max_hw_sectors_entry.attr, &queue_max_sectors_entry.attr,