===================================================================
@@ -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,