> Date: Wed, 21 Nov 2007 20:38:56 +1100
> From: Alan Hargreaves <Alan.Hargreaves at Sun.COM>
> Subject: Re: PSARC/2007/661 - delete sched_nice
> To: "Roger A. Faulkner" <Roger.Faulkner at Sun.COM>
> Cc: psarc at sac.sfbay.sun.com, John.Zolnowsky at Sun.COM, Darrin.Johnson at
> Sun.COM
>
> Roger, just to be clear, are you looking at removing them (and making
> the structure smaller) or simply increasing the size of the pad array so
> as to keep the size of the struct consistent with what is discussed in
> the comments:
>
> struct sched_param {
> int sched_priority; /* process execution scheduling priority */
> int sched_nicelim; /* nice value limit for SCHED_OTHER
> policy */
> int sched_nice; /* nice value for SCHED_OTHER policy */
> int sched_pad[6]; /* pad to the same size as pcparms_t of */
> /* sys/priocntl.h */
> /* sizeof(sched_priority) + */
> /* sizeof(pcparms_t.pc_clparms) */
> };
>
> I suspect the latter, but I think that it should be mentioned in the
> mail archive for clarity.
I did mention this, at the end of the next-to-last paragraph of my
original mail, not too obviously since it was parenthetical:
Since the introduction of the priocntl(2) PC_DONICE interface:
PSARC/2000/247 Priority Control Enhancements
provides a much better and class-independent method for
dealing with the nice condition of processes and threads,
and since the two abandoned members of 'struct sched_param',
sched_nicelim and sched_nice, cannot be used in any meaningful
way (they yield incorrect nice values for SCHED_OTHER processes),
they should be deleted (keeping the size of 'struct sched_param'
unchanged).
So yes, sched_pad[6] would become sched_pad[8].
Roger
> I was going to say I'd be concerned if the structure size was changing,
> but a quick search of ON don't turn up anything actually including this
> type in the middle of a structure, so even if it is the case, I'm ok
> with a patch binding.
>
> Regards,
> Alan Hargreaves