linux/include/trace/events
Mel Gorman 0e093d9976 writeback: do not sleep on the congestion queue if there are no congested BDIs or if significant congestion is not being encountered in the current zone
If congestion_wait() is called with no BDI congested, the caller will
sleep for the full timeout and this may be an unnecessary sleep.  This
patch adds a wait_iff_congested() that checks congestion and only sleeps
if a BDI is congested else, it calls cond_resched() to ensure the caller
is not hogging the CPU longer than its quota but otherwise will not sleep.

This is aimed at reducing some of the major desktop stalls reported during
IO.  For example, while kswapd is operating, it calls congestion_wait()
but it could just have been reclaiming clean page cache pages with no
congestion.  Without this patch, it would sleep for a full timeout but
after this patch, it'll just call schedule() if it has been on the CPU too
long.  Similar logic applies to direct reclaimers that are not making
enough progress.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:07 -07:00
..
bkl.h events: Harmonize event field names and print output names 2009-10-15 12:42:03 +02:00
block.h block: remove wrappers for request type/flags 2010-08-07 18:17:56 +02:00
ext4.h writeback: remove nonblocking/encountered_congestion references 2010-10-26 16:52:05 -07:00
gfpflags.h vmscan: tracing: add trace events for kswapd wakeup, sleeping and direct reclaim 2010-08-09 20:44:59 -07:00
irq.h irq: Add tracepoint to softirq_raise 2010-09-07 17:49:34 +02:00
jbd2.h ext4: Add new tracepoint for jbd2_cleanup_journal_tail 2009-12-23 07:45:44 -05:00
kmem.h vmscan: tracing: add trace events for kswapd wakeup, sleeping and direct reclaim 2010-08-09 20:44:59 -07:00
kvm.h KVM: cleanup kvm trace 2010-05-17 12:15:22 +03:00
lock.h tracing: Factorize lock events in a lock class 2010-05-09 13:45:35 +02:00
mce.h perf_event, x86, mce: Use TRACE_EVENT() for MCE logging 2009-10-13 09:43:38 +02:00
module.h Merge branch 'linus' into tracing/core 2010-04-08 10:18:47 +02:00
napi.h napi: Convert trace_napi_poll to TRACE_EVENT 2010-09-07 17:51:01 +02:00
net.h netdev: Add tracepoints to netdev layer 2010-09-07 17:51:33 +02:00
power.h tracing, perf: Add more power related events 2010-09-17 09:10:43 +02:00
sched.h tracing/sched: Add sched_pi_setprio tracepoint 2010-09-21 10:56:41 -04:00
scsi.h [SCSI] scsi_trace: Enhance SCSI command tracing 2010-04-30 12:52:08 -05:00
signal.h tracing: Fix null pointer deref with SEND_SIG_FORCED 2010-06-08 23:51:32 +02:00
skb.h skb: Add tracepoints to freeing skb 2010-09-07 17:51:53 +02:00
syscalls.h tracing: Separate raw syscall from syscall tracer 2009-11-25 14:20:06 -05:00
timer.h tracing: Fix timer tracing 2010-08-19 13:00:41 +02:00
vmscan.h vmscan: narrow the scenarios in whcih lumpy reclaim uses synchrounous reclaim 2010-10-26 16:52:07 -07:00
workqueue.h workqueue: add queue_work and activate_work trace points 2010-10-05 10:49:55 +02:00
writeback.h writeback: do not sleep on the congestion queue if there are no congested BDIs or if significant congestion is not being encountered in the current zone 2010-10-26 16:52:07 -07:00