Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jun 2002 01:22:52 -0700 (PDT)
From:      Julian Elischer <julian@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 13313 for review
Message-ID:  <200206230822.g5N8MqU80663@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206230822.g5N8MqU80663>