Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Apr 2012 11:08:50 -0700 (PDT)
From:      Sushanth Rai <sushanth_rai@yahoo.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Startvation of realtime piority threads
Message-ID:  <1333994930.58509.YahooMailClassic@web180004.mail.gq1.yahoo.com>
In-Reply-To: <201204091217.05561.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I'm on 7.2. sched_sleep() on 7.2 just records the sleep time. That's why I =
though _sleep might the right place to do the check.=0A=0AThanks,=0ASushant=
h=0A=0A--- On Mon, 4/9/12, John Baldwin <jhb@freebsd.org> wrote:=0A=0A> Fro=
m: John Baldwin <jhb@freebsd.org>=0A> Subject: Re: Startvation of realtime =
piority threads=0A> To: "Sushanth Rai" <sushanth_rai@yahoo.com>=0A> Cc: fre=
ebsd-hackers@freebsd.org=0A> Date: Monday, April 9, 2012, 9:17 AM=0A> On Th=
ursday, April 05, 2012 9:08:24=0A> pm Sushanth Rai wrote:=0A> > I understan=
d the downside of badly written realtime=0A> app.=A0 In my case =0A> applic=
ation runs in userspace without making much syscalls=0A> and by all means i=
t =0A> is a well behaved application. Yes, I can wire memory,=0A> change th=
e application =0A> to use mutex instead of spinlock and those changes shoul=
d=0A> help but they are =0A> still working around the problem. I still beli=
eve kernel=0A> should not lower the =0A> realtime priority when blocking on=
 resources. This can lead=0A> to priority =0A> inversion, especially since =
these threads run at fixed=0A> priorities and kernel =0A> doesn't muck with=
 them.=0A> >=A0 =0A> > As you suggested _sleep() should not adjust the=0A> =
priorities for realtime =0A> threads. =0A> =0A> Hmm, sched_sleep() for both=
 SCHED_4BSD and SCHED_ULE already=0A> does the right=0A> thing here in HEAD=
.=0A> =0A> =A0=A0=A0 if (PRI_BASE(td->td_pri_class) !=3D=0A> PRI_TIMESHARE)=
=0A> =A0=A0=A0 =A0=A0=A0 return;=0A> =0A> Which OS version did you see this=
 on?=0A> =0A> -- =0A> John Baldwin=0A> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1333994930.58509.YahooMailClassic>