From owner-p4-projects Mon Jun 3 11:56: 6 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CAD1A37B403; Mon, 3 Jun 2002 11:55:45 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0375237B400 for ; Mon, 3 Jun 2002 11:55:44 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g53IthD23171 for perforce@freebsd.org; Mon, 3 Jun 2002 11:55:43 -0700 (PDT) (envelope-from julian@freebsd.org) Date: Mon, 3 Jun 2002 11:55:43 -0700 (PDT) Message-Id: <200206031855.g53IthD23171@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer Subject: PERFORCE change 12327 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=12327 Change 12327 by julian@julian_ref on 2002/06/03 11:55:08 Discover typos immediatly after checkin Affected files ... ... //depot/projects/kse/sys/kern/kern_switch.c#49 edit Differences ... ==== //depot/projects/kse/sys/kern/kern_switch.c#49 (text+ko) ==== @@ -47,24 +47,24 @@ assigned as all the available KSEs are activly running, or because there are no threads queued, that pointer is NULL. -When a KSE is removed from the run queue to become runnable, We know +When a KSE is removed from the run queue to become runnable, we know it was associated with the highest priority thread in the queue (at the head -of the queue). If it is also the last assigned, that pointer must be -removed from it. Since it was the last assigned, we know there were no more -KSEs available, (M was 1 and is now 0) and since we are not FREEING our KSE +of the queue). If it is also the last assigned we know M was 1 and must +now be 0. Since the thread is no longer queued that pointer must be +removed from it. Since we know there were no more KSEs available, +(M was 1 and is now 0) and since we are not FREEING our KSE but using it, we know there are STILL no more KSEs available, we can prove that the next thread in the ksegrp list will not have a KSE to assign to -it, so we can show that the pointer must be made 'invalid' because there -are now NO threads on the list that are assigned a KSE. +it, so we can show that the pointer must be made 'invalid' (NULL). -The pointer exists so that when a new threasd is made runnable, it can -have it's priority compared with the last assigned thread to see if -it should 'steal' it's KSE or not.. i.e. is it 'earlier' -on the list than that thread or later.. If it's earlier, then th e KSE is +The pointer exists so that when a new thread is made runnable, it can +have its priority compared with the last assigned thread to see if +it should 'steal' its KSE or not.. i.e. is it 'earlier' +on the list than that thread or later.. If it's earlier, then the KSE is removed from the last assigned (which is now not assigned a KSE) and reassigned to the new thread, which is placed earlier in the list. The pointer is then backed up to the previous thread (which may or may not -be the new thread. +be the new thread). When a thread sleeps or is removed, the KSE becomes available and if there are queued threads that are not assigned KSEs, the highest priority one of @@ -214,7 +214,7 @@ } /* - * Remove a thread from it's KSEGRP's run queue. + * Remove a thread from its KSEGRP's run queue. * This in turn may remove it from a KSE if it was already assigned * to one, possibly causing a new thread to be assigned to the KSE * and the KSE getting a new priority (unless it's a BOUND threa/KSE pair). @@ -388,7 +388,7 @@ * If there was a last assigned, but we didn't see it, * we must be inserting before it, so take the KSE from * the last assigned, and back it up one entry. Then, - * assign the KSE to the new thread and adjust it's priority. + * assign the KSE to the new thread and adjust its priority. */ td2 = kg->kg_last_assigned; ke = td2->td_kse; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message