Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217457
b: refs/heads/master
c: 52bb919
h: refs/heads/master
i:
  217455: a5b8ae7
v: v3
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed Oct 26, 2010
1 parent 43ef401 commit f433398
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e11da5b4fdf01d71d73c21cb92b00595b917d7fd
refs/heads/master: 52bb9198668968506f9d12bf35d7f5d3f094921e
28 changes: 28 additions & 0 deletions trunk/include/trace/events/writeback.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,34 @@ DEFINE_WBC_EVENT(wbc_balance_dirty_written);
DEFINE_WBC_EVENT(wbc_balance_dirty_wait);
DEFINE_WBC_EVENT(wbc_writepage);

DECLARE_EVENT_CLASS(writeback_congest_waited_template,

TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed),

TP_ARGS(usec_timeout, usec_delayed),

TP_STRUCT__entry(
__field( unsigned int, usec_timeout )
__field( unsigned int, usec_delayed )
),

TP_fast_assign(
__entry->usec_timeout = usec_timeout;
__entry->usec_delayed = usec_delayed;
),

TP_printk("usec_timeout=%u usec_delayed=%u",
__entry->usec_timeout,
__entry->usec_delayed)
);

DEFINE_EVENT(writeback_congest_waited_template, writeback_congestion_wait,

TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed),

TP_ARGS(usec_timeout, usec_delayed)
);

#endif /* _TRACE_WRITEBACK_H */

/* This part must be outside protection */
Expand Down
5 changes: 5 additions & 0 deletions trunk/mm/backing-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -764,12 +764,17 @@ EXPORT_SYMBOL(set_bdi_congested);
long congestion_wait(int sync, long timeout)
{
long ret;
unsigned long start = jiffies;
DEFINE_WAIT(wait);
wait_queue_head_t *wqh = &congestion_wqh[sync];

prepare_to_wait(wqh, &wait, TASK_UNINTERRUPTIBLE);
ret = io_schedule_timeout(timeout);
finish_wait(wqh, &wait);

trace_writeback_congestion_wait(jiffies_to_usecs(timeout),
jiffies_to_usecs(jiffies - start));

return ret;
}
EXPORT_SYMBOL(congestion_wait);
Expand Down

0 comments on commit f433398

Please sign in to comment.