Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Apr 2012 12:17:05 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Sushanth Rai <sushanth_rai@yahoo.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Startvation of realtime piority threads
Message-ID:  <201204091217.05561.jhb@freebsd.org>
In-Reply-To: <1333674504.97862.YahooMailClassic@web180016.mail.gq1.yahoo.com>
References:  <1333674504.97862.YahooMailClassic@web180016.mail.gq1.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, April 05, 2012 9:08:24 pm Sushanth Rai wrote:
> I understand the downside of badly written realtime app.  In my case 
application runs in userspace without making much syscalls and by all means it 
is a well behaved application. Yes, I can wire memory, change the application 
to use mutex instead of spinlock and those changes should help but they are 
still working around the problem. I still believe kernel should not lower the 
realtime priority when blocking on resources. This can lead to priority 
inversion, especially since these threads run at fixed priorities and kernel 
doesn't muck with them.
>  
> As you suggested _sleep() should not adjust the priorities for realtime 
threads. 

Hmm, sched_sleep() for both SCHED_4BSD and SCHED_ULE already does the right
thing here in HEAD.

	if (PRI_BASE(td->td_pri_class) != PRI_TIMESHARE)
		return;

Which OS version did you see this on?

-- 
John Baldwin



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