Re: sleep in microsecond or nanosecond

2010-08-16 Thread Thomas Bushnell, BSG
Right. this is why it's tricky. You don't want to force an interrupt every microsecond just because sometimes people might be sleeping with that granularity (because it would be too often). But the delay is long enough that a busy-wait is also wrong. You need to dynamically change the clock behavi

Re: sleep in microsecond or nanosecond

2010-08-16 Thread Samuel Thibault
Da Zheng, le Mon 16 Aug 2010 06:02:17 -0400, a écrit : > Should we still handle the special cases in mach_msg or in another system > call? > > While sleeping in microseconds or nanoseconds, the kernel should do the loop > on > the behalf of the user process. Why do we still need a wakeup queue?

Re: sleep in microsecond or nanosecond

2010-08-16 Thread Samuel Thibault
olafbuddenha...@gmx.net, le Fri 13 Aug 2010 08:42:33 +0200, a écrit : > I think improving the timeout granularity in general would be rather > complicated, and make little sense... Improving the timeout granularity for even just one case is most of the work: programming e.g. the HPET timer, managi

open_issues/bash_busy-loop.mdwn

2010-08-16 Thread olafBuddenhagen
Hi, > I've first seen this problem after having had the following command > line run for a week, or two, or three: > > Start `screen`. Find PID of pfinet. > > $ while sleep 66; do echo "$(date)" " $(ps --no-header > --format=hurd -p [PID])"; done | tee ps-pfinet > > Leave it running, deta

open_issues/system_crash_pflocal_fifo.mdwn

2010-08-16 Thread olafBuddenhagen
Hi, > `cat < /dev/zero | cat > /dev/null` will eventually make the system > crash, likewise when using a FIFO. [...] I think this was the issue where after spending considerable time trying to isolate it, I finally realized that it actually doesn't happen anymore with a more recent gnumach... Pro

[PATCH 5/7] Makeconf: simplify the directory logic

2010-08-16 Thread Jeremie Koenig
* Replace $(..)foo with $(top_builddir)/foo for the sake of consistency. * Define default values for $({top_,}{build,src}dir) and let individual makefiles handle the special cases (namely, the top Makefile and the ones which configure generates in the build directory). * Replace the $(INCLUDES)

[PATCH 6/7] Makeconf: let config.make define $(configured)

2010-08-16 Thread Jeremie Koenig
Replaces the convoluted attempts at detecting whether config.make was found in Makeconf by a simple definition in config.make itself. Signed-off-by: Jeremie Koenig --- Makeconf |8 ++-- config.make.in |3 +++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Makeco

[PATCH 1/7] Fix the build system to handle part stores

2010-08-16 Thread Jeremie Koenig
Part stores are used for debian-installer, and they're considered more elegant than kernel partition devices. This patch makes sure they're included in the build unless the user disables them explicitely. * configure.in: look for libparted again (see also 7c7a04eb). * Makeconf: add $(PARTED_LIBS)

[PATCH 7/7] Makeconf: simplify the decoding of $(makemode)

2010-08-16 Thread Jeremie Koenig
* Remove the mostly unused $(doinst). * Set $(installationdir) directly rather than through $(makemode-instdir). * Reorganize the logic to be more straightforward. Signed-off-by: Jeremie Koenig --- Makeconf | 89 +- 1 files changed, 3

[PATCH 2/7] Fix the way FOOFLAGS is handled

2010-08-16 Thread Jeremie Koenig
* config.make.in: _set_ the initial value for $({C,CPP,LD}FLAGS). * Makeconf: alter $(FOOFLAGS) _after_ config.make has been included. * */Makefile: make sure $(FOOFLAGS) is modified after Makeconf has been included. The current situation with {C,CPP,LD}FLAGS is this: - foo/Makefile may in princ

Build system improvements

2010-08-16 Thread Jeremie Koenig
Hello, me again, these patches are related to the build system. The first three actually have an effect: [PATCH 1/7] Fix the build system to handle part stores [PATCH 2/7] Fix the way FOOFLAGS is handled [PATCH 3/7] Update ./configure (you may want to do this yourself) The latter ones are cleanu

[PATCH 4/7] Makeconf: remove redundant $($*-FOOFLAGS)

2010-08-16 Thread Jeremie Koenig
The target-specific $($*-CFLAGS) and $($*-CPPFLAGS) are already embedded into $(CFLAGS) and $(CPPFLAGS), so it's not necessary to add them at the usage site. Signed-off-by: Jeremie Koenig --- Makeconf |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makeconf b/Makeconf

[PATCH 2/5] update_pid_entries(): fix awkwardly indented uninitialized memory leak

2010-08-16 Thread Jeremie Koenig
Signed-off-by: Jeremie Koenig --- procfs_pid_files.c | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/procfs_pid_files.c b/procfs_pid_files.c index 9dbe3eb..3008145 100644 --- a/procfs_pid_files.c +++ b/procfs_pid_files.c @@ -46,14 +46,12 @@ update_pid_entries (s

[PATCH 4/5] Implement /proc/cmdline as a symlinks to 2/cmdline

2010-08-16 Thread Jeremie Koenig
Process 2 is usually gnumach. This is not perfect, as the format of /proc/cmdline and /proc/*/cmdline are different on Linux. Namely, the latter includes NUL bytes to separate subsequent arguments, while the former contains only spaces and a trailing newline. Signed-off-by: Jeremie Koenig --- pr

[PATCH 3/5] Set an appropriate st_mode on symlinks

2010-08-16 Thread Jeremie Koenig
Signed-off-by: Jeremie Koenig --- procfs_pid_files.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/procfs_pid_files.c b/procfs_pid_files.c index 3008145..e2ad2fd 100644 --- a/procfs_pid_files.c +++ b/procfs_pid_files.c @@ -49,7 +49,16 @@ update_pid_entries (

[PATCH 5/5] Implement /proc/mounts as a symlink to /etc/mtab

2010-08-16 Thread Jeremie Koenig
Among other things, many parts of Debian-installer want /proc/mounts. Implementing it the right way is non-trivial, though. In the meantime, we publish a symlink to /etc/mtab so that the user can fake it in whatever way they want. Furthermore I hope to be porting busybox mount soon, and use it to m

[PATCH 1/5] Fix /proc/*/cmdline

2010-08-16 Thread Jeremie Koenig
On Linux, /proc//cmdline is a NUL-separated list of arguments. We used to truncate after the first one and add some whitespace. Signed-off-by: Jeremie Koenig --- procfs_pid_files.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/procfs_pid_files.c b/proc

Updated procfs series

2010-08-16 Thread Jeremie Koenig
Hi, here comes the latest (hopefully final) version of my procfs series. Changes: * fix the typo; * split the last patch in two. Could someone consider you merge this?

Re: sleep in microsecond or nanosecond

2010-08-16 Thread Da Zheng
Hi, Should we still handle the special cases in mach_msg or in another system call? While sleeping in microseconds or nanoseconds, the kernel should do the loop on the behalf of the user process. Why do we still need a wakeup queue? Best, Zheng Da On 8/13/10 5:28 PM, Thomas Bushnell, BSG wrote: