lkml.org 
[lkml]   [2010]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Scheduler oddity
From
Date
On Fri, 2010-02-05 at 19:33 +0300, malc wrote:
> Following test exhibits somewhat odd behaviour on, at least, 2.6.32.3
> (ppc) and 2.6.29.1 (x86_64), perhaps someone could explain why.

Expected behavior.

SCHED_BATCH tasks do not wakeup preempt, preemption is tick driven. The
writer therefore has time to fill the pipe/block, so reader can then
drain the pipe, leading to efficient data transfer.

SCHED_NORMAL tasks do preempt. Every write wakes a reader who's
vruntime (CPU utilization fairness yardstick) lags the writer enough to
warrant preemption, so one write translates to one preemption followed
by a read. The reader can't possibly catch up to the writer (being
synchronous) in either case, but the scheduler doesn't know that or
care, it simply tries to equalize the two. Since the writer's CPU
utilization stems entirely from tiny writes, that time is what goes
toward equalizing the reader. Result is the tiny I/Os the programmer
asked for, extreme low latency, and utterly horrid throughput.

-Mike



\
 
 \ /
  Last update: 2010-02-06 13:15    [W:0.038 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site