Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Apr 2004 17:04:02 -0400 (EDT)
From:      Daniel Eischen <eischen@vigrid.com>
To:        Petri Helenius <pete@he.iki.fi>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: system priorities
Message-ID:  <Pine.GSO.4.10.10404301653220.26449-100000@pcnet5.pcnet.com>
In-Reply-To: <40927537.6070405@he.iki.fi>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 30 Apr 2004, Petri Helenius wrote:

>=20
> Am I correct in the observation that threads inherit their scheduling=20
> priority (nice and rtprio)
> from the first "main" thread in the process instead of the parent thread?

As it stands now, newly created KSEGs inherit from the creating
KSEG.  The nice and rtprio priorites are stored in the KSEG.

> I=B4m creating a few system scope threads from a rtprio main process and=
=20
> then dropping rtprio in the created threads and then creating more=20
> threads from them which seem to get rtprio from somewhere.

It looks like rtprio will set the priority of the first
KSEG in the proc's list of KSEGs.  This isn't necessarily
the first KSEG created (main).  In fact, newly created
KSEGs get inserted onto the head of the list, so rtprio()
may act on different KSEGs depending on if it is called
before or after any KSEG creations.

[ System scope threads =3D=3D new KSEG creation ]

> Is there a specification reference on this and if not, would it make=20
> more sense to inherit them from the parent thread?

I think they do inherit from the parent KSEG, but rtprio()
may not be setting the priority for the current KSEG.

I would really like a Solaris-like priocntl() so that you
can specify which KSEG (or whatever thing that will hold
the priority in the future) to act on.

--=20
Dan Eischen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10404301653220.26449-100000>