summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--advantages.mdwn2
-rw-r--r--glibc/fork.mdwn51
-rw-r--r--open_issues/fork_mach_port_mod_refs_ekern_urefs_owerflow.mdwn5
-rw-r--r--open_issues/performance/fork.mdwn8
-rw-r--r--open_issues/virtualization.mdwn7
-rw-r--r--rpc.mdwn14
6 files changed, 77 insertions, 10 deletions
diff --git a/advantages.mdwn b/advantages.mdwn
index 18e6506b..8b41f3cd 100644
--- a/advantages.mdwn
+++ b/advantages.mdwn
@@ -51,6 +51,8 @@ it runs efficiently on both single processors and symmetric multiprocessors.
The Hurd interfaces are designed to allow transparent network clusters
(*collectives*), although this feature has not yet been implemented.
+See also [[unsorted/hurd-migr]] ([[!taglink open_issue_documentation]]).
+
-->
The Hurd is an attractive platform for learning how to become a kernel hacker
diff --git a/glibc/fork.mdwn b/glibc/fork.mdwn
new file mode 100644
index 00000000..564d9d5b
--- /dev/null
+++ b/glibc/fork.mdwn
@@ -0,0 +1,51 @@
+[[!meta copyright="Copyright © 2010 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+On [[Unix]] systems, `fork` is a rather simple system call.
+
+Our implementation in [[glibc]] is and needs to be rather bulky.
+
+For example, it has to duplicate all port rights for the new [[Mach
+task|microkernel/mach/task]]. The address space can simply be duplicated by
+standard means of the [[microkernel/Mach]], but as [[file descriptor]]s (for
+example) are a concept that is implemented inside [[glibc]] (based on [[Mach
+port|microkernel/mach/port]]s), these have to be duplicated from userspace,
+which requires a small number of [[RPC]] for each of them.
+
+In sum, [[this affects performance|open_issues/performance/fork]] when new
+processes are continuously being spawned from the shell, for example.
+
+Often, a `fork` call will eventually be followed by an `exec`, which will in
+turn close (most of) the duplicated port rights. Unfortunately, this cannot be
+known at the time the `fork` executing, so the code calling `fork` has to be
+modified, and the `fork`, `exec` combo be replaced by a `posix_spawn` call, for
+example, to avoid this work of duplicating each port right, then closing each
+again.
+
+As far as we know, Cygwin has the same problem of `fork` being a nontrivial
+operation. Perhaps we can learn from what they're been doing? Also, perhaps
+they have patches for software packages, to avoid using `fork` followed by
+`exec`, for example.
+
+
+# TODO
+
+ * [[fork: mach_port_mod_refs:
+ EKERN_UREFS_OWERFLOW|open_issues/fork_mach_port_mod_refs_ekern_urefs_owerflow]]
+ ([[!taglink open_issue_glibc]]).
+
+ * Include de-duplicate information from elsewhere: [[hurd-paper]],
+ [[hurd-talk]] [[hurd/ng/trivialconfinementvsconstructorvsfork]],
+ [[open_issues/resource_management_problems/zalloc_panics]] ([[!taglink
+ open_issue_glibc open_issue_documentation]]).
+
+ * We no longer support `MACH_IPC_COMPAT`, thus we can get rid of the `err =
+ __mach_port_allocate_name ([...]); if (err == KERN_NAME_EXISTS)` code
+ ([[!taglink open_issue_glibc]]).
diff --git a/open_issues/fork_mach_port_mod_refs_ekern_urefs_owerflow.mdwn b/open_issues/fork_mach_port_mod_refs_ekern_urefs_owerflow.mdwn
index b6ecb92a..e80a5661 100644
--- a/open_issues/fork_mach_port_mod_refs_ekern_urefs_owerflow.mdwn
+++ b/open_issues/fork_mach_port_mod_refs_ekern_urefs_owerflow.mdwn
@@ -159,3 +159,8 @@ The error is 19, `EKERN_UREFS_OVERFLOW`.
successfully.)
[[!tag open_issue_glibc]]
+
+
+# Discussion
+
+<http://lists.gnu.org/archive/html/bug-hurd/2010-11/msg00028.html>
diff --git a/open_issues/performance/fork.mdwn b/open_issues/performance/fork.mdwn
index 390f6b99..2748be53 100644
--- a/open_issues/performance/fork.mdwn
+++ b/open_issues/performance/fork.mdwn
@@ -10,13 +10,7 @@ License|/fdl]]."]]"""]]
[[!tag open_issue_glibc open_issue_hurd]]
-On Unix systems, `fork` is a rather simple system call. Our implementation in
-[[glibc]] is / needs to be rather bulky. TODO: elaborate.
-
-This affects performance when new processes are continuously being spawned from
-the shell, for example.
-
-Alternatives: use `posix_spawn`. Others?
+Our [[`fork` implementation|glibc/fork]] is nontrivial.
To do: hard numbers.
[[Microbenchmarks]]?
diff --git a/open_issues/virtualization.mdwn b/open_issues/virtualization.mdwn
index ebf86a2d..343f624a 100644
--- a/open_issues/virtualization.mdwn
+++ b/open_issues/virtualization.mdwn
@@ -20,6 +20,13 @@ An index of things to work on w.r.t. virtualization.
* [[hurd/subhurd]] / [[hurd/neighborhurd]]
+<!--
+
+ * There's talking about *collectives* in the Hurd RM, on [[/advantages]] and
+ [[unsorted/hurd-migr]] ([[!taglink open_issue_documentation]]).
+
+-->
+
* [[Implementing_Hurd_On_Top_of_Another_System]]
* Unix / Linux
diff --git a/rpc.mdwn b/rpc.mdwn
index 9703268f..176197dd 100644
--- a/rpc.mdwn
+++ b/rpc.mdwn
@@ -1,11 +1,19 @@
-[[!meta copyright="Copyright © 2007, 2008 Free Software Foundation, Inc."]]
+[[!meta copyright="Copyright © 2007, 2008, 2010 Free Software Foundation,
+Inc."]]
[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
-is included in the section entitled
-[[GNU Free Documentation License|/fdl]]."]]"""]]
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
RPC stands for remote procedure call.
+
+
+# See Also
+
+ * [[Mach RPC|microkernel/mach/rpc]]s
+
+ * the [[Hurd's rpctrace|hurd/debugging/rpctrace]]