public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <rml@tech9.net>
To: mingo@elte.hu
Cc: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.5: MAX_PRIO cleanup
Date: 23 Apr 2002 18:43:58 -0400	[thread overview]
Message-ID: <1019601843.1469.257.camel@phantasy> (raw)
In-Reply-To: <Pine.LNX.4.44.0204230948150.10873-100000@elte.hu>

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


  parent reply	other threads:[~2002-04-23 22:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-23  2:23 [PATCH] 2.5: MAX_PRIO cleanup Robert Love
2002-04-23  7:53 ` Ingo Molnar
2002-04-23 16:53   ` Robert Love
2002-04-23 15:23     ` Ingo Molnar
2002-04-23 18:15       ` Robert Love
2002-04-23 16:14         ` Ingo Molnar
2002-04-23 18:24           ` Robert Love
2002-04-23 22:43   ` Robert Love [this message]
2002-04-23 20:44     ` Ingo Molnar
2002-04-23 23:03       ` Robert Love

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1019601843.1469.257.camel@phantasy \
    --to=rml@tech9.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox