diff options
author | Alan D. Brunelle <Alan.Brunelle@hp.com> | 2007-04-13 20:12:47 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-04-13 20:12:47 +0200 |
commit | c8b0b334cc1028ad8aa5407667233747af96a942 (patch) | |
tree | 07144255c7a332021e5dcdccf1cdda366811675a /btt/trace_complete.c | |
parent | 425c69552d4fbf7705c74aef4761324ed641cb28 (diff) | |
download | blktrace-c8b0b334cc1028ad8aa5407667233747af96a942.tar.gz blktrace-c8b0b334cc1028ad8aa5407667233747af96a942.tar.bz2 |
A couple of weeks ago Ming Zhang had noted that btt was using tremendous
amounts of memory to accomplish a run. After looking at the code, and
doing some testing, I determined the cause - please find a patch to the
latest tree that seems to fix the problem for me...
Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'btt/trace_complete.c')
-rw-r--r-- | btt/trace_complete.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/btt/trace_complete.c b/btt/trace_complete.c index ac85c32..b48bf79 100644 --- a/btt/trace_complete.c +++ b/btt/trace_complete.c @@ -24,29 +24,27 @@ LIST_HEAD(pending_cs); static inline void __run_complete(struct io *c_iop) { - LIST_HEAD(rmhd); - if (remapper_dev(c_iop->t.device)) { struct bilink *blp = blp; struct io *iop = bilink_first_down(c_iop, &blp); if (iop->type == IOP_Q) { - run_queue(iop, c_iop, &rmhd); + run_queue(iop, c_iop, c_iop); biunlink(blp); } else - bilink_for_each_down(run_remap, c_iop, &rmhd, 1); + bilink_for_each_down(run_remap, c_iop, c_iop, 1); } else - bilink_for_each_down(run_issue, c_iop, &rmhd, 1); + bilink_for_each_down(run_issue, c_iop, c_iop, 1); dump_iop(c_iop, 1); LIST_DEL(&c_iop->c_pending); del_retry(c_iop); + add_rmhd(c_iop); - list_add_tail(&c_iop->f_head, &rmhd); - release_iops(&rmhd); + release_iops(); } static int ready_complete_remapper(struct io *c_iop) @@ -170,9 +168,10 @@ void retry_complete(struct io *c_iop, __u64 now) switch (ready_complete(c_iop)) { case 1: -#if defined(DEBUG) - fprintf(stderr, "Retried %15.9lf success!\n", tc); -#endif +# if defined(DEBUG) + fprintf(stderr, "Retried %15.9lf success!\n", tc); +# endif + __run_complete(c_iop); break; case 0: |