Messages in this thread | | | Subject | Re: [PATCH] 2.5: MAX_PRIO cleanup | From | Robert Love <> | Date | 23 Apr 2002 18:43:58 -0400 |
| |
On Tue, 2002-04-23 at 03:53, Ingo Molnar wrote:
> > /* > > - * Priority of a process goes from 0 to 139. The 0-99 > > - * priority range is allocated to RT tasks, the 100-139 > > - * range is for SCHED_OTHER tasks. Priority values are > > - * inverted: lower p->prio value means higher priority. > > + * Priority of a process goes from 0 to MAX_PRIO-1. The > > + * 0 to MAX_RT_PRIO-1 priority range is allocated to RT tasks, > > + * the MAX_RT_PRIO to MAX_PRIO range is for SCHED_OTHER tasks. > > + * Priority values are inverted: lower p->prio value means higher > > + * priority. > > this i dont agree with either. The point of comments is easy > understanding, so i intentionally kept the 'hard' constants and i'm > updating them constantly - it's much easier to understand how things > happen if it does not happen via a define. The code itself i agree should > stay abstract, but the comments should stay as humanly readable as > possible.
Now that I am working on the configurable maximum RT value patch, I see why I did this: we can't hardcode the values like "0 to 99" because that 99 is set now via a compile-time define. Even if it defaults to 100, it can be a range of values so the comments should be specific and give the exact define.
That is why I did it in the invariant patch, anyhow - and I think it makes the most sense to do it in this patch.
Robert Love
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |