Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Nov 2008 11:10:09 GMT
From:      Unga <unga888@yahoo.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/129164: Wrong priority value for normal processes
Message-ID:  <200811251110.mAPBA98G053479@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/129164; it has been noted by GNATS.

From: Unga <unga888@yahoo.com>
To: Garrett Cooper <yanefbsd@gmail.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/129164: Wrong priority value for normal processes
Date: Tue, 25 Nov 2008 02:41:26 -0800 (PST)

 --- On Tue, 11/25/08, Garrett Cooper <yanefbsd@gmail.com> wrote:
 
 > 	rtp.prio is an unsigned short, and there is some rollover
 > because the number set for the priority is then subtracted
 > by 128 (see the following grepped snippets). This appears to
 > be a cosmetic issue which should be fixed by shifting the
 > starting offset for the priorities. Unless it's really a
 > dealbreaker (because it shouldn't be considering that
 > all processes are in fact fudged by this value range, but it
 > does touch the ULE / scheduler code a bit from the looks of
 > it), I would mark this bug Sev 2, Priority High.
 > 
 > [gcooper@optimus ~]$ grep -rn PRI_MIN_REALTIME
 > /usr/src/sys/
 > /usr/src/sys/kern/kern_resource.c:479:		newpri =
 > PRI_MIN_REALTIME + rtp->prio;
 > /usr/src/sys/kern/kern_resource.c:511:		rtp->prio =
 > td->td_base_user_pri - PRI_MIN_REALTIME;
 > /usr/src/sys/kern/kern_umtx.c:1934:		if (UPRI(td) <
 > PRI_MIN_REALTIME + ceiling) {
 > /usr/src/sys/kern/kern_umtx.c:1939:		if (su &&
 > PRI_MIN_REALTIME + ceiling < uq->uq_inherited_pri) {
 > /usr/src/sys/kern/kern_umtx.c:1940:			uq->uq_inherited_pri
 > = PRI_MIN_REALTIME + ceiling;
 > /usr/src/sys/kern/kern_umtx.c:2069:		new_inherited_pri =
 > PRI_MIN_REALTIME + rceiling;
 > /usr/src/sys/kern/sched_ule.c:1406:		pri =
 > PRI_MIN_REALTIME;
 > /usr/src/sys/kern/sched_ule.c:1407:		pri +=
 > ((PRI_MAX_REALTIME - PRI_MIN_REALTIME) / sched_interact)
 > /usr/src/sys/kern/sched_ule.c:1409:		KASSERT(pri >=
 > PRI_MIN_REALTIME && pri <= PRI_MAX_REALTIME,
 > /usr/src/sys/sys/priority.h:98:#define	PRI_MAX_KERN		(PRI_MIN_REALTIME
 > - 1)
 > /usr/src/sys/sys/priority.h:112:#define	PRI_MIN_REALTIME	(128)
 > 
 
 Thanks for the reply.
 
 I'll look more details into your above grep results.
 
 I forgot to mention, this issue does not effect both realtime and idletime. It only effect normal priority class. That is, the priority set for the normal processes does not retain.
 
 Best regards
 Unga
 
 
 
 
       



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