summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--glibc.mdwn5
-rw-r--r--glibc/signal.mdwn5
-rw-r--r--glibc/signal/signal_thread.mdwn7
-rw-r--r--hurd/documentation/translator_primer.mdwn2
-rw-r--r--hurd/porting/guidelines.mdwn15
-rw-r--r--hurd/running/qemu.mdwn5
-rw-r--r--news/2011-q2-ps.mdwn60
-rw-r--r--user/jkoenig/java.mdwn8
-rw-r--r--user/jkoenig/java/discussion.mdwn33
9 files changed, 135 insertions, 5 deletions
diff --git a/glibc.mdwn b/glibc.mdwn
index 6c49508f..c7313c1c 100644
--- a/glibc.mdwn
+++ b/glibc.mdwn
@@ -28,6 +28,11 @@ Porting glibc to a specific architecture is non-trivial.
## [[Hurd-specific Port|hurd/glibc]]
+An important part of the [[Hurd]] actually resides in glibc: here, the POSIX
+interfaces are implemented on top of the [[Hurd IPC protocols|hurd/interface]].
+This is different to the Linux port, where most simple POSIX interfaces are in
+fact simply forwarded to/implemented as [[system_call]]s.
+
# Implementation Details
diff --git a/glibc/signal.mdwn b/glibc/signal.mdwn
index 84153cff..727247ac 100644
--- a/glibc/signal.mdwn
+++ b/glibc/signal.mdwn
@@ -10,8 +10,11 @@ is included in the section entitled [[GNU Free Documentation
License|/fdl]]."]]"""]]
The [[*UNIX signalling mechanism*|unix/signal]] is implemented for the GNU Hurd
-by means of a separate *[[signal_thread]]* that is part of every
+by means of a separate *[[signal_thread]]* that is part of every user-space
[[process]]. This makes handling of signals a separate thread of control.
+[[GNU Mach|microkernel/mach/gnumach]] itself has no idea what a signal is and
+`kill` is not a [[system_call]] (as it typically is in a [[UNIX]] system): it's
+implemented in [[glibc]].
* [[SA_SIGINFO, SA_SIGACTION|open_issues/sa_siginfo_sa_sigaction]]
diff --git a/glibc/signal/signal_thread.mdwn b/glibc/signal/signal_thread.mdwn
index 28855dbd..5341b1ab 100644
--- a/glibc/signal/signal_thread.mdwn
+++ b/glibc/signal/signal_thread.mdwn
@@ -8,6 +8,13 @@ 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]]."]]"""]]
+For delivering a signal, Mach forwards an `msg_sig_post` message from the
+invoker of `kill` to the target process. The target process' [[signal_thread]]
+job is it to listen to such messages and to set up signal handler contexts in
+other threads.
+
+---
+
[[!tag open_issue_documentation]]
<braunr> bugs around signals are very tricky
diff --git a/hurd/documentation/translator_primer.mdwn b/hurd/documentation/translator_primer.mdwn
index 24e66681..4586a8e6 100644
--- a/hurd/documentation/translator_primer.mdwn
+++ b/hurd/documentation/translator_primer.mdwn
@@ -29,7 +29,7 @@ To try out the simplest of translators, you can go the following simple steps:
$ touch hello
$ cat hello
- $ setrans hello /hurd/hello
+ $ settrans hello /hurd/hello
$ cat hello
"Hello World!"
$ settrans -g hello
diff --git a/hurd/porting/guidelines.mdwn b/hurd/porting/guidelines.mdwn
index ade921b0..8b7dcf02 100644
--- a/hurd/porting/guidelines.mdwn
+++ b/hurd/porting/guidelines.mdwn
@@ -1,5 +1,5 @@
-[[!meta copyright="Copyright © 2002, 2003, 2005, 2007, 2008, 2009 Free Software
-Foundation, Inc."]]
+[[!meta copyright="Copyright © 2002, 2003, 2005, 2007, 2008, 2009, 2010, 2011
+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
@@ -50,10 +50,19 @@ An example with `fpathconf`:
If you get Bad File Descriptor error when trying to read from a file (or accessing it at all), check the `open()` invocation. The second argument is the access method. If it is a hard coded number instead of a symbol defined in the standard header files, the code is screwed and should be fixed to either use `O_RDONLY`, `O_WRONLY` or `O_RDWR`. This bug was observed in the `fortunes` and `mtools` packages for example.
-## <a name="PATH_MAX_tt_MAX_PATH_tt_MAXPATHL"> `PATH_MAX` / `MAX_PATH` / `MAXPATHLEN` </a>
+## <a name="PATH_MAX_tt_MAX_PATH_tt_MAXPATHL">`PATH_MAX`, `MAX_PATH`, `MAXPATHLEN`, `_POSIX_PATH_MAX`</a>
Every unconditionalized use of `PATH_MAX`, `MAX_PATH` or `MAXPATHLEN` is a POSIX incompatibility. If there is no upper limit on the length of a path (as its the case for GNU), this symbol is not defined in any header file. Instead, you need to either use a different implementation that does not rely on the length of a string or use `sysconf()` to query the length at runtime. If `sysconf()` returns -1, you have to use `realloc()` to allocate the needed memory dynamically. Usually it is thus simpler to just use dynamic allocation. Sometimes the amount is actually known. Else, a geometrically growing loop can be used: for instance, see [Alioth patch](http://alioth.debian.org/tracker/download.php/30628/410472/303735/1575/cpulimit-path-max-fix.patch) or [Pulseaudio patch](http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=patch-pulse;att=1;bug=522100). Note that in some cases there are GNU extensions that just work fine: when the `__GLIBC__` macro is defined, `getcwd()` calls can be just replaced by `get_current_dir_name()` calls.
+Note: constants such as `_POSIX_PATH_MAX` are only the minimum required value
+for a potential corresponding `PATH_MAX` macro. They are not a replacement for
+`PATH_MAX`, just the minimum value that one can assume.
+
+Note 2: Yes, some POSIX functions such as `realpath()` actually assume that
+`PATH_MAX` is defined. This is a bug of the POSIX standard, which got fixed in
+the latest revisions, in which one can simply pass `NULL` to get a dynamically
+allocated buffer.
+
## <a name="ARG_MAX"> `ARG_MAX` </a>
Same rationale as `PATH_MAX`. There is no limit on the number of arguments.
diff --git a/hurd/running/qemu.mdwn b/hurd/running/qemu.mdwn
index 9f085d24..343707fa 100644
--- a/hurd/running/qemu.mdwn
+++ b/hurd/running/qemu.mdwn
@@ -100,6 +100,11 @@ If your machine supports hardware acceleration, you should really use the kvm va
to the command line, see below, if you are running Linux kernels 2.6.37 or 2.6.38 else IRQs may hang sooner or later. The kvm irq problems will be solved in kernel 2.6.39.
+/!\ Note that there are known performance issues with KVM on Linux 2.6.39
+kernels, compared to 2.6.32: [[!debbug 634149]]. We're preparing on a change
+on our side to work around this.
+
+
# Installing Debian/Hurd with QEMU using the Debian installer
Note: If you have hardware support, replace the qemu commands below with kvm, e.g. qemu-ing -> kvm-img.
diff --git a/news/2011-q2-ps.mdwn b/news/2011-q2-ps.mdwn
new file mode 100644
index 00000000..b3f3d6cc
--- /dev/null
+++ b/news/2011-q2-ps.mdwn
@@ -0,0 +1,60 @@
+[[!meta copyright="Copyright © 2011 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]]."]]"""]]
+
+[[!meta date="2011-07-19 23:42 UTC"]]
+
+A quarter of the Hurd, Q2 of 2011, PS: *Hurd truths and rumors*.
+[[!if test="included()" then="""[[!toggle id=full_news
+text="Details."]][[!toggleable id=full_news text="[[!paste id=full_news]]"]]"""
+else="
+[[!paste id=full_news]]"]]
+
+[[!cut id="full_news" text="""
+
+After [[our latest Quarter of the Hurd|news/2011-q2]] has been picked up by slashdot and phoronix did some [performance tests of the Hurd][phorperf], discussions have been running all over the net. While we are happy to see that there obviously is quite some interest in the Hurd, we also saw some rumors and outdated information flowing around. We hope that we will be able to clear them up a bit.
+
+[phorperf]: http://www.phoronix.com/scan.php?page=article&item=debian_gnu_hurd&num=1
+
+* *Debian wants to replace Linux with the Hurd:* ✘ **Wrong**: We plan to get into Wheezy as an additional port besides Linux and kFreeBSD; but we don't know whether we will make it. It depends on a lot of factors, such as porting the DDE toolkit to inherit Linux 2.6 network card drivers, porting more packages, and finishing the existing support. If you want to help [[porting|hurd/porting]], please contact us: We need you!
+
+* *Hurd developers want Linux to die:* ✘ **Wrong**: All of us are happy Linux users, and GNU/Linux currently is the only free system you can actually give to nontechnical users (and make them happy with free software), so it is the most important tool for spreading free software. We don’t work on the Hurd because of some kind of hatred against Linux or Linus. We like and use Linux. We work on the Hurd, because of the [[additional possibilities and clean design|advantages]] it provides.
+
+* *Java support on the Hurd is in the works:* <u>✔ **True**</u>: Jérémie Koenig is working on porting Java (OpenJDK 7) as part of his [[gsoc_project|user/jkoenig/java]]. This should help us towards better archive coverage. It must however also be said that Java support *already* exists on the Hurd, through the gcj/ecj platform. jkoenig is also fixing a few important things there.
+
+* *The Hurd has no Xorg:* ✘ **Wrong**: X.Org *does* work -- see [[instructions|unsorted/DebianXorg]] (Some drivers won't work anymore, though, as they require DRM nowadays).
+
+* *The Hurd only runs on legacy hardware:* ✘ **Wrong**: The Hurd is only tested on a few platforms, but it likely runs on modern processors. If you want to see if it works for you, just test the [[LiveCD|hurd/running/live_cd]].
+
+* *Hurd only supports legacy devices:* ½ Partly True: Currently most drivers are from Linux 2.0. For network cards, Linux 2.6+ drivers are available through DDE, though (needs manual setup for now). With a good amount of work, DDE also allows porting other classes of drivers to allow using the drivers from recent Linux releases — and push them into userspace.
+
+* *The Hurd has no SMP:* <u>✔ **True**</u>: Even though the **Hurd servers support SMP** and **GNU Mach has SMP support**. But the latter [[does_not_yet_have_drivers_for_nowadays_chipsets|faq/smp]], so the Hurd currently can’t take advantage of multiple cores.
+
+* *Developing a microkernel must be harder than developing a monolithic kernel, because the Hurd took so long:* ✘ **Wrong**: For the last decade, the Hurd had on average 5 hobby developers. That these developers managed to get the Hurd into a state where it actually gets not too far from the Linux kernel in performance — which has about 1000 developers, many of them full time — shows the efficiency of the Hurd’s design.
+
+* *Installation does not work:* ½ Partly True: Did you read the [[README|http://people.debian.org/~sthibault/hurd-i386/installer/cdimage/YES_REALLY_README.txt]] ([[file|http://xkcd.com/293/]])? Just like any beta piece of software, there are known pitfalls which you could easily avoid (or better, help to fix). You can also simply use the the [[preinstalled image|http://people.debian.org/~sthibault/hurd-i386/debian-hurd.img.tar.gz]].
+
+* *The system is called GNU/GNU Hurd:* ✘ **Wrong**: The GNU userland (glibc, coreutils, …) and the GNU Hurd together form the GNU system. To avoid being mistaken for GNU/Linux, we normally use the name GNU/Hurd or GNU Hurd. The *correct* name is simply GNU.
+
+**Test results**
+
+The results of the test from Phoronix were quite good. We expected that the microkernel design of the Hurd would have a far more severe performance hit.
+
+Some possible explanations:
+
+* The tests were mostly CPU bound.
+* IPCs [are no more such a problem on recent hardware][ipc].
+
+And a non-explanation:
+
+* The emulation layer should rather make the context switches worse, so it’s likely not at play.
+
+[ipc]: http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.51.16
+
+"""]]
diff --git a/user/jkoenig/java.mdwn b/user/jkoenig/java.mdwn
index 700f9c4e..9732e2cd 100644
--- a/user/jkoenig/java.mdwn
+++ b/user/jkoenig/java.mdwn
@@ -50,6 +50,14 @@ My latest code is available on
and modified Debian packages
are available in my apt repository.
+2011-07-20:
+The patches were reviewed by Samuel Thibault.
+Samuel pointed out a couple of issues
+and I beleive I have addressed all of them (fixes posted).
+I'm in the process of publishing updated libc and hurd packages;
+provided those work as expected,
+the next step would be to get these changes into Debian.
+
One question is how the new symbols introduced by my patches
should be handled.
Weak symbols turned out to be impractical,
diff --git a/user/jkoenig/java/discussion.mdwn b/user/jkoenig/java/discussion.mdwn
index f16d7678..352f6d62 100644
--- a/user/jkoenig/java/discussion.mdwn
+++ b/user/jkoenig/java/discussion.mdwn
@@ -77,6 +77,39 @@ either new ones or existing ones, as applicable.
pages ([[!taglink open_issue_documentation]]).
+# Java Native Interface (JNI)
+
+ * <http://en.wikipedia.org/wiki/Java_Native_Interface>
+ * <http://download.oracle.com/javase/7/docs/technotes/guides/jni/>
+ * <http://java.sun.com/products/jdk/faq/jnifaq.html>
+ * <http://java.sun.com/docs/books/jni/>
+
+
+## Java Native Access (JNA)
+
+ * <http://jna.java.net/>
+ * <https://github.com/twall/jna#readme>
+
+This is a different approach, and *while some attention is paid to performance,
+correctness and ease of use take priority*.
+
+As we plan on only having a few native methods (for invoking `mach_msg`,
+essentially), JNA is probably the wrong approach: portability and ease of use
+is not important, but performance is.
+
+## Compiled Native Interface (CNI)
+
+ * <http://gcc.gnu.org/onlinedocs/gcj/About-CNI.html>
+ * <http://per.bothner.com/papers/UsenixJVM01/CNI01.pdf>
+
+Probably faster than JNI, but only usable with GCJ.
+
+> Given that we have very few JNI calls,
+> it might be interesting to take a "dual" approach
+> if CNI actually improves performance
+> when compiling to native code.
+> --[[jkoenig]] 2011-07-20
+
# IRC, freenode, #hurd, 2011-07-13
[[!tag open_issue_documentation]]