]> Zhao Yanbai Git Server - minix.git/log
minix.git
14 years agorelease.sh: avoid egrep -x which the base system doesn't support
Erik van der Kouwe [Wed, 9 Jun 2010 14:32:19 +0000 (14:32 +0000)]
release.sh: avoid egrep -x which the base system doesn't support

14 years agoRename tell_fs to tell_vfs
Arun Thomas [Wed, 9 Jun 2010 14:31:30 +0000 (14:31 +0000)]
Rename tell_fs to tell_vfs

14 years agoissue.install: 3.1.8
Ben Gras [Wed, 9 Jun 2010 14:02:35 +0000 (14:02 +0000)]
issue.install: 3.1.8

14 years agolib: declarations that needed ANSIfication since prototypes are declared
Ben Gras [Wed, 9 Jun 2010 13:01:11 +0000 (13:01 +0000)]
lib: declarations that needed ANSIfication since prototypes are declared

14 years agoash: getmode in global includes now
Ben Gras [Wed, 9 Jun 2010 12:58:03 +0000 (12:58 +0000)]
ash: getmode in global includes now

14 years agofind: fix warnings + error
Ben Gras [Wed, 9 Jun 2010 12:53:51 +0000 (12:53 +0000)]
find: fix warnings + error

14 years agoinlcude: new prototypes
Ben Gras [Wed, 9 Jun 2010 12:53:09 +0000 (12:53 +0000)]
inlcude: new prototypes

14 years agoman: no more minix find manpage
Ben Gras [Wed, 9 Jun 2010 12:30:25 +0000 (12:30 +0000)]
man: no more minix find manpage

14 years agocommands: import of netbsd find
Ben Gras [Wed, 9 Jun 2010 12:27:36 +0000 (12:27 +0000)]
commands: import of netbsd find

14 years agocommands/find: original netbsd find
Ben Gras [Wed, 9 Jun 2010 12:19:38 +0000 (12:19 +0000)]
commands/find: original netbsd find

14 years agocommands, man: remove minix find
Ben Gras [Wed, 9 Jun 2010 12:17:42 +0000 (12:17 +0000)]
commands, man: remove minix find

14 years agoash: remove setmode() declaration from shell.h, now in library
Ben Gras [Wed, 9 Jun 2010 12:11:56 +0000 (12:11 +0000)]
ash: remove setmode() declaration from shell.h, now in library

14 years agounistd.h: add setmode() prototype.
Ben Gras [Wed, 9 Jun 2010 12:11:33 +0000 (12:11 +0000)]
unistd.h: add setmode() prototype.

14 years agoerr.h: include prototypes for new err* and warn* functions.
Ben Gras [Wed, 9 Jun 2010 12:11:13 +0000 (12:11 +0000)]
err.h: include prototypes for new err* and warn* functions.

14 years agocrtso.S: save *argv[] and argc globally, to be used by getprogname().
Ben Gras [Wed, 9 Jun 2010 12:10:31 +0000 (12:10 +0000)]
crtso.S: save *argv[] and argc globally, to be used by getprogname().

14 years agolibc: minor minix changes for new netbsd files
Ben Gras [Wed, 9 Jun 2010 12:09:39 +0000 (12:09 +0000)]
libc: minor minix changes for new netbsd files

14 years agolibc: add original netbsd files
Ben Gras [Wed, 9 Jun 2010 12:08:32 +0000 (12:08 +0000)]
libc: add original netbsd files

14 years agolibutil: minix efun.c
Ben Gras [Wed, 9 Jun 2010 12:05:53 +0000 (12:05 +0000)]
libutil: minix efun.c

14 years agolibutil: original netbsd efun.c
Ben Gras [Wed, 9 Jun 2010 12:05:04 +0000 (12:05 +0000)]
libutil: original netbsd efun.c

14 years agoincludes: minix <util.h>
Ben Gras [Wed, 9 Jun 2010 12:03:19 +0000 (12:03 +0000)]
includes: minix <util.h>

14 years agoincludes: original netbsd <util.h>
Ben Gras [Wed, 9 Jun 2010 12:02:20 +0000 (12:02 +0000)]
includes: original netbsd <util.h>

14 years agoTurn off debug message.
Thomas Veerman [Wed, 9 Jun 2010 11:05:16 +0000 (11:05 +0000)]
Turn off debug message.

14 years agokernel: fix assert condition after a caught in-kernel pagefault
Ben Gras [Wed, 9 Jun 2010 10:59:57 +0000 (10:59 +0000)]
kernel: fix assert condition after a caught in-kernel pagefault

14 years agoFix a bug in put_inode that causes corruption to the file system and another
Thomas Veerman [Wed, 9 Jun 2010 09:56:43 +0000 (09:56 +0000)]
Fix a bug in put_inode that causes corruption to the file system and another
bug that causes problems when files grow bigger than a certain threshold. Also
fix a few type and code inconsistencies.

14 years agoint to endpoint_t conversions in mmap
Tomas Hruby [Wed, 9 Jun 2010 09:14:53 +0000 (09:14 +0000)]
int to endpoint_t conversions in mmap

14 years agolib: move tzfile.h from lib/libc/stdtime/ to include/ for general usage.
Ben Gras [Tue, 8 Jun 2010 19:11:42 +0000 (19:11 +0000)]
lib: move tzfile.h from lib/libc/stdtime/ to include/ for general usage.

14 years agoMore endpoint_t correctness.
Kees van Reeuwijk [Tue, 8 Jun 2010 14:09:18 +0000 (14:09 +0000)]
More endpoint_t correctness.
More const correctness.
Other code cleanup.

14 years agoRemove legacy MM, FS, and FS_PROC_NR macros
Arun Thomas [Tue, 8 Jun 2010 13:58:01 +0000 (13:58 +0000)]
Remove legacy MM, FS, and FS_PROC_NR macros

14 years agoRemove redundant macro cproc_addr
Erik van der Kouwe [Tue, 8 Jun 2010 13:38:44 +0000 (13:38 +0000)]
Remove redundant macro cproc_addr

14 years agoAdd endpoint checks in scheduling kernel calls
Erik van der Kouwe [Tue, 8 Jun 2010 12:04:21 +0000 (12:04 +0000)]
Add endpoint checks in scheduling kernel calls

14 years agosupport for ukranian (charse koi8-u) contributed by Roman Ignatov.
Ben Gras [Tue, 8 Jun 2010 01:04:52 +0000 (01:04 +0000)]
support for ukranian (charse koi8-u) contributed by Roman Ignatov.

14 years agovm: junkfree feature that fills freed pages with a recognizable pattern.
Ben Gras [Tue, 8 Jun 2010 00:59:48 +0000 (00:59 +0000)]
vm: junkfree feature that fills freed pages with a recognizable pattern.

14 years agokernel: fix for vm_init that triggered assert(ptproc == newptproc)
Ben Gras [Mon, 7 Jun 2010 22:21:45 +0000 (22:21 +0000)]
kernel: fix for vm_init that triggered assert(ptproc == newptproc)

 - zero cr3 in vm_init() to avoid switch_address_space() not doing anything.

 - add vm_stop() to disable paging on shutdown.

14 years agoe1000: map in 0x1000 of flash if 0x10000 fails.
Ben Gras [Mon, 7 Jun 2010 16:30:10 +0000 (16:30 +0000)]
e1000: map in 0x1000 of flash if 0x10000 fails.

14 years agoversion: trunk will become 3.1.8.
Ben Gras [Mon, 7 Jun 2010 15:57:14 +0000 (15:57 +0000)]
version: trunk will become 3.1.8.

14 years agoFix typo
Thomas Veerman [Mon, 7 Jun 2010 13:46:05 +0000 (13:46 +0000)]
Fix typo

14 years agotools: fix installing includes.
Ben Gras [Mon, 7 Jun 2010 10:10:27 +0000 (10:10 +0000)]
tools: fix installing includes.

14 years agoLazy FPU
Tomas Hruby [Mon, 7 Jun 2010 07:43:17 +0000 (07:43 +0000)]
Lazy FPU

- FPU context is stored only if conflict between 2 FPU users or while
  exporting context of a process to userspace while it is the active
  user of FPU

- FPU has its owner (fpu_owner) which points to the process whose
  state is currently loaded in FPU

- the FPU exception is only turned on when scheduling a process which
  is not the owner of FPU

- FPU state is restored for the process that generated the FPU
  exception. This process runs immediately without letting scheduler
  to pick a new process to resolve the FPU conflict asap, to minimize
  the FPU thrashing and FPU exception hadler execution

- faster all non-FPU-exception kernel entries as FPU state is not
  checked nor saved

- removed MF_USED_FPU flag, only MF_FPU_INITIALIZED remains to signal
  that a process has used FPU in the past

14 years agoVM: Remove legacy non-paging code paths
Arun Thomas [Sat, 5 Jun 2010 14:39:40 +0000 (14:39 +0000)]
VM: Remove legacy non-paging code paths

14 years agoEnter package names in packman
Erik van der Kouwe [Sat, 5 Jun 2010 13:25:41 +0000 (13:25 +0000)]
Enter package names in packman

14 years agoPut initialization code where it belongs.
Cristiano Giuffrida [Fri, 4 Jun 2010 18:08:15 +0000 (18:08 +0000)]
Put initialization code where it belongs.

14 years agoFix range checking in safecopy.
Cristiano Giuffrida [Fri, 4 Jun 2010 18:05:38 +0000 (18:05 +0000)]
Fix range checking in safecopy.

14 years agoRemove gcc-4.1.1 from packages list
Arun Thomas [Fri, 4 Jun 2010 12:36:40 +0000 (12:36 +0000)]
Remove gcc-4.1.1 from packages list

14 years agoRemoved a buggy assert unintentionally commted in r7044
Tomas Hruby [Fri, 4 Jun 2010 10:54:43 +0000 (10:54 +0000)]
Removed a buggy assert unintentionally commted in r7044

14 years agoThis patch changes the release script in the following ways:
Erik van der Kouwe [Fri, 4 Jun 2010 05:09:44 +0000 (05:09 +0000)]
This patch changes the release script in the following ways:
- A staging directory is always used to avoid oversized images;
- As a consequence, the zero-filling is removed so no more "out of
  space" errors should be printed to the console;
- The root and usr partition sizes are computed so less space should be
  wasted (the root partition gets extra 1MB zones and 64 inodes for
  run-time though and hardlinks/holes make the used space slightly less
  than expected); USRMB (and the new ROOTMB) are now used to enforce
  a minimum size rather than set the size;
- TMPDISK1-3 are renamed to more meaningful names (and TMPDISK2 is
  dropped because a separate tmp directory is no longer needed);
- The ramdisks are truncated at the end to save memory (not sure
  whether it is actually released though).

14 years agoCreate link for lstat
Erik van der Kouwe [Fri, 4 Jun 2010 04:44:09 +0000 (04:44 +0000)]
Create link for lstat

14 years agokernel fpu context switching: fix race condition
Ben Gras [Thu, 3 Jun 2010 11:32:22 +0000 (11:32 +0000)]
kernel fpu context switching: fix race condition

There seems to have been a broken assumption in the fpu context
restoring code.  It restores the context of the running process, without
guarantee that the current process is the one that will be scheduled.
This caused fpu saving for a different process to be triggered without
fpu hardware being enabled, causing an fpu exception in the kernel. This
practically only shows up with DEBUG_RACE on. Fix my thruby+me.

The fix
 . is to only set the fpu-in-use-by-this-process flag in the
   exception handler, and then take care of fpu restoring when
   actually returning to userspace

And the patch
 . translates fpu saving and restoring to c in arch_system.c,
   getting rid of a juicy chunk of assembly
 . makes osfxsr_feature private to arch_system.c
 . removes most of the arch dependent code from do_sigsend

14 years agoAlways skip signals for PM itself when broadcasting.
Cristiano Giuffrida [Thu, 3 Jun 2010 11:18:43 +0000 (11:18 +0000)]
Always skip signals for PM itself when broadcasting.

14 years agomove drivers/random SHA implementation to libutil and header to <minix/sha2.h>
Ben Gras [Wed, 2 Jun 2010 22:58:29 +0000 (22:58 +0000)]
move drivers/random SHA implementation to libutil and header to <minix/sha2.h>

14 years agoUse endpoint_t for the destination of mini_send and _syscall, and the
Kees van Reeuwijk [Wed, 2 Jun 2010 21:51:32 +0000 (21:51 +0000)]
Use endpoint_t for the destination of mini_send and _syscall, and the
source of mini_receive.

Also some small cleanup.

14 years agoFix ftp client's passive mode.
Gianluca Guida [Wed, 2 Jun 2010 21:12:54 +0000 (21:12 +0000)]
Fix ftp client's passive mode.

Before the ioctl the code zeroed the wrong variable.

14 years agoRemoved some unused variables and functions.
Kees van Reeuwijk [Wed, 2 Jun 2010 19:41:38 +0000 (19:41 +0000)]
Removed some unused variables and functions.

14 years agosetup: default root partition size is 64MB, reinstall keeps old root size
Erik van der Kouwe [Wed, 2 Jun 2010 17:07:10 +0000 (17:07 +0000)]
setup: default root partition size is 64MB, reinstall keeps old root size

14 years agoGracefull crash if FPU exception in kernel
Tomas Hruby [Wed, 2 Jun 2010 13:59:55 +0000 (13:59 +0000)]
Gracefull crash if FPU exception in kernel

14 years agoboot monitor: introduce a 'reset' command that causes the cpu to
Ben Gras [Wed, 2 Jun 2010 13:23:15 +0000 (13:23 +0000)]
boot monitor: introduce a 'reset' command that causes the cpu to
reset (triple fault).

14 years agoFixed stack trace if panic in stop_context()
Tomas Hruby [Wed, 2 Jun 2010 08:53:49 +0000 (08:53 +0000)]
Fixed stack trace if panic in stop_context()

14 years agoRamdisk makefile update
Arun Thomas [Tue, 1 Jun 2010 15:11:43 +0000 (15:11 +0000)]
Ramdisk makefile update

14 years agoRelease script: Remove .d/.depend files from CD
Arun Thomas [Tue, 1 Jun 2010 14:44:36 +0000 (14:44 +0000)]
Release script: Remove .d/.depend files from CD

14 years agoClean up MFS a bit:
Thomas Veerman [Tue, 1 Jun 2010 12:35:33 +0000 (12:35 +0000)]
Clean up MFS a bit:
 - Remove unused includes.
 - Add include guards to headers.
 - Use unsigned variables in case they're never going to hold a negative
   value. This causes GCC's complaints to disappear and should make flexelint
   a lot happier, too.
 - Make functions private when they're used only within a module.
 - Remove unused variables.
 - Add casts where appropriate.

14 years agopackages: don't put oss on cd.
Ben Gras [Tue, 1 Jun 2010 11:11:35 +0000 (11:11 +0000)]
packages: don't put oss on cd.

14 years agoMinor makefile changes for GCC
Arun Thomas [Tue, 1 Jun 2010 09:41:31 +0000 (09:41 +0000)]
Minor makefile changes for GCC

14 years agoKCall methods do not depend on m_source and m_type fields
Tomas Hruby [Tue, 1 Jun 2010 08:54:31 +0000 (08:54 +0000)]
KCall methods do not depend on m_source and m_type fields

- substituted the use of the m_source message field by
  caller->p_endpoint in kernel calls. It is the same information, just
  passed more intuitively.

- the last dependency on m_type field is removed.

- do_unused() is substituted by a check for NULL.

- this pretty much removes the depency of kernel calls on the general
  message format. In the future this may be used to pass the kcall
  arguments in a different structure or registers (x86-64, ARM?) The
  kcall number may be passed in a register already.

14 years agodo_safecopy split
Tomas Hruby [Tue, 1 Jun 2010 08:51:37 +0000 (08:51 +0000)]
do_safecopy split

- removes dependency of do_safecopy() on the m_type field of the kcall
  messages.

- instead of do_safecopy() figuring out what action is requested, the
  correct safecopy method is called right away.

14 years agoRemove those annoying $Id and $Revision tags
Erik van der Kouwe [Mon, 31 May 2010 20:00:08 +0000 (20:00 +0000)]
Remove those annoying $Id and $Revision tags

14 years agoClean up PFS
Thomas Veerman [Fri, 28 May 2010 09:39:18 +0000 (09:39 +0000)]
Clean up PFS

14 years agoRemove obsolete _fpu_present variable from crtso.S
Erik van der Kouwe [Thu, 27 May 2010 09:46:42 +0000 (09:46 +0000)]
Remove obsolete _fpu_present variable from crtso.S

14 years agoOops, committed too much
Erik van der Kouwe [Thu, 27 May 2010 09:20:50 +0000 (09:20 +0000)]
Oops, committed too much

14 years agoAvoid use of C++ reserved word class in headers (reported by Aki Goto, tracker item...
Erik van der Kouwe [Thu, 27 May 2010 09:18:49 +0000 (09:18 +0000)]
Avoid use of C++ reserved word class in headers (reported by Aki Goto, tracker item 375)

14 years agoAvoid use of C++ reserved word class in headers (reported by Aki Goto, tracker item...
Erik van der Kouwe [Thu, 27 May 2010 08:48:53 +0000 (08:48 +0000)]
Avoid use of C++ reserved word class in headers (reported by Aki Goto, tracker item 375)

14 years agoReorganize some directories
Arun Thomas [Wed, 26 May 2010 22:49:57 +0000 (22:49 +0000)]
Reorganize some directories

servers/hgfs/hgfs_server => servers/hgfs
servers/hgfs/libhgfs => lib/libhgfs
servers/rs/service => commands/service
drivers/memory/memory_driver => drivers/memory
drivers/memory/ramdisk => drivers/ramdisk

14 years agoGCC build fixes/updates
Arun Thomas [Wed, 26 May 2010 18:45:55 +0000 (18:45 +0000)]
GCC build fixes/updates

-Set stack sizes for boot image processes
-Increase RS stack size
-Reduce ramdisk size
-HARDWARE task should use kernel stack
-Minor asm tweaks for leading underscores

14 years agodifferent rtl8169 shutdown code
David van Moolenbroek [Wed, 26 May 2010 11:22:06 +0000 (11:22 +0000)]
different rtl8169 shutdown code

14 years agomake IS report masked IRQs properly
David van Moolenbroek [Wed, 26 May 2010 08:44:50 +0000 (08:44 +0000)]
make IS report masked IRQs properly

14 years agoFixed ms-based scheduling for legacy timer
Tomas Hruby [Wed, 26 May 2010 08:20:29 +0000 (08:20 +0000)]
Fixed ms-based scheduling for legacy timer

14 years agoVarious small scheduling related fixes
Tomas Hruby [Wed, 26 May 2010 07:16:39 +0000 (07:16 +0000)]
Various small scheduling related fixes

14 years agoreset alarm timer on PRIVCTL
David van Moolenbroek [Wed, 26 May 2010 07:10:28 +0000 (07:10 +0000)]
reset alarm timer on PRIVCTL

14 years agoscheduling - time quantum in miliseconds
Tomas Hruby [Tue, 25 May 2010 08:06:14 +0000 (08:06 +0000)]
scheduling - time quantum in miliseconds

- Currently the cpu time quantum is timer-ticks based. Thus the
  remaining quantum is decreased only if the processes is interrupted
  by a timer tick. As processes block a lot this typically does not
  happen for normal user processes. Also the quantum depends on the
  frequency of the timer.

- This change makes the quantum miliseconds based. Internally the
  miliseconds are translated into cpu cycles. Everytime userspace
  execution is interrupted by kernel the cycles just consumed by the
  current process are deducted from the remaining quantum.

- It makes the quantum system timer frequency independent.

- The boot processes quantum is loosely derived from the tick-based
  quantas and 60Hz timer and subject to future change

- the 64bit arithmetics is a little ugly, will be changes once we have
  compiler support for 64bit integers (soon)

14 years agoFixed some inconsistent strict typing declarations.
Kees van Reeuwijk [Tue, 25 May 2010 07:23:24 +0000 (07:23 +0000)]
Fixed some inconsistent strict typing declarations.
Better strict typing.

14 years agofix int64.3 man page formatting
David van Moolenbroek [Mon, 24 May 2010 21:10:37 +0000 (21:10 +0000)]
fix int64.3 man page formatting

14 years agoOops, last commit included more than was intended
Erik van der Kouwe [Thu, 20 May 2010 08:07:47 +0000 (08:07 +0000)]
Oops, last commit included more than was intended

14 years agoMore system processes, this was not enough for the release script to run on some...
Erik van der Kouwe [Thu, 20 May 2010 08:05:07 +0000 (08:05 +0000)]
More system processes, this was not enough for the release script to run on some configurations

14 years agoMinor patch: increase size of root partition for minimal release, eve very small...
Erik van der Kouwe [Wed, 19 May 2010 20:11:22 +0000 (20:11 +0000)]
Minor patch: increase size of root partition for minimal release, eve very small additions with -c made it fail

14 years agoBuildsystem changes for GCC
Arun Thomas [Wed, 19 May 2010 13:24:15 +0000 (13:24 +0000)]
Buildsystem changes for GCC

-Makefile updates
-Update mkdep
-Build fixes/warning cleanups for some programs
-Restore leading underscores on global syms in kernel asm files
-Increase ramdisk size

14 years agopm - fix sched interaction
Ben Gras [Wed, 19 May 2010 13:22:29 +0000 (13:22 +0000)]
pm - fix sched interaction

For coredumping processes, PM forgets to inform SCHED that the
process has vanished, causing future fork()s to fail.

14 years agoMore sensible description for EPERM from http://www.opengroup.org/onlinepubs/00009539...
Erik van der Kouwe [Wed, 19 May 2010 11:51:49 +0000 (11:51 +0000)]
More sensible description for EPERM from http://www.opengroup.org/onlinepubs/000095399/basedefs/errno.h.html

14 years agocharset cp1251 contributed by Roman Ignatov.
Ben Gras [Wed, 19 May 2010 11:34:47 +0000 (11:34 +0000)]
charset cp1251 contributed by Roman Ignatov.

14 years agopackages: gcc-libs renamed, include gcc-4.4.3
Ben Gras [Wed, 19 May 2010 10:22:57 +0000 (10:22 +0000)]
packages: gcc-libs renamed, include gcc-4.4.3

14 years agouse oxpcie only if enabled to avoid baud bottleneck of uart.
Ben Gras [Wed, 19 May 2010 10:18:46 +0000 (10:18 +0000)]
use oxpcie only if enabled to avoid baud bottleneck of uart.

14 years agokernel: oxpcie serial card support.
Ben Gras [Wed, 19 May 2010 10:00:02 +0000 (10:00 +0000)]
kernel: oxpcie serial card support.

ask to map in oxpcie i/o memory and support serial i/o for it in the
kernel. set oxpcie=<address> in boot monitor (retrieve address using
pci_debug=1 output). (no sanity checking is done on the address
currently.) disabled by default.

The change also contains some other minor cleanup (a new serial.h to set
register info common to UART and the OXPCIe card, in-kernel memory
mapping a little more structured and env_get() to get sysenv variables
without knowing about the params_buffer).

14 years agoboot image - no need for entry point
Tomas Hruby [Tue, 18 May 2010 13:51:46 +0000 (13:51 +0000)]
boot image - no need for entry point

- removes the initial_pc from struct boot_image. It is always set
  to 0 and RS uses a.out headers.

14 years agoScheduling server (by Bjorn Swift)
Tomas Hruby [Tue, 18 May 2010 13:39:04 +0000 (13:39 +0000)]
Scheduling server (by Bjorn Swift)

In this second phase, scheduling is moved from PM to its own
scheduler (see r6557 for phase one). In the next phase we hope to a)
include useful information in the "out of quantum" message and b)
create some simple scheduling policy that makes use of that
information.

When the system starts up, PM will iterate over its process table and
ask SCHED to take over scheduling unprivileged processes. This is
done by sending a SCHEDULING_START message to SCHED. This message
includes the processes endpoint, the parent's endpoint and its nice
level. The scheduler adds this process to its schedproc table, issues
a schedctl, and returns its own endpoint to PM - as the endpoint of
the effective scheduler. When a process terminates, a SCHEDULING_STOP
message is sent to the scheduler.

The reason for this effective endpoint is for future compatibility.
Some day, we may have a scheduler that, instead of scheduling the
process itself, forwards the SCHEDULING_START message on to another
scheduler.

PM has information on who schedules whom. As such, scheduling
messages from user-land are sent through PM. An example is when
processes change their priority, using nice(). In that case, a
getsetpriority message is sent to PM, which then sends a
SCHEDULING_SET_NICE to the process's effective scheduler.

When a process is forked through PM, it inherits its parent's
scheduler, but is spawned with an empty quantum. As before, a request
to fork a process flows through VM before returning to PM, which then
wakes up the child process. This flow has been modified slightly so
that PM notifies the scheduler of the new process, before waking up
the child process. If the scheduler fails to take over scheduling,
the child process is torn down and the fork fails with an erroneous
value.

Process priority is entirely decided upon using nice levels. PM
stores a copy of each process's nice level and when a child is
forked, its parent's nice level is sent in the SCHEDULING_START
message. How this level is mapped to a priority queue is up to the
scheduler. It should be noted that the nice level is used to
determine the max_priority and the parent could have been in a lower
priority when it was spawned. To prevent a CPU intensive process from
hawking the CPU by continuously forking children that get scheduled
in the max_priority, the scheduler should determine in which queue
the parent is currently scheduled, and schedule the child in that
same queue.

Other fixes: The USER_Q in kernel/proc.h was incorrectly defined as
NR_SCHED_QUEUES/2. That results in a "off by one" error when
converting priority->nice->priority for nice=0. This also had the
side effect that if someone were to set the MAX_USER_Q to something
else than 0, then USER_Q would be off.

14 years agorename of mode/context switching functions
Tomas Hruby [Tue, 18 May 2010 13:00:39 +0000 (13:00 +0000)]
rename of mode/context switching functions

- this patch only renames schedcheck() to switch_to_user(),
  cycles_accounting_stop() to context_stop() and restart() to
  +restore_user_context()

- the motivation is that since the introduction of schedcheck() it has
  been abused for many things. It deserves a better name.  It should
  express the fact that from the moment we call the function we are in
  the process of switching to user.

- cycles_accounting_stop() was originally a single purpose function.
  As this function is called at were convenient places it is used in
  for other things too, e.g. (un)locking the kernel. Thus it deserves
  a better name too.

- using the old name, restart() does not call schedcheck(), however
  calls to restart are replaced by calls to schedcheck()
  [switch_to_user] and it calls restart() [restore_user_context]

14 years agoThis patch switches the MINIX3 ethernet driver stack from a port-based
David van Moolenbroek [Mon, 17 May 2010 22:22:53 +0000 (22:22 +0000)]
This patch switches the MINIX3 ethernet driver stack from a port-based
model to an instance-based model. Each ethernet driver instance is now
responsible for exactly one network interface card. The port field in
/etc/inet.conf now acts as an instance field instead.

This patch also updates the data link protocol. This update:
- eliminates the concept of ports entirely;
- eliminates DL_GETNAME entirely;
- standardizes on using m_source for IPC and DL_ENDPT for safecopies;
- removes error codes from TASK/STAT replies, as they were unused;
- removes a number of other old or unused fields;
- names and renames a few other fields.

All ethernet drivers have been changed to:
- conform to the new protocol, and exactly that;
- take on an instance number based on a given "instance" argument;
- skip that number of PCI devices in probe iterations;
- use config tables and environment variables based on that number;
- no longer be limited to a predefined maximum of cards in any way;
- get rid of any leftover non-safecopy support and other ancient junk;
- have a correct banner protocol figure, or none at all.

Other changes:
* Inet.conf is now taken to be line-based, and supports #-comments.
  No existing installations are expected to be affected by this.
* A new, select-based asynchio library replaces the old one.
  Kindly contributed by Kees J. Bot.
* Inet now supports use of select() on IP devices.
  Combined, the last two changes together speed up dhcpd
  considerably in the presence of multiple interfaces.
* A small bug has been fixed in nonamed.

14 years agoAdd -M release.sh option to write out a symbol map, either to /usr/src on the image...
Erik van der Kouwe [Mon, 17 May 2010 16:52:48 +0000 (16:52 +0000)]
Add -M release.sh option to write out a symbol map, either to /usr/src on the image (without -m) or to the tools directory (with -m)

14 years agoFull 64-bit multitplication and division added to u64 library
Erik van der Kouwe [Mon, 17 May 2010 16:44:26 +0000 (16:44 +0000)]
Full 64-bit multitplication and division added to u64 library

14 years agoAwk build tweaks
Arun Thomas [Thu, 13 May 2010 19:29:42 +0000 (19:29 +0000)]
Awk build tweaks

-Make yacc invocation "less chatty to stderr" (again)
-Generate proctab.c (again)

14 years agoBuildsystem tweaks
Arun Thomas [Thu, 13 May 2010 13:26:27 +0000 (13:26 +0000)]
Buildsystem tweaks

Set build output verbosity level down to 1.
Make the 'install' target depend on the 'all' and 'depend' targets.

14 years agoFix permissions for halt, reboot, and shutdown
Arun Thomas [Thu, 13 May 2010 12:05:53 +0000 (12:05 +0000)]
Fix permissions for halt, reboot, and shutdown

14 years agoxargs does not support the -f flag
Erik van der Kouwe [Wed, 12 May 2010 19:17:17 +0000 (19:17 +0000)]
xargs does not support the -f flag

14 years agoConvert boot/ and commands/ over to bsdmake
Arun Thomas [Wed, 12 May 2010 16:28:54 +0000 (16:28 +0000)]
Convert boot/ and commands/ over to bsdmake