[lkml]   [2006]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [ck] Re: [PATCH] sched: activate SCHED BATCH expired
Andreas Mohr wrote:
> Hi,
> On Sat, Mar 18, 2006 at 12:36:10AM +1100, Con Kolivas wrote:
>>I'm not attached to the style, just the feature. If you think it's warranted
>>I'll change it.
> Seconded.
> An even nicer way (this solution seems somewhat asymmetric) than
> prio_array_t *target = rq->active;
> if (batch_task(p))
> target = rq->expired;
> enqueue_task(p, target);
> may be
> prio_array_t *target;
> if (batch_task(p))
> target = rq->expired;
> else
> target = rq->active;
> enqueue_task(p, target);

It doesn't actually generate the same code here (I guess it is good
that gcc gives us this control).

I think my way is (ever so slightly) better because it gets the load
going earlier and comprises one less conditional jump (admittedly in
the slowpath). You'd probably never be able to measure a difference
between any of the variants, however ;)

SUSE Labs, Novell Inc.
Send instant messages to your online friends

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-03-17 15:09    [W:0.170 / U:1.072 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site