lkml.org 
[lkml]   [2008]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] small optimization to update_curr_rt
On Fri, Oct 31, 2008 at 06:10:13AM -0700, Steven Noonan wrote:
> On Fri, Oct 31, 2008 at 6:03 AM, Dimitri Sivanich <sivanich@sgi.com> wrote:
> > A very minor improvement, but might it be better to check sched_rt_runtime(rt_rq)
> > before taking the rt_runtime_lock?
>
> Is it possible that the attribute sched_rt_runtime is checking could
> change by the time it acquires the lock? If not, should be fine, I
> think.
>

Steve,

While it might be possible for it to change in that instant, I don't know if it matters.

If the runtime value should change to RUNTIME_INF in that instant, it will be caught in sched_rt_runtime_exceeded(). If it changed from RUNTIME_INF to a lower value, I doubt it would matter much, as at most one more rt_rq value wouldn't be checked. Either way some rt_rq values would have been checked during the loop and some would not.


\
 
 \ /
  Last update: 2008-10-31 14:59    [W:0.051 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site