]> Zhao Yanbai Git Server - minix.git/commit
exec() cleanup, generalization, improvement
authorBen Gras <ben@minix3.org>
Wed, 30 May 2012 17:34:07 +0000 (19:34 +0200)
committerBen Gras <ben@minix3.org>
Thu, 7 Jun 2012 13:15:01 +0000 (15:15 +0200)
commit040362e379bc2acf4861d4afae5563697dac9e57
tree094a35fe0dd15c518dbb98034c5ce1312b55e9ce
parent41b869d4d61342107fbd219c97dbc4da46975af8
exec() cleanup, generalization, improvement

. make exec() callers (i.e. vfs and rs) determine the
  memory layout by explicitly reserving regions using
  mmap() calls on behalf of the exec()ing process,
  i.e. handling all of the exec logic, thereby eliminating
  all special exec() knowledge from VM.
. the new procedure is: clear the exec()ing process
  first, then call third-party mmap()s to reserve memory, then
  copy the executable file section contents in, all using callbacks
  tailored to the caller's way of starting an executable
. i.e. no more explicit EXEC_NEWMEM-style calls in PM or VM
  as with rigid 2-section arguments
. this naturally allows generalizing exec() by simply loading
  all ELF sections
. drop/merge of lots of duplicate exec() code into libexec
. not copying the code sections to vfs and into the executable
  again is a measurable performance improvement (about 3.3% faster
  for 'make' in src/servers/)
29 files changed:
include/arch/i386/include/vmparam.h
include/minix/callnr.h
include/minix/sys_config.h
include/minix/type.h
include/minix/vm.h
kernel/arch/i386/pre_init.c
lib/libexec/Makefile
lib/libexec/exec_elf.c
lib/libexec/exec_general.c [new file with mode: 0644]
lib/libexec/libexec.h
lib/libminc/Makefile
lib/libsys/Makefile
lib/libsys/vm_exec_newmem.c [deleted file]
lib/libsys/vm_procctl.c
servers/pm/exec.c
servers/pm/param.h
servers/pm/proto.h
servers/pm/table.c
servers/rs/exec.c
servers/rs/exec.h [deleted file]
servers/vfs/exec.c
servers/vfs/exec.h [deleted file]
servers/vm/arch/i386/memory.h
servers/vm/exec.c
servers/vm/exit.c
servers/vm/main.c
servers/vm/mmap.c
servers/vm/proto.h
servers/vm/signal.c