summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hurd/porting/guidelines.mdwn15
-rw-r--r--news/2011-q2-ps.mdwn60
2 files changed, 72 insertions, 3 deletions
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/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
+
+"""]]