From: Tejun Heo <tj@kernel.org>
To: jaxboe@fusionio.com, linux-kernel@vger.kernel.org, hch@lst.de
Cc: Tejun Heo <tj@kernel.org>
Subject: [PATCH 4/5] backing-dev: update trace points
Date: Mon, 6 Sep 2010 14:46:21 +0200 [thread overview]
Message-ID: <1283777182-11426-5-git-send-email-tj@kernel.org> (raw)
In-Reply-To: <1283777182-11426-1-git-send-email-tj@kernel.org>
* writeback_nothread is replaced with writeback_rescuer, which is
triggered when a writeback work is called from the bdi_wq rescuer.
* writeback_wake[_forker]_thread are replaced with writeback_timer.
* writeback_thread_start/stop are replaced with writeback_start/stop
which are triggered when a writeback work starts and finishes
execution.
Signed-off-by: Tejun Heo <tj@kernel.org>
---
include/trace/events/writeback.h | 9 ++++-----
mm/backing-dev.c | 6 ++++++
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h
index f345f66..58e1f01 100644
--- a/include/trace/events/writeback.h
+++ b/include/trace/events/writeback.h
@@ -46,7 +46,7 @@ DECLARE_EVENT_CLASS(writeback_work_class,
DEFINE_EVENT(writeback_work_class, name, \
TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work), \
TP_ARGS(bdi, work))
-DEFINE_WRITEBACK_WORK_EVENT(writeback_nothread);
+DEFINE_WRITEBACK_WORK_EVENT(writeback_rescuer);
DEFINE_WRITEBACK_WORK_EVENT(writeback_queue);
DEFINE_WRITEBACK_WORK_EVENT(writeback_exec);
@@ -81,12 +81,11 @@ DEFINE_EVENT(writeback_class, name, \
TP_ARGS(bdi))
DEFINE_WRITEBACK_EVENT(writeback_nowork);
-DEFINE_WRITEBACK_EVENT(writeback_wake_thread);
-DEFINE_WRITEBACK_EVENT(writeback_wake_forker_thread);
+DEFINE_WRITEBACK_EVENT(writeback_timer);
DEFINE_WRITEBACK_EVENT(writeback_bdi_register);
DEFINE_WRITEBACK_EVENT(writeback_bdi_unregister);
-DEFINE_WRITEBACK_EVENT(writeback_thread_start);
-DEFINE_WRITEBACK_EVENT(writeback_thread_stop);
+DEFINE_WRITEBACK_EVENT(writeback_start);
+DEFINE_WRITEBACK_EVENT(writeback_stop);
DECLARE_EVENT_CLASS(wbc_class,
TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi),
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index e874916..3b2a657 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -314,6 +314,7 @@ static void bdi_timer_fn(unsigned long data)
{
struct backing_dev_info *bdi = (struct backing_dev_info *)data;
+ trace_writeback_timer(bdi);
queue_work(bdi_wq, &bdi->wb.work);
}
@@ -347,6 +348,8 @@ static void bdi_work_fn(struct work_struct *work)
struct backing_dev_info *bdi = wb->bdi;
long pages_written;
+ trace_writeback_start(bdi);
+
WARN(!test_bit(BDI_registered, &bdi->state),
"bdi %p/%s is not registered!\n", bdi, bdi->name);
@@ -369,6 +372,7 @@ static void bdi_work_fn(struct work_struct *work)
trace_writeback_pages_written(pages_written);
} while (!list_empty(&bdi->work_list));
} else {
+ trace_writeback_rescuer(bdi, work);
bdi_flush_io(bdi);
if (!list_empty(&bdi->work_list))
queue_work(bdi_wq, work);
@@ -378,6 +382,8 @@ static void bdi_work_fn(struct work_struct *work)
bdi_delayed_writeback(bdi);
current->flags &= ~(PF_FLUSHER | PF_SWAPWRITE);
+
+ trace_writeback_stop(bdi);
}
/*
--
1.7.1
next prev parent reply other threads:[~2010-09-06 12:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-06 12:46 [PATCHSET] backing-dev: replace private thread pool with workqueue Tejun Heo
2010-09-06 12:46 ` [PATCH 1/5] workqueue: implement workqueue_on_rescuer() Tejun Heo
2010-09-06 12:46 ` [PATCH 2/5] backing-dev: kill unused bdi_writeback->nr Tejun Heo
2010-09-08 8:57 ` Artem Bityutskiy
2010-09-06 12:46 ` [PATCH 3/5] backing-dev: replace private thread pool with workqueue Tejun Heo
2010-09-06 12:46 ` Tejun Heo [this message]
2010-09-06 12:46 ` [PATCH 5/5] backing-dev: replace sync_supers_tsk/timer with a delayed_work Tejun Heo
2010-09-08 9:00 ` Artem Bityutskiy
2010-09-07 12:16 ` [PATCHSET] backing-dev: replace private thread pool with workqueue Christoph Hellwig
2010-09-07 12:19 ` Tejun Heo
2010-09-07 12:29 ` Jens Axboe
2010-09-07 12:36 ` Tejun Heo
2010-11-27 16:02 ` Tejun Heo
2010-11-27 18:50 ` Jens Axboe
2010-11-27 20:30 ` Tejun Heo
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=1283777182-11426-5-git-send-email-tj@kernel.org \
--to=tj@kernel.org \
--cc=hch@lst.de \
--cc=jaxboe@fusionio.com \
--cc=linux-kernel@vger.kernel.org \
/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