[committed mach 1/4] linux: fix compiler warning

2015-02-20 Thread Justus Winter
If the loop above completes at least one iteration, `i' will be larger than zero. * linux/dev/glue/block.c (rdwr_full): Add assertion to appease the compiler. --- linux/dev/glue/block.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux/dev/glue/block.c b/linux/dev/glue/block.c index 79a36

[PATCH gnumach 1/3] VM cache policy change

2015-02-21 Thread Justus Winter
From: Richard Braun This patch lets the kernel unconditionnally cache non empty unreferenced objects instead of using a fixed arbitrary limit. As the pageout daemon evicts pages, it collects cached objects that have become empty. The effective result is a graceful adjustment of the number of obje

[PATCH gnumach 3/3] vm: evict clean pages first

2015-02-21 Thread Justus Winter
* vm/vm_pageout.c (vm_pageout_scan): Evict clean pages from the list of clean pages first, without requiring an expensive scan through the inactive list. --- vm/vm_pageout.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/vm/vm_pageout.c b/vm/vm_pageout

[PATCH gnumach 2/3] vm: keep track of clean pages

2015-02-21 Thread Justus Winter
* vm/vm_page.h (struct vm_page): New field `cleanq'. (vm_page_queue_clean): New declaration. (vm_page_clean_count): Likewise. (vm_page_queue_clean_lock): Likewise. (vm_page_mark_dirty): New function to set and clear the dirty flag. * vm/vm_resident.c (vm_page_queue_clean): New variable. (vm_page_qu

VM cache policy change

2015-02-21 Thread Justus Winter
Hello, Richard's patch for the VM cache policy has the potential to speed up Hurd systems a lot by allowing for more VM objects to be cached. Previously there was a fixed limit (4000), whereas with this patch almost the entire memory can be used as cache. He mentions three problems preventing the

Re: VM cache policy change

2015-02-22 Thread Justus Winter
Quoting Samuel Thibault (2015-02-22 21:24:48) > Justus Winter, le Sat 21 Feb 2015 16:02:00 +0100, a écrit : > > c) chance of swapping deadlocks. > > I can experiment with the patch series on the buildds. That'd be nice :) Justus

Re: VM cache policy change

2015-02-24 Thread Justus Winter
Quoting Samuel Thibault (2015-02-24 01:04:19) > I tried to start a gcc-5 build, it gets stuck at the tar x stage, with > gnumach printing: > > no more room for vm_map_find_entry in 80223e20 (kmem_map_store) > no more room for kmem_realloc in 80223e20 (kmem_map_store) >[...] > ipc_port

Re: init leaking dead names

2015-02-26 Thread Justus Winter
Quoting Samuel Thibault (2015-02-26 10:36:58) > Building the globus-gram-job-manager package seems to reliably make > buildds crash out of kernel memory. One thing I notice is that pid 1 > has a lot of dead names (11k, and keeps increasing), so we're probably > leaking something there. Not us, gli

Re: [committed mig] Do not generate code dereferencing type-punned pointers

2015-03-02 Thread Justus Winter
Hi David :) thanks for cleaning up after me ;) (again and again...) Quoting David Michael (2015-02-18 05:39:46) > On Sun, Feb 15, 2015 at 11:09 AM, Justus Winter > <4win...@informatik.uni-hamburg.de> wrote: > > * utils.c (WriteFieldDeclPrim): Generate a union with an addi

Re: Canterbury Tales Prologue

2015-03-03 Thread Justus Winter
Quoting A. Fleckenstein (2015-03-02 23:09:04) > In the hurd sources, hurd/hurd/fs.defs, line 59 begins a comment, It's worse. Keep looking ;) Justus

Re: Making spl7 just cli/sti?

2015-03-07 Thread Justus Winter
Quoting Samuel Thibault (2014-12-14 02:44:08) > The attached patch fixes this by making spl.S use just cli/sti for spl7; > they can be emulated fine without any VMEXIT. This lowers the number of > PIC mask changes to a few hundreds or thousands only, and getting the > gnumach on kvm on kvm case wa

Recent libc breaks Hurd builds

2015-03-07 Thread Justus Winter
Hello, with the current libc from debian-ports (2.19-16~1) I see: gcc -std=gnu99 -fgnu89-inline -Wall -g -O3 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I. -I../../libshouldbeinlibc -I.. -I../.. -I../include -I../../include -D_GNU_SOURCE -D_IO_MTSAFE_IO -D_FILE_OFFSET_BI

Re: Making spl7 just cli/sti?

2015-03-08 Thread Justus Winter
Quoting Samuel Thibault (2015-03-08 11:57:56) > Justus Winter, le Sat 07 Mar 2015 10:51:18 +0100, a écrit : > > Unfortunately this change breaks gnumach on xen: > > Was this a kernel built with --enable-kdb? Yes. Justus

Re: Making spl7 just cli/sti?

2015-03-08 Thread Justus Winter
Quoting Samuel Thibault (2015-03-08 16:21:42) > Samuel Thibault, le Sun 08 Mar 2015 11:57:56 +0100, a écrit : > > Something which was incorrect for the Xen case was the IF checkup, which > > I've now disabled. > > This fixed the issue for me, does it fix it for you too? Yes. Thanks :) Justus

Re: hurd haning on boot (virtual box)

2015-03-15 Thread Justus Winter
Quoting Riccardo Mottola (2015-03-15 10:19:15) > Install went fine, system boots, network works. After a bit it stops > working reliable, I wanted to investigate more, but now the machine > stops booting. It did previously boot couple of times > > I can boot in "recovery mode" with success, but

Re: aptitude hangs

2015-03-15 Thread Justus Winter
Quoting Riccardo Mottola (2015-03-15 13:14:31) > I am now in the same situation that brought previously my hurd VM to a > hang. I attach a screenshot of the xterm. > > After having downloaded a number of packages, it just hangs. No hight > cpu usage. > [...] > I hit ctr-c, restart aptitude, reis

Re: task ext2fs deallocatin a bogus port

2015-03-15 Thread Justus Winter
Quoting Riccardo Mottola (2015-03-15 23:54:01) > it says "most probably a bug", so I report it. This is happening on > poweroff and I can now conveniently take a screenshot since I run in a VM. That's known. > The last shutdon like this required me to fsck twice the filesystem > before it boote

Re: task ext2fs deallocatin a bogus port

2015-03-18 Thread Justus Winter
Hello :) Quoting Riccardo Mottola (2015-03-18 14:34:56) > >> The last shutdon like this required me to fsck twice the filesystem > >> before it booted again! > > The problem at hand is likely harmless. > > ok, I won't bother, it is a nuisance though, a "reboot" fails since the > shutdown hangs.

Replacing IPC tables with radix trees (was: VM cache policy change)

2015-03-27 Thread Justus Winter
Quoting Justus Winter (2015-02-24 17:15:22) > Quoting Samuel Thibault (2015-02-24 01:04:19) > > I tried to start a gcc-5 build, it gets stuck at the tar x stage, with > > gnumach printing: > > > > no more room for vm_map_find_entry in 80223e20 (kmem_map_store) > >

Re: boot hangs, corruption at every attempt

2015-04-01 Thread Justus Winter
Quoting Samuel Thibault (2015-04-01 13:25:27) > Riccardo Mottola, le Wed 01 Apr 2015 13:20:05 +0200, a écrit : > > using my HURD instance in VirtualBox shows it is extremely unreliable. It > > almost always hangs at boot. A also see the occasional hang at boot, not at this point though, but either

Re: boot hangs, corruption at every attempt

2015-04-01 Thread Justus Winter
Quoting Riccardo Mottola (2015-04-01 16:17:10) > Since it appears tightly related with the FS (I was able to boot with > one or several reboots into recovery and forcing fsck) I am clearly > concerned that the shutdown is never clean, so it all adds up creating > uncertainty. > > Can we underst

Re: boot hangs, corruption at every attempt

2015-04-01 Thread Justus Winter
Quoting Riccardo Mottola (2015-04-01 18:03:39) > Hi, > > (no need to put me in CC everytime, I'm subscribed) I'm not. I'm putting you in `To' because I'm writing a mail to you. > Justus Winter wrote: > > No. Although the shutdown sometimes hangs, it

Re: [PATCH hurd 28/30] libports: use protected payloads to optimize the object lookup

2015-04-03 Thread Justus Winter
Quoting Samuel Thibault (2014-12-09 02:21:20) > Justus Winter, le Thu 04 Dec 2014 15:39:04 +0100, a écrit : > > If we now `ports_destroy_right' X, and at the same time the last send > > right to X is destroyed, there's a chance that said notification is > > already

Re: [PATCH hurd 28/30] libports: use protected payloads to optimize the object lookup

2015-04-04 Thread Justus Winter
Quoting Justus Winter (2015-04-03 11:55:07) > Quoting Samuel Thibault (2014-12-09 02:21:20) > > Justus Winter, le Thu 04 Dec 2014 15:39:04 +0100, a écrit : > > > If we now `ports_destroy_right' X, and at the same time the last send > > > right to X is destr

[PATCH hurd] libports: use protected payloads to optimize the object lookup

2015-04-04 Thread Justus Winter
* NEWS: Mention protected payloads. * libports/Makefile (SRCS): Add `port-deref-deferred.c'. * libports/create-internal.c (_ports_create_port_internal): Set the protected payload to the objects address. * libports/import-port.c (ports_import_port): Likewise. * libports/reallocate-from-external.c (p

Re: Release process & rolling new releases

2015-04-07 Thread Justus Winter
Quoting Thomas Schwinge (2014-09-23 17:09:30) > The (technical) release process is not the problem; that I can do any > time. Awesome! Let's make one now. Justus

Re: Release process & rolling new releases

2015-04-09 Thread Justus Winter
Quoting Thomas Schwinge (2015-04-09 09:57:05) > Hi! > > On Wed, 08 Apr 2015 00:35:17 +0200, Justus Winter > <4win...@informatik.uni-hamburg.de> wrote: > > Quoting Thomas Schwinge (2014-09-23 17:09:30) > > > The (technical) release process is not the prob

[committed hurd 01/13] ext2fs: use a seperate lock to protect nodehash

2015-04-17 Thread Justus Winter
Previously, ext2fs used diskfs_node_refcnt_lock to serialize access to the nodehash. Use a separate lock to protect nodehash. Adjust the reference counting accordingly. Every node in the nodehash carries a light reference. When we are asked to give up that light reference, we reacquire our lock

[committed hurd 07/13] libdiskfs: drop unused fields from struct node

2015-04-17 Thread Justus Winter
* libdiskfs/diskfs.h (struct node): Drop unused fields from struct node. --- libdiskfs/diskfs.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h index 18df0eb..7a21dff 100644 --- a/libdiskfs/diskfs.h +++ b/libdiskfs/diskfs.h @@ -80,8 +80,6 @@ struct pero

[committed hurd 03/13] isofs: use a seperate lock to protect node_cache

2015-04-17 Thread Justus Winter
Previously, isofs used diskfs_node_refcnt_lock to serialize access to the node_cache. Use a separate lock to protect node_cache. Adjust the reference counting accordingly. Every node in the node_cache carries a light reference. When we are asked to give up that light reference, we reacquire our

[committed hurd 04/13] tmpfs: use a seperate lock to protect all_nodes

2015-04-17 Thread Justus Winter
Previously, tmpfs used diskfs_node_refcnt_lock to serialize access to the all_nodes and some other related global state related to memory consumption. Use a separate lock to protect all_nodes, and atomic operations to access the state related to memory consumption. Adjust the reference counting ac

[committed hurd 05/13] libdiskfs: lock-less reference counting of nodes

2015-04-17 Thread Justus Winter
* libdiskfs/diskfs.h (struct node): Use refcounts_t for reference counting. (diskfs_node_refcnt_lock): Remove. (diskfs_node_norefs,diskfs_drop_node): Change comments accordingly. * libdiskfs/init-init.c: Adjust accordingly. * libdiskfs/node-drop.c: Likewise. * libdiskfs/node-make.c: Likewise. * lib

[committed hurd 09/13] libdiskfs: declare all inline functions as `extern inline'

2015-04-17 Thread Justus Winter
* libdiskfs/diskfs.h (diskfs_node_disknode, diskfs_disknode_node): Declare functions as `extern inline' so that we can use them in other functions declared as `extern inline'. --- libdiskfs/diskfs.h | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libdiskfs/diskfs.h b/li

[committed hurd 06/13] libdiskfs: make struct node more compact

2015-04-17 Thread Justus Winter
* libdiskfs/diskfs.h (struct node): Turn flags into a bit field. --- libdiskfs/diskfs.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h index 535fb39..18df0eb 100644 --- a/libdiskfs/diskfs.h +++ b/libdiskfs/diskfs.h @@

[committed hurd 02/13] fatfs: use a seperate lock to protect nodehash

2015-04-17 Thread Justus Winter
Previously, fatfs used diskfs_node_refcnt_lock to serialize access to the nodehash. Use a separate lock to protect nodehash. Adjust the reference counting accordingly. Every node in the nodehash carries a light reference. When we are asked to give up that light reference, we reacquire our lock

[committed hurd 11/13] libdiskfs: implement a node cache

2015-04-17 Thread Justus Winter
Previously, all users of libdiskfs implemented a node cache on their own. Move the node cache from ext2fs into libdiskfs. We preserve the previous API by marking all functions that we pull from ext2fs as weak, so that users like tmpfs can still implement their own node cache. * ext2fs/dir.c (dis

[committed hurd 10/13] ext2fs: use fat nodes

2015-04-17 Thread Justus Winter
Use `diskfs_make_node_alloc' to allocate both the node and the disknode in a continuous chunk of memory. This increases locality and reduces the pressure on the memory allocator. * ext2fs/inode.c: Use `diskfs_node_disknode' to access the disknode. (diskfs_cached_lookup): Use `diskfs_make_node_all

[committed hurd 08/13] libdiskfs: fix node initialization

2015-04-17 Thread Justus Winter
* libdiskfs/node-make.c (init_node): Initialize flag `author_tracks_uid'. --- libdiskfs/node-make.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libdiskfs/node-make.c b/libdiskfs/node-make.c index c7ca3b0..7bc1d85 100644 --- a/libdiskfs/node-make.c +++ b/libdiskfs/node-make.c @@ -27,6 +27,7

[committed hurd 12/13] isofs: port to libdiskfs' node cache

2015-04-17 Thread Justus Winter
* isofs/inode.c: Drop all cache-related code. (diskfs_user_make_node): New function. (calculate_file_start): Check for `record' being null. (cache_id): New function. (read_node): Rename to diskfs_user_read_node and adopt accordingly. (diskfs_try_dropping_softrefs): Rename to diskfs_user_try_droppin

[committed hurd 13/13] fatfs: port to libdiskfs' node cache

2015-04-17 Thread Justus Winter
* fatfs/inode.c: Drop all cache-related code. (diskfs_user_make_node): New function. (diskfs_cached_lookup_in_dirbuf): Reimplement using the `lookup_context'. (read_node): Rename to diskfs_user_read_node and adopt accordingly. (diskfs_try_dropping_softrefs): Rename to `diskfs_user_try_dropping_soft

Re: [PATCH hurd] libports: use protected payloads to optimize the object lookup

2015-04-21 Thread Justus Winter
Hi Samuel :) Quoting Samuel Thibault (2015-04-20 04:17:53) > Boot it, use all the default parameters, and just after partition > reloading from the kernel (which prints the new partition layout), the > system is completely frozen. Please check whether or not the root filesystem in fact dies. /hur

Re: [PATCH hurd] libports: use protected payloads to optimize the object lookup

2015-04-22 Thread Justus Winter
Quoting Samuel Thibault (2015-04-20 04:17:53) > Boot it, use all the default parameters, and just after partition > reloading from the kernel (which prints the new partition layout), the > system is completely frozen. I created a program to reload the partition table. That wasn't as smooth as it

[committed mach 2/2] kern: avoid hardcoding the lowest priority

2015-04-25 Thread Justus Winter
The number of priorities has been changed from 32 to 50 in 6a234201081156e6d5742e7eeabb68418b518fad. * kern/syscall_subr.c (thread_depress_priority): Avoid hardcoding the lowest priority. --- kern/syscall_subr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kern/syscall_

[committed mach 1/2] kern: disable stack allocation counters by default

2015-04-25 Thread Justus Winter
Disable the stack allocation counters by default. Casual checking revealed that the hits-to-miss ratio is excellent. * kern/thread.c (stack_alloc_{hits,misses,max}): Move variables... * kern/counters.c: ... here, and add the usual counter prefix. * kern/counters.h: New declarations. --- kern/cou

Changing GNU Mach's syscall interface

2015-05-01 Thread Justus Winter
Hello :) Currently, the GNU Mach kernel uses trap gates to enter the kernel (on i386). We always suspected this mechanism to be slow, but afaik noone quantified that. Tl;dr: sysenter is twice as fast as a trap gate (on my system). I have a prototype that allows one to enter the kernel using sys

[PATCH gnumach 2/2] XXX avoid thread_syscall_return for measuring null msg

2015-05-02 Thread Justus Winter
--- ipc/mach_msg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ipc/mach_msg.c b/ipc/mach_msg.c index aecfcd4..07e59e2 100644 --- a/ipc/mach_msg.c +++ b/ipc/mach_msg.c @@ -1673,9 +1673,7 @@ mach_msg_trap( * (syscall entry and thread_syscall_return ex

[PATCH gnumach 1/2] xxx sysenter prototype

2015-05-02 Thread Justus Winter
--- i386/Makefrag.am| 2 + i386/i386/gdt.c | 17 + i386/i386/gdt.h | 7 +- i386/i386/locore.S | 177 i386/i386/pcb.c | 24 +++ i386/i386/syscall.c | 103 i386/i386/s

[PATCH gnumach 1/2] yyy sysenter prototype

2015-05-06 Thread Justus Winter
--- i386/Makefrag.am| 2 + i386/i386/gdt.c | 17 i386/i386/gdt.h | 7 +- i386/i386/i386asm.sym | 1 + i386/i386/locore.S | 224 i386/i386/pcb.c | 24 +++--- i386/i386/syscall.c | 103 ++

[PATCH gnumach 2/2] yyy i386: less magic

2015-05-06 Thread Justus Winter
--- i386/i386/pcb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c index 2da3804..888012c 100644 --- a/i386/i386/pcb.c +++ b/i386/i386/pcb.c @@ -96,7 +96,7 @@ void stack_attach( /* * Point top of kernel stack to user`

Re: [PATCH gnumach 2/2] yyy i386: less magic

2015-05-06 Thread Justus Winter
Quoting Samuel Thibault (2015-05-06 21:10:08) > Please already apply this one :) Yes, I would have done that all by myself, it just happened to be in that branch... Cheers, Justus

Re: [PATCH mig] Explicitly use gnu_inline semantics for x_server_routine functions

2015-05-07 Thread Justus Winter
Quoting Samuel Thibault (2015-05-06 21:24:25) > David Michael, le Tue 05 May 2015 16:33:45 -0400, a écrit : > > Does anyone foresee problems with this method? > > Well, that imposes using a gcc compiler. But we can probably use static > inline instead? Yes, I believe so. Thanks, Justus

Re: refcounts_ref assertion failure

2015-05-10 Thread Justus Winter
Quoting Thomas Schwinge (2015-05-10 13:08:19) > Hi! > > Running a binutils/GDB build on an up-to-date Debian GNU/Hurd system, I > just hit (mostly manually transcribed): > > ext2fs: ../../libports/../libshouldbeinlibc/refcount.h:165: > refcounts_ref: Assertion `! (r.hard == 1 && r.weak == 0)

Re: Bug#785134: Directory permissions not enforced when renaming a directory

2015-05-19 Thread Justus Winter
Quoting Samuel Thibault (2015-05-19 02:00:21) > More concerning, this happens also with different users: Uh, indeed o_O > Can somebody have a look? I will. Justus

Replacing the IPC tables with radix trees

2015-05-19 Thread Justus Winter
Hello :) I have polished the patch series and all commit messages. Please have a look and poke me if anything stands out. I've also pushed the changes to darnassus: http://darnassus.sceen.net/gitweb/teythoon/gnumach.git/shortlog/refs/heads/ipc-radix-trees-9 Coccinelle was most helpful for crea

[PATCH gnumach 6/6] ipc: inline key ipc entry lookup functions

2015-05-19 Thread Justus Winter
Declare functions looking up IPC entries that were previously inlined manually with `static inline' so that they will be inlined into the fast paths by the compiler. * ipc/ipc_entry.c (ipc_entry_lookup, ipc_entry_get, ipc_entry_dealloc): Move functions... * ipc/ipc_space.h: ... here, and declare t

[PATCH gnumach 5/6] ipc: replace the IPC table with a radix tree

2015-05-19 Thread Justus Winter
Currently, the port names are mapped to an IPC object (e.g. a port) using a table. This, however, requires large chunks of continuous memory, and leads to scalability problems as virtual kernel memory is a scarce resource. To avoid excessive overhead, non-contiguous port names are spilled into a

[PATCH gnumach 3/6] ipc: undo manual inlining of `ipc_entry_X' functions

2015-05-19 Thread Justus Winter
Today we can rely on the compiler to inline functions. Undoing this manual optimization is a first step to replace the IPC tables. * ipc/mach_msg.c (mach_msg_trap): Undo the manual inlining of `ipc_entry_lookup', `ipc_entry_dealloc', and `ipc_entry_get'. * ipc/ipc_kmsg.c (ipc_kmsg_copyin_header,

[PATCH gnumach 2/6] kern: add radix tree library

2015-05-19 Thread Justus Winter
Import a radix tree library from Richard Braun's librbraun. * Makefile.am (clib_routines): Steal `__ffsdi2'. * Makefrag.am (libkernel_a_SOURCES): Add new files. * kern/rdxtree.c: New file. * kern/rdxtree.h: Likewise. * kern/rdxtree_i.h: Likewise. * kern/startup.c (setup_main): Initialize radix tre

[PATCH gnumach 1/6] kern: import `macros.h' from x15

2015-05-19 Thread Justus Winter
Import the macro definitions from the x15 kernel project, and replace all similar definitions littered all over the place with it. Importing this file will make importing code from the x15 kernel easier. We are already using the red-black tree implementation and the slab allocator from it, and we

[PATCH gnumach 4/6] ipc: replace reverse hash table with a radix tree

2015-05-19 Thread Justus Winter
Currently, there is a hash table mapping (space, object) tuples to `ipc_entry' objects. This hash table is intertwined with the IPC tables. There is one hash table per IPC space, but it is only for the entries in the IPC table. This hash table is called `local' in the source. All IPC entries be

[committed hurd 1/2] libdiskfs: fix renaming of directories

2015-05-19 Thread Justus Winter
Previously, file permissions and ownership of the target directory were ignored when renaming a directory: % mkdir a b % chmod 555 a % mv b a % ls a b * libdiskfs/dir-renamed.c (diskfs_rename_dir): Fix error handling. --- libdiskfs/dir-renamed.c | 2 ++ 1 file changed, 2 inse

[committed hurd 2/2] fatfs: fix error handling

2015-05-19 Thread Justus Winter
* fatfs/dir.c (diskfs_dirrewrite_hard): Fix error handling. --- fatfs/dir.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fatfs/dir.c b/fatfs/dir.c index 9eea74c..66c95d2 100644 --- a/fatfs/dir.c +++ b/fatfs/dir.c @@ -728,9 +728,10 @@ diskfs_dirrewrite_hard (struct node

Re: RFC: [PATCH] trans/fakeroot.c

2015-05-23 Thread Justus Winter
Quoting Samuel Thibault (2015-05-23 23:53:07) > I have switched the buildds to using fakeroot-hurd by default, and will > probably bump the alternatives priority soon too. Awesome :) Justus

Re: ps hang

2015-05-26 Thread Justus Winter
Hi :) Quoting Esa Peuha (2015-05-26 10:41:37) > Here is a patch that should break the infinite loop. Cool. Thanks for looking into this. > Samuel Thibault wrote: > > ps -o %r > > > > hangs, could somebody have a look? Just to make sure I understand the problem. AIUI there are two issues: 1.

Re: ps hang

2015-05-28 Thread Justus Winter
Quoting Samuel Thibault (2015-05-28 12:48:17) > Justus Winter, le Tue 26 May 2015 15:30:28 +0200, a écrit : > > I conclude that `ps -o %r' never worked, but hanging is of course not > > an option. Samuel, did you mean that? > > I just meant that some Debian packages hap

Re: mach_task_self, mach_thread_self, mach_host_self

2015-06-03 Thread Justus Winter
Hello, I independently rediscovered that host port leak. I see two options how to proceed: 1/ Cache the port in the libc like we do for the task port. 2/ Cache/deallocate the port everywhere. Given the fact that I found not a single call site of `mach_host_self' (in both the Hurd and the libc)

Re: mach_task_self, mach_thread_self, mach_host_self

2015-06-03 Thread Justus Winter
Quoting Richard Braun (2015-06-03 14:10:16) > On Wed, Jun 03, 2015 at 01:54:40PM +0200, Justus Winter wrote: > > I independently rediscovered that host port leak. I see two options > > how to proceed: > > The host and task ports actually don't leak, because they'

Re: [PATCH] Check AWK usability when XKB is enabled

2015-06-05 Thread Justus Winter
Quoting Diego Nieto Cid (2015-06-05 05:28:19) > * configure.ac: test whether AWK provides strtonum function. Merged, thanks! > --- > configure.ac | 8 > 1 file changed, 8 insertions(+) > > diff --git a/configure.ac b/configure.ac > index 71f3a0e..b03057b 100644 > --- a/configure.ac > +

Re: [PATCH 2/2] console-client: Fix lower range of binary search

2015-06-05 Thread Justus Winter
Quoting Diego Nieto Cid (2015-06-05 03:58:10) > To prevent infinite recursion range checking was introduced > as an exit condition adding two extra comparisons on each > recursive call. > > By fixing the range used by the recursive call over the lower > half of the array one can avoid penalizing s

Re: [PATCH 1/2] * console-client/xkb/kstoucs.c (find_ucs): assert precondition.

2015-06-05 Thread Justus Winter
Merged, thanks. I took the liberty of adding a subject line to the commit message. Quoting Diego Nieto Cid (2015-06-05 03:58:09) > --- > console-client/xkb/kstoucs.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/console-client/xkb/kstoucs.c b/console-client/xkb/kstoucs.c > index

[PATCH glibc 2/2] mach: fix typo

2015-06-06 Thread Justus Winter
* mach/mach/mach_traps.h (thread_switch): Fix typo in comment. --- mach/mach/mach_traps.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mach/mach/mach_traps.h b/mach/mach/mach_traps.h index 8b8765e..c778caa 100644 --- a/mach/mach/mach_traps.h +++ b/mach/mach/mach_traps.h @@ -

Re: mach_task_self, mach_thread_self, mach_host_self

2015-06-06 Thread Justus Winter
Something along these lines? The patch is untested. It compiles fine of course, but despite my best efforts and 8+ hours of cpu time my box failed to build libc packages :/ Justus

[PATCH glibc 1/2] mach: cache the host port

2015-06-06 Thread Justus Winter
Cache the host port like we cache the task port. This way we do not need to call the kernel just to get the port. Furthermore, we no longer increase the reference count on every invocation of `mach_host_self'. * mach/mach/mach_traps.h (__mach_host_self, mach_host_self): Protect declarations agai

building libc packages (was: mach_task_self, mach_thread_self, mach_host_self)

2015-06-08 Thread Justus Winter
Quoting Justus Winter (2015-06-06 11:27:39) > Something along these lines? The patch is untested. It compiles fine > of course, but despite my best efforts and 8+ hours of cpu time my box > failed to build libc packages :/ Well, I disabled the tests, and the -686 and -xen variants.

Re: [GSoC] Guix + Hurd continuation

2015-07-02 Thread Justus Winter
Quoting Ludovic Courtès (2015-07-02 11:33:29) > I think it would work anyway, but would end up starting one instance of > /hurd/symlink for each symlink, which is suboptimal. No, /hurd/symlink doesn't quite work as expected. Currently, the shortcut semantics are important for us. Justus

Re: [GSoC] Guix + Hurd continuation

2015-07-02 Thread Justus Winter
Quoting Ludovic Courtès (2015-07-02 14:14:57) > Justus Winter <4win...@informatik.uni-hamburg.de> skribis: > > > Quoting Ludovic Courtès (2015-07-02 11:33:29) > >> I think it would work anyway, but would end up starting one instance of > >> /hurd/symlink f

Re: Question with moving mount/umount logic in glibc

2015-07-07 Thread Justus Winter
Hi Manolis :) Quoting Manolis Ragkousis (2015-07-07 16:04:30) > I have a question about utils/mount.c. In the contribution page it says > "Move the mount/umount logic from utils/{,u}mount.c into glibc". > > After a short conversation with Thomas here 's how I think I will implement > it : > > (

Re: Question with moving mount/umount logic in glibc

2015-07-08 Thread Justus Winter
Quoting Ludovic Courtès (2015-07-07 22:29:05) > Justus Winter <4win...@informatik.uni-hamburg.de> skribis: > > > Sounds awesome. One thing to be aware of (iirc) is that the > > mount/umount code depends on the fstab parser. I'm not sure whether > > it is neede

Re: [PATCH] limited support for non-root mlock()

2015-07-08 Thread Justus Winter
Hi :) Quoting Samuel Thibault (2015-07-08 15:55:33) > I have implemented a start of support for calling mlock() in a non-root > process, which I have attached. Sweet. You talked about that in your FOSDEM talk, right? Ever since I thought that managing this in userspace is the better solution, t

Re: [PATCH] limited support for non-root mlock()

2015-07-09 Thread Justus Winter
Quoting Samuel Thibault (2015-07-08 18:22:56) > Justus Winter, le Wed 08 Jul 2015 16:22:28 +0200, a écrit : > > Alternatively, you could re-purpose the existing RPC `vm_wire', > > changing the type of its first argument from `host_priv_t' to `host_t' > >

Re: VirtualBox Hangs Pre-Init Due To Ext2FS Fault

2015-07-11 Thread Justus Winter
Quoting James Clarke (2015-07-11 22:33:44) > I did some more digging around today. I think what’s happening is > that ext2fs tries to handle a pager RPC while the disk is being > remounted Sounds plausible. Could you try: http://darnassus.sceen.net/~teythoon/ext2fs.static I'll send the patch as

[PATCH hurd] yyy fix remount

2015-07-11 Thread Justus Winter
--- libdiskfs/remount.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libdiskfs/remount.c b/libdiskfs/remount.c index 1ed622f..2b5d351 100644 --- a/libdiskfs/remount.c +++ b/libdiskfs/remount.c @@ -21,6 +21,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #incl

Re: VirtualBox Hangs Pre-Init Due To Ext2FS Fault

2015-07-12 Thread Justus Winter
Quoting James Clarke (2015-07-12 13:56:31) > That doesn’t seem to boot at all. Indeed :/ db> show all tasks ID TASK NAME [THREADS] 0 f2745f00 gnumach [8] 1 f2745e40 ext2fs [12] 2 f2745d80 exec [5] 3 f2745cc0 (ext2fs) [1] 4 f2745c00 /hurd/proc [4] 5 f2745b40 /hurd/auth [5] 6 f2745a80 /bin/sh(1

Re: VirtualBox Hangs Pre-Init Due To Ext2FS Fault

2015-07-14 Thread Justus Winter
Quoting Richard Braun (2015-07-13 10:16:14) > On Sun, Jul 12, 2015 at 12:56:31PM +0100, James Clarke wrote: > > That doesn’t seem to boot at all. I had tried changing it to inhibiting all > > RPCs (it looks like you’ve inhibited an extra class?), but it seems that > > paging is needed? Perhaps pa

Fixing re-mounting of ext2fs

2015-07-14 Thread Justus Winter
Hello James, would you be so kind to test this patch? It inhibits RPCs to the file pager during remounting, but allows those to the disk pager. I'll build and test binaries when I get home. Thanks, Justus

[PATCH hurd] yyy fix remount

2015-07-14 Thread Justus Winter
--- libdiskfs/remount.c | 8 1 file changed, 8 insertions(+) diff --git a/libdiskfs/remount.c b/libdiskfs/remount.c index 1ed622f..dffb996 100644 --- a/libdiskfs/remount.c +++ b/libdiskfs/remount.c @@ -37,10 +37,18 @@ diskfs_remount () if (err) return err; + /* XXX */ + exter

Re: Fixing re-mounting of ext2fs

2015-07-14 Thread Justus Winter
Quoting Justus Winter (2015-07-14 14:28:56) > would you be so kind to test this patch? It inhibits RPCs to the file > pager during remounting, but allows those to the disk pager. I'll > build and test binaries when I get home. No, that's no good either. Justus

Re: VirtualBox Hangs Pre-Init Due To Ext2FS Fault

2015-07-14 Thread Justus Winter
Hi James :) you found a long-standing bug in ext2fs. Fixing it allows us to get rid of the ugly workaround in daemons/runsystem.sh (look for `XXX'). Quoting Richard Braun (2015-07-13 10:16:14) > On Sun, Jul 12, 2015 at 12:56:31PM +0100, James Clarke wrote: > > That doesn’t seem to boot at all. I

[PATCH gnumach 1/2] ipc: fix the locking of the IPC entry allocation functions

2015-07-15 Thread Justus Winter
* ipc/ipc_entry.c (ipc_entry_alloc): Assume the space is write-locked. (ipc_entry_alloc_name): Likewise. * ipc/ipc_object.c: Fix the locking around all call sites to the two functions where the space was not locked before. --- ipc/ipc_entry.c | 21 ++--- ipc/ipc_object.c | 32

[PATCH gnumach 2/2] ipc: use a general lock to protect IPC spaces

2015-07-15 Thread Justus Winter
This fixes a corruption in the radix trees representing the IPC spaces when memory was tight. * ipc/ipc_space.h: Use a general lock to protect IPC spaces. --- ipc/ipc_space.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ipc/ipc_space.h b/ipc/ipc_space.h ind

Re: [PATCH gnumach 2/2] ipc: use a general lock to protect IPC spaces

2015-07-17 Thread Justus Winter
Quoting Richard Braun (2015-07-17 10:59:22) > On Wed, Jul 15, 2015 at 03:24:30PM +0200, Justus Winter wrote: > > This fixes a corruption in the radix trees representing the IPC spaces > > when memory was tight. > > Would it be possible to use static analysis tools like cocci

Re: VirtualBox Hangs Pre-Init Due To Ext2FS Fault

2015-07-19 Thread Justus Winter
Hello James :) Quoting James Clarke (2015-07-15 22:20:57) > I had a look today at what's happening, and it's that the *file* > pager is trying to read from disk. Any thoughts? There is another thing I forgot. libpager is special, it has its own demuxer (see libpager/demuxer.c) that writes reques

Re: [PATCH] WIP: Fix ext2fs remount race condition

2015-07-22 Thread Justus Winter
Hi James :) a few nitpicks upfront: Quoting James Clarke (2015-07-22 02:46:48) > --- a/ext2fs/ext2fs.c > +++ b/ext2fs/ext2fs.c > @@ -207,10 +207,28 @@ main (int argc, char **argv) > error_t > diskfs_reload_global_state () > { > + error_t err; > + >pokel_flush (&global_pokel); >pager_f

Re: [PATCH v3] Fix race condition in ext2fs when remounting

2015-07-24 Thread Justus Winter
Hi James :) Quoting James Clarke (2015-07-23 19:33:42) > On some systems, ext2fs.static would regularly hang at startup, as a > race condition meant it would process paging requests while remounting. > To fix this, libpager has been altered to allow inhibiting and resuming > its worker threads, an

Re: [PATCH v3] Fix race condition in ext2fs when remounting

2015-07-25 Thread Justus Winter
Quoting Justus Winter (2015-07-25 03:54:59) > I'm merely wondering whether we shouldn't protect > diskfs_reload_global_state with a lock. I'm not sure if concurrent > remounts are a problem, but they could very well be. For the record, this is not a problem. There is the

[committed hurd] pflocal: fix receiver lookup

2015-08-13 Thread Justus Winter
* pflocal/mig-decls.h (begin_using_addr_payload): Use `ports_lookup_payload'. --- pflocal/mig-decls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pflocal/mig-decls.h b/pflocal/mig-decls.h index b1da797..6c044ce 100644 --- a/pflocal/mig-decls.h +++ b/pflocal/mig-decls.h @@ -

Re: [PATCH v3] Fix race condition in ext2fs when remounting

2015-08-14 Thread Justus Winter
Quoting James Clarke (2015-07-23 19:33:42) > diff --git a/libdiskfs/disk-pager.c b/libdiskfs/disk-pager.c > index 008aa2d..33b109c 100644 > --- a/libdiskfs/disk-pager.c > +++ b/libdiskfs/disk-pager.c > @@ -24,6 +24,7 @@ > __thread struct disk_image_user *diskfs_exception_diu; > > struct pager *

[RFC mach] vm: fix locking issues

2015-08-17 Thread Justus Winter
Avoid accessing fields of `vm_object' objects without having it locked. These problems have been found using a code transformation done by Coccinelle that instrumented all accesses with a runtime check, and manual inspection. * vm/memory_object.c (memory_object_data_supply): Avoid accessing field

Re: [PATCH] Port leak when using clisp

2015-08-26 Thread Justus Winter
Hi Flávio :) Quoting Flávio Cruz (2015-08-26 01:46:16) > Next, I started the bootstrapping process to compile SBCL but it would always > fail with a kernel panic since Mach was unable to allocate more slabs for the > ipc_port data structure. I figured out that the kernel had thousands of > inactiv

Re: [PATCH] Port leak when using clisp

2015-08-27 Thread Justus Winter
Hi, Quoting Flávio Cruz (2015-08-27 00:26:13) > Em qua, 26 de ago de 2015 às 12:18, Justus Winter < > 4win...@informatik.uni-hamburg.de> escreveu: > > > > After looking around and using KDB, I've figured out that the following > l

<    8   9   10   11   12   13   14   15   >