Messages in this thread | | | From | (H. Peter Anvin) | Subject | Re: [uPATCH] sched.c change; snappy_response++ | Date | 11 Mar 1998 18:44:30 GMT |
| |
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
| |