Commit Graph

15 Commits

Author SHA1 Message Date
Olivier Houchard
579d53f4cf Get the kernel stack right now that the u-area is gone. 2004-11-20 16:51:32 +00:00
David Schultz
11111b709f U areas are going away, so don't allocate one for process 0.
Reviewed by:	arch@
2004-11-20 02:29:25 +00:00
Olivier Houchard
ed4dc69883 Use MD_ROOT_SIZE, instead of our own macro. 2004-10-11 14:41:38 +00:00
Olivier Houchard
906ce37658 Big cleanup: get ride of the whole spl level logic, as FreeBSD doesn't use
it anymore.
2004-09-23 22:33:38 +00:00
Olivier Houchard
8413603da8 Now that we have pmap_growkernel(), use more KVA. 2004-09-23 22:32:33 +00:00
Olivier Houchard
a5bb1c8501 Remove bus_space_vaddr(), it does not exists in FreeBSD. 2004-09-23 21:59:14 +00:00
Julian Elischer
ed062c8d66 Refactor a bunch of scheduler code to give basically the same behaviour
but with slightly cleaned up interfaces.

The KSE structure has become the same as the "per thread scheduler
private data" structure. In order to not make the diffs too great
one is #defined as the other at this time.

The KSE (or td_sched) structure is  now allocated per thread and has no
allocation code of its own.

Concurrency for a KSEGRP is now kept track of via a simple pair of counters
rather than using KSE structures as tokens.

Since the KSE structure is different in each scheduler, kern_switch.c
is now included at the end of each scheduler. Nothing outside the
scheduler knows the contents of the KSE (aka td_sched) structure.

The fields in the ksegrp structure that are to do with the scheduler's
queueing mechanisms are now moved to the kg_sched structure.
(per ksegrp scheduler private data structure). In other words how the
scheduler queues and keeps track of threads is no-one's business except
the scheduler's. This should allow people to write experimental
schedulers with completely different internal structuring.

A scheduler call sched_set_concurrency(kg, N) has been added that
notifies teh scheduler that no more than N threads from that ksegrp
should be allowed to be on concurrently scheduled. This is also
used to enforce 'fainess' at this time so that a ksegrp with
10000 threads can not swamp a the run queue and force out a process
with 1 thread, since the current code will not set the concurrency above
NCPU, and both schedulers will not allow more than that many
onto the system run queue at a time. Each scheduler should eventualy develop
their own methods to do this now that they are effectively separated.

Rejig libthr's kernel interface to follow the same code paths as
linkse for scope system threads. This has slightly hurt libthr's performance
but I will work to recover as much of it as I can.

Thread exit code has been cleaned up greatly.
exit and exec code now transitions a process back to
'standard non-threaded mode' before taking the next step.
Reviewed by:	scottl, peter
MFC after:	1 week
2004-09-05 02:09:54 +00:00
Olivier Houchard
0e564675e4 Define __RMAN_RESOURCE_VISIBLE where appropriate. 2004-07-02 22:30:10 +00:00
Olivier Houchard
848194ce76 Include sys/module.h. 2004-06-19 17:38:32 +00:00
Olivier Houchard
612246d6ac Nuke dead code. 2004-06-17 17:52:12 +00:00
Olivier Houchard
62f1185016 Nuke bus_space_mmap(), as it does not exist in FreeBSD. 2004-06-17 17:51:48 +00:00
Poul-Henning Kamp
89c9c53da0 Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
Olivier Houchard
fffcd6531e Define uart_sa1110_ops and uart_sa1110_classe in .c files instead of spamming
uart_cpu.h
2004-05-14 13:42:50 +00:00
Olivier Houchard
dfc9776e84 Implement enough of an uart driver to get serial console working. 2004-05-14 13:26:52 +00:00
Olivier Houchard
6fc729af63 Import FreeBSD/arm kernel bits.
It only supports sa1110 (on simics) right now, but xscale support should come
soon.
Some of the initial work has been provided by :
Stephane Potvin <sepotvin at videotron.ca>
Most of this comes from NetBSD.
2004-05-14 11:46:45 +00:00