From owner-p4-projects Sun Jun 23 1:23: 2 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7DC3137B401; Sun, 23 Jun 2002 01:22:54 -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 2B43137B403 for ; Sun, 23 Jun 2002 01:22:53 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g5N8MqU80663 for perforce@freebsd.org; Sun, 23 Jun 2002 01:22:52 -0700 (PDT) (envelope-from julian@freebsd.org) Date: Sun, 23 Jun 2002 01:22:52 -0700 (PDT) Message-Id: <200206230822.g5N8MqU80663@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer Subject: PERFORCE change 13313 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=13313 Change 13313 by julian@julian_ref on 2002/06/23 01:22:33 Hopefully all teh data changes needed to implement the KSE-loan scheme discussed with Matt. Affected files ... ... //depot/projects/kse/sys/sys/proc.h#114 edit Differences ... ==== //depot/projects/kse/sys/sys/proc.h#114 (text+ko) ==== @@ -351,7 +351,8 @@ #define ke_startzero ke_flags int ke_flags; /* (j) KEF_* flags. */ - struct thread *ke_thread; /* Associated thread, if running. */ + struct thread *ke_thread; /* Active associated thread. */ + struct thread *ke_bound; /* Thread bound to this KSE (*) */ /*u_int ke_estcpu; */ /* (j) Time averaged val of cpticks. */ int ke_cpticks; /* (j) Ticks of cpu time. */ fixpt_t ke_pctcpu; /* (j) %cpu during p_swtime. */ @@ -388,13 +389,23 @@ /* switch for our extension PCB x86 */ }; /* flags kept in ke_flags */ -#define KEF_ONRUNQ 0x00001 /* This KE is on a run queue */ #define KEF_OWEUPC 0x00002 /* Owe process an addupc() call at next ast. */ #define KEF_IDLEKSE 0x00004 /* A 'Per CPU idle process'.. has one thread */ +#define KEF_LOANED 0x00004 /* On loan from the bound thread to another */ #define KEF_ASTPENDING 0x00400 /* KSE has a pending ast. */ #define KEF_NEEDRESCHED 0x00800 /* Process needs to yield. */ /* + * (*) A bound KSE with a bound thread in a KSE process may be lent to + * Other threads, as long as those threads do not leave the kernel. + * The other threads must be either exiting, or be unbound with a valid + * mailbox so that they can save their state there rather than going + * to user space. While this happens the real bound thread is still linked + * to the kse via the ke_bound field, and the KSE has its "KEF_LOANED + * flag set. + */ + +/* * Kernel-scheduled entity group (KSEG). The scheduler considers each KSEG to * be an indivisible unit from a time-sharing perspective, though each KSEG may * contain multiple KSEs. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message