lkml.org 
[lkml]   [1998]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [uPATCH] sched.c change; snappy_response++
Date
Followup to:  <Pine.LNX.3.96.980310215746.30837A-100000@chiara.csoma.elte.hu>
By author: MOLNAR Ingo <mingo@chiara.csoma.elte.hu>
In newsgroup: linux.dev.kernel
>
>
> On Tue, 10 Mar 1998, Rik van Riel wrote:
>
> > > - /* .. and a slight advantage to the current process */
> > > - if (p == prev)
> > > + /* .. and a slight advantage to the current thread */
> > > + if (p->mm == prev->mm)
> > > weight += 1;
> > > }
> >
> > But why remove the if (p == prev) test?
> > It seems valid to me...
>
> if p==prev then the p->mm==prev->mm condition will be always true ...
>

Incidentally, the comments are backwards; the (p == prev) gives an
advantage to the current *thread*, the (p->mm == prev->mm) gives an
advantage to the current *process* (but possibly a different thread
within the same process.)

-hpa
--
PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD 1E DF FE 69 EE 35 BD 74
See http://www.zytor.com/~hpa/ for web page and full PGP public key
I am Bahá'í -- ask me about it or see http://www.bahai.org/
"To love another person is to see the face of God." -- Les Misérables

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.034 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site