From: Shaohua Li <shaohua.li@intel.com>
To: axboe@kernel.dk
Cc: linux-kernel@vger.kernel.org, vgoyal@redhat.com,
david@fromorbit.com, jack@suse.cz, zhu.yanhai@gmail.com,
namhyung.kim@lge.com, shaohua.li@intel.com
Subject: [patch v2 7/8]block: fiops add some trace information
Date: Mon, 30 Jan 2012 15:02:20 +0800 [thread overview]
Message-ID: <20120130070635.234238863@sli10-conroe.sh.intel.com> (raw)
In-Reply-To: 20120130070213.793690895@sli10-conroe.sh.intel.com
[-- Attachment #1: fiops-tracing.patch --]
[-- Type: text/plain, Size: 2300 bytes --]
Add some trace information, which is helpful when I do debugging.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
---
block/fiops-iosched.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
Index: linux/block/fiops-iosched.c
===================================================================
--- linux.orig/block/fiops-iosched.c 2012-01-21 10:30:46.000000000 +0800
+++ linux/block/fiops-iosched.c 2012-01-21 10:35:04.000000000 +0800
@@ -10,6 +10,7 @@
#include <linux/jiffies.h>
#include <linux/rbtree.h>
#include <linux/ioprio.h>
+#include <linux/blktrace_api.h>
#include "blk.h"
#define VIOS_SCALE_SHIFT 10
@@ -99,6 +100,11 @@ FIOPS_IOC_FNS(on_rr);
FIOPS_IOC_FNS(prio_changed);
#undef FIOPS_IOC_FNS
+#define fiops_log_ioc(fiopsd, ioc, fmt, args...) \
+ blk_add_trace_msg((fiopsd)->queue, "ioc%d " fmt, (ioc)->pid, ##args)
+#define fiops_log(fiopsd, fmt, args...) \
+ blk_add_trace_msg((fiopsd)->queue, "fiops " fmt, ##args)
+
enum wl_prio_t fiops_wl_type(short prio_class)
{
if (prio_class == IOPRIO_CLASS_RT)
@@ -200,6 +206,8 @@ static void fiops_service_tree_add(struc
ioc->service_tree = NULL;
}
+ fiops_log_ioc(fiopsd, ioc, "service tree add, vios %lld", vios);
+
left = 1;
parent = NULL;
ioc->service_tree = service_tree;
@@ -393,8 +401,12 @@ static struct fiops_ioc *fiops_select_io
* to be starved, don't delay
*/
if (!rq_is_sync(rq) && fiopsd->in_flight[1] != 0 &&
- service_tree->count == 1)
+ service_tree->count == 1) {
+ fiops_log_ioc(fiopsd, ioc,
+ "postpone async, in_flight async %d sync %d",
+ fiopsd->in_flight[0], fiopsd->in_flight[1]);
return NULL;
+ }
return ioc;
}
@@ -405,6 +417,8 @@ static void fiops_charge_vios(struct fio
struct fiops_rb_root *service_tree = ioc->service_tree;
ioc->vios += vios;
+ fiops_log_ioc(fiopsd, ioc, "charge vios %lld, new vios %lld", vios, ioc->vios);
+
if (RB_EMPTY_ROOT(&ioc->sort_list))
fiops_del_ioc_rr(fiopsd, ioc);
else
@@ -498,6 +512,9 @@ static void fiops_completed_request(stru
fiopsd->in_flight[rq_is_sync(rq)]--;
ioc->in_flight--;
+ fiops_log_ioc(fiopsd, ioc, "in_flight %d, busy queues %d",
+ ioc->in_flight, fiopsd->busy_queues);
+
if (fiopsd->in_flight[0] + fiopsd->in_flight[1] == 0)
fiops_schedule_dispatch(fiopsd);
}
next prev parent reply other threads:[~2012-01-30 7:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 7:02 [patch v2 0/8]block: An IOPS based ioscheduler Shaohua Li
2012-01-30 7:02 ` [patch v2 1/8]block: fiops ioscheduler core Shaohua Li
2012-01-30 7:02 ` [patch v2 2/8]block: fiops read/write request scale Shaohua Li
2012-01-30 7:02 ` [patch v2 3/8]block: fiops sync/async scale Shaohua Li
2012-01-30 7:02 ` [patch v2 4/8]block: fiops add ioprio support Shaohua Li
2012-01-30 7:02 ` [patch v2 5/8]block: fiops preserve vios key for deep queue depth workload Shaohua Li
2012-01-30 7:02 ` [patch v2 6/8]block: fiops bias sync workload Shaohua Li
2012-01-30 7:02 ` Shaohua Li [this message]
2012-01-30 7:02 ` [patch v2 8/8]block: fiops sync preempts async Shaohua Li
2012-01-30 11:53 ` Hillf Danton
2012-01-30 7:09 ` [patch v2 0/8]block: An IOPS based ioscheduler Shaohua Li
2012-01-30 15:30 ` Vivek Goyal
2012-01-31 0:50 ` Shaohua Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120130070635.234238863@sli10-conroe.sh.intel.com \
--to=shaohua.li@intel.com \
--cc=axboe@kernel.dk \
--cc=david@fromorbit.com \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung.kim@lge.com \
--cc=vgoyal@redhat.com \
--cc=zhu.yanhai@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).