[PATCH hurd 26/30] utils/rpctrace: make `trace_and_forward' payload-aware

2014-11-27 Thread Justus Winter
As the protected payloads were retrofitted into the Mach message format, the local port type is lost. * utils/rpctrace.c (is_notification): New function (trace_and_forward): Recover the original local port type. --- utils/rpctrace.c | 29 - 1 file changed, 28 insertion

[PATCH hurd-dde 4/4] libmachdev: add payload-aware intrans functions

2014-11-27 Thread Justus Winter
* libmachdev/mig-mutate.h: Add mutators. * libmachdev/mig-decls.h (begin_using_device_payload): New function. * libmachdev/Makefile (device-MIGSFLAGS): Define MACH_PAYLOAD_TO_PORT. --- libmachdev/Makefile | 1 + libmachdev/mig-decls.h | 6 ++ libmachdev/mig-mutate.h | 4 3 files chan

[PATCH hurd 25/30] trans/symlink: disable default payload to port mapping

2014-11-27 Thread Justus Winter
`fsysServer' is only used by the symlink translator which does not use libports. Therefor, it is not necessary to use the default payload to port translation function. * trans/Makefile (fsys-MIGSFLAGS): Disable the default payload to port translation function. --- trans/Makefile | 4 1 file

[PATCH hurd 22/30] trans/ifsock: add a payload-aware intrans function

2014-11-27 Thread Justus Winter
* trans/Makefile (ifsock-MIGSFLAGS): Add mutator. --- trans/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/trans/Makefile b/trans/Makefile index 71e6424..eecaeeb 100644 --- a/trans/Makefile +++ b/trans/Makefile @@ -39,6 +39,7 @@ password-MIGSFLAGS=\ ifsock-MIGSFLAGS=\ "-DFILE

[PATCH hurd 17/30] pflocal: add payload-aware intrans functions

2014-11-27 Thread Justus Winter
* pflocal/mig-mutate.h: Add mutators. * pflocal/mig-decls.c (begin_using_sock_user_payload): New function. (begin_using_addr_payload): Likewise. --- pflocal/mig-decls.h | 12 pflocal/mig-mutate.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/pflocal/mig-decls.h b/pflocal/

[PATCH hurd 24/30] trans/streamio: make the translator payload-aware

2014-11-27 Thread Justus Winter
* trans/Makefile (device_reply-MIGSFLAGS): Define MACH_PAYLOAD_TO_PORT. --- trans/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trans/Makefile b/trans/Makefile index 04fd276..b6edb97 100644 --- a/trans/Makefile +++ b/trans/Makefile @@ -44,6 +44,9 @@ ifsock-MIGSFLAGS=\ "-DFIL

[PATCH hurd 21/30] trans/fakeroot: make the demuxer payload-aware

2014-11-27 Thread Justus Winter
* trans/fakeroot.c (netfs_demuxer): Make the demuxer payload-aware. --- trans/fakeroot.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/trans/fakeroot.c b/trans/fakeroot.c index df2de64..12173bd 100644 --- a/trans/fakeroot.c +++ b/trans/fakeroot.c @@ -964,9

[PATCH hurd-dde 3/4] eth-multiplexer: add payload-aware intrans functions

2014-11-27 Thread Justus Winter
* eth-multiplexer/mig-mutate.h: Add mutators. * eth-multiplexer/mig-decls.h (begin_using_device_payload): New function. * eth-multiplexer/Makefile (device-MIGSFLAGS): Define MACH_PAYLOAD_TO_PORT. --- eth-multiplexer/Makefile | 1 + eth-multiplexer/mig-decls.h | 6 ++ eth-multiplexer/mig-m

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

2014-11-27 Thread Justus Winter
* 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 (ports_reallocate_from_external): Likewise. * libports/reallocate-port.c (ports_reallocate_port

[PATCH hurd 30/30] mach-defpager: fix build

2014-11-27 Thread Justus Winter
--- mach-defpager/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mach-defpager/Makefile b/mach-defpager/Makefile index 09debed..ed115bd 100644 --- a/mach-defpager/Makefile +++ b/mach-defpager/Makefile @@ -27,7 +27,7 @@ SRCS := default_pager.c kalloc.c wiring.c main.c

[PATCH hurd 27/30] hurd: add intranpayload functions to all hurd types

2014-11-27 Thread Justus Winter
For each hurd type defined in hurd_types.h, add a intranpayload function. If an X_INTRAN mutation is defined for a type, a corresponding X_INTRAN_PAYLOAD has to be defined. If no X_INTRAN mutation is defined, use ports_payload_get_name as intranpayload function, turning the payload back into an p

[PATCH hurd-dde 1/4] devnode: add a payload-aware intrans function

2014-11-27 Thread Justus Winter
* devnode/mig-mutate.h: Add mutator. * devnode/Makefile (device-MIGSFLAGS): Define MACH_PAYLOAD_TO_PORT. --- devnode/Makefile | 1 + devnode/mig-mutate.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/devnode/Makefile b/devnode/Makefile index d9a9c23..9529fa7 100644 --- a/devnode/Makef

[PATCH hurd-dde 2/4] eth-filter: add payload-aware intrans functions

2014-11-27 Thread Justus Winter
* eth-filter/mig-mutate.h: Add mutators. * eth-filter/mig-decls.h (begin_using_device_payload): New function. --- eth-filter/mig-decls.h | 6 ++ eth-filter/mig-mutate.h | 4 2 files changed, 10 insertions(+) diff --git a/eth-filter/mig-decls.h b/eth-filter/mig-decls.h index 0bb29a6..a3f

[PATCH hurd 07/30] libnetfs: add a payload-aware intrans function

2014-11-27 Thread Justus Winter
* libnetfs/priv.h (begin_using_protid_payload): New function. * libnetfs/mutations.h: Add mutator. --- libnetfs/mutations.h | 3 +++ libnetfs/priv.h | 6 ++ 2 files changed, 9 insertions(+) diff --git a/libnetfs/mutations.h b/libnetfs/mutations.h index e60a220..088d8a0 100644 --- a/libne

Re: [PATCH hurd 02/30] include: force all refcount functions to be inlined

2014-11-30 Thread Justus Winter
Quoting Samuel Thibault (2014-11-27 19:18:35) > Justus Winter, le Thu 27 Nov 2014 14:18:42 +0100, a écrit : > > * include/refcount.h: Declare all functions `extern inline' instead of > > `static inline'. This forces those functions to be inlined, > > Well, act

[PATCH hurd 01/28] libshouldbeinlibc: move the reference counting primitives here

2014-12-01 Thread Justus Winter
--- a/include/refcount.h +++ /dev/null @@ -1,320 +0,0 @@ -/* Lock-less reference counting primitives - - Copyright (C) 2014 Free Software Foundation, Inc. - - Written by Justus Winter <4win...@informatik.uni-hamburg.de> - - This file is part of the GNU Hurd. - - The GNU Hurd is free so

[PATCH gnumach] kern: disable all counters by default

2014-12-01 Thread Justus Winter
Make all five non-conditional counters conditional ones. Casual checking revealed that the hits-to-miss ratio is excellent. * kern/counters.c: Make all counters conditional. * kern/counters.h: Likewise. * kern/ipc_sched.c: Likewise. * kern/sched_prim.c: Likewise. --- kern/counters.c | 3 +-- k

[PATCH mig] Add static branch prediction to type checks

2014-12-01 Thread Justus Winter
Annotate generated type checks with static branch prediction optimizing well-formed messages. * utils.c (WriteBogusDefines): Define `mig_unlikely' if not defined. * server.c: Use `mig_unlikely' in generated type checks. * user.c: Likewise. --- server.c | 21 - user.c | 27 ++

Re: [PATCH hurd 01/28] libshouldbeinlibc: move the reference counting primitives here

2014-12-02 Thread Justus Winter
Quoting David Michael (2014-12-02 12:40:26) > On Mon, Dec 1, 2014 at 10:00 AM, Justus Winter > <4win...@informatik.uni-hamburg.de> wrote: > > * libshouldbeinlibc/refcount.h: Move here, and declare all functions > > `extern inline'. > > * libshouldbeinlibc/refcou

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

2014-12-04 Thread Justus Winter
Hello, Hm, this was always the weakest part of the patch series. And I'm still not satisfied with it. Quoting Samuel Thibault (2014-12-02 01:51:36) > Justus Winter, le Thu 27 Nov 2014 14:19:08 +0100, a écrit : > > + /* We are the only one updating generation, s

Re: grub reinstall / grub keeps rebooting

2014-12-04 Thread Justus Winter
Hello, Quoting Riccardo Mottola (2014-12-04 17:44:28) > Riccardo Mottola wrote: > > I installed everything on a "host" machine (same architecture as my > > target box, just more ram and more Mhz). I end up with something > > bootable! > > However if I put the disk in my original box, it just kee

[PATCH gnumach] Retire procedure `old_mach_port_get_receive_status'

2014-12-08 Thread Justus Winter
Retire the compatibility RPC `old_mach_port_get_receive_status' that works like `mach_port_get_receive_status' but returns an `old_mach_port_status' object that lacks the `mps_seqno' field. Do not remove the type yet, so we do not break anyones build. The RPC stubs currently distributed with the

Re: [PATCH gnumach 1/2] kern: provide notifications about new tasks

2014-12-08 Thread Justus Winter
Quoting Samuel Thibault (2014-11-21 01:50:15) > Justus Winter, le Wed 12 Nov 2014 16:49:08 +0100, a écrit : > > +kern_return_t > > +register_new_task_notification( > > + const host_t host, > > + ipc_port_t notification) > > +{ > > + if (host

Re: Confusing results when trying to debug fakeroot-hurd

2014-12-08 Thread Justus Winter
Quoting Samuel Thibault (2014-12-08 13:11:22) > fprintf(stderr)+fflush *does* work, I've been using various times. I like to use error (0, 0, "didum"). It's easy to use, prints the servers name, prints a newline and does fflush. The most annoying thing about it is that it doesn't print the messa

Please help me test this glibc patch

2014-12-09 Thread Justus Winter
Hello, please help me test this glibc patch. It could bring a significant speedup to certain workloads, namely those that copy lots of memory in chunks. I wrote a micro-benchmark for this: teythoon@darnassus:~/build/time-memcpy$ bash driver.bash size iterations gcc_memcpy memcpy

[PATCH glibc] Hurd: Fix definition of `PAGE_COPY_THRESHOLD'

2014-12-09 Thread Justus Winter
Previously, `PAGE_THRESHOLD' was defined instead of `PAGE_COPY_THRESHOLD', preventing the optimization of memory copy operations using `vm_copy'. Also, increase the threshold to 4 pages. XXX Tune this. * sysdeps/mach/pagecopy.h (PAGE_THRESHOLD): Rename to `PAGE_COPY_THRESHOLD'. Raise threshold t

Re: Please help me test this glibc patch

2014-12-09 Thread Justus Winter
Quoting Samuel Thibault (2014-12-09 19:10:28) > Justus Winter, le Tue 09 Dec 2014 18:06:17 +0100, a écrit : > > teythoon@darnassus:~/build/time-memcpy$ bash driver.bash > > It's probably worth trying it on real hardware too. On darnassus there > is some cost related with

Re: [PATCH glibc] Hurd: Fix definition of `PAGE_COPY_THRESHOLD'

2014-12-09 Thread Justus Winter
Quoting Samuel Thibault (2014-12-10 00:07:28) > Hello, > > Justus Winter, le Tue 09 Dec 2014 18:06:18 +0100, a écrit : > > Previously, `PAGE_THRESHOLD' was defined instead of > > `PAGE_COPY_THRESHOLD', preventing the optimization of memory copy > > operation

Re: [PATCH glibc] Hurd: Fix definition of `PAGE_COPY_THRESHOLD'

2014-12-10 Thread Justus Winter
Quoting Justus Winter (2014-12-10 01:50:17) > Quoting Samuel Thibault (2014-12-10 00:07:28) > > so people can try them. > Yes, on real workloads. Somewhat less synthetic: % bash do_pipebench.bash Piping 1024 MByte from zero to null. (dd if=zero bs=X count=overall/X | dd of=nul

Neat trick to rescue Hurd systems

2014-12-10 Thread Justus Winter
Hello, I came up with a neat trick to rescue hanging Hurd systems. Or rather, the filesystems. When we kill an essential task from the kernel debugger, /hurd/startup will reboot the system: Stopped at machine_idle+0xe: leave db> call task_terminate($task4) 0 db> c /hurd/startup: Crashing

[PATCH hurd 2/5] libpager: use libports notification functions

2014-12-10 Thread Justus Winter
Now that we do not use sequence numbers anymore, we can simply use libports notification server functions. * libpager/Makefile (SRCS): Drop `no-senders.c', and `notify-stubs.c'. (OBJS): Drop `notifyServer.o'. * libpager/demuxer.c (pager_demuxer): Use libports server functions. * libpager/mig-mutat

[PATCH hurd 3/5] ext2fs: tune the size of the inode cache

2014-12-10 Thread Justus Winter
The node cache uses a fixed number of buckets giving it a linear access complexity, although with a small constant factor. Paper over this issue by increasing the number of buckets. * ext2fs/inode.c (INOHSZ): Increase from 512 to 8192 entries. --- ext2fs/inode.c | 2 +- 1 file changed, 1 inserti

[PATCH hurd 1/5] libpager: remove the `seqno' parameters

2014-12-10 Thread Justus Winter
* libpager/Makefile (MIGSFLAGS): Drop `-DSEQNOS'. * libpager/priv.h (struct pager): Drop fields `seqno' and `waitingforseqno'. * libpager/chg-compl.c: Adopt accordingly. * libpager/data-request.c: Likewise. * libpager/data-return.c: Likewise. * libpager/data-unlock.c: Likewise. * libpager/demuxer.c

[PATCH hurd 5/5] Replace `bcopy' with `memcpy' or `memmove' as appropriate

2014-12-10 Thread Justus Winter
* ext2fs/inode.c: Replace `bcopy' with `memcpy' or `memmove' as appropriate. * ext2fs/pager.c: Likewise. * isofs/lookup.c: Likewise. * isofs/main.c: Likewise. * isofs/rr.c: Likewise. * libdiskfs/file-get-trans.c: Likewise. * libiohelp/return-buffer.c: Likewise. * libpager/pagemap.c: Likewise. * lib

[PATCH hurd 4/5] Replace `bzero' with `memset'

2014-12-10 Thread Justus Winter
For reference, this patch was created using the following semantic patch, and then manually applying the change in all functions containing nested functions, as those are not supported by Coccinelle. @@ expression A, B; @@ - bzero (A, B) + memset (A, 0, B) * auth/auth.c: Replace `bzero' with `me

Re: [PATCH glibc] Hurd: Fix definition of `PAGE_COPY_THRESHOLD'

2014-12-10 Thread Justus Winter
Quoting Justus Winter (2014-12-10 12:59:43) > Somewhat less synthetic: > > % bash do_pipebench.bash > Piping 1024 MByte from zero to null. > (dd if=zero bs=X count=overall/X | dd of=null bs=X) > 4096 8192 12288 16384 32768 65536 > ‘libc.so.0.3’ ->

Re: [PATCH hurd 27/30] hurd: add intranpayload functions to all hurd types

2014-12-12 Thread Justus Winter
Quoting Samuel Thibault (2014-12-12 01:08:44) > Justus Winter, le Thu 27 Nov 2014 14:19:07 +0100, a écrit : > > +#ifdef HURD_DEFAULT_PAYLOAD_TO_PORT > > +#if HURD_DEFAULT_PAYLOAD_TO_PORT > > +/* Any non-numeric value will fail this test. If 1 (or any number) is > > +

[PATCH hurd] hurd: make the protected payload changes less intrusive

2014-12-12 Thread Justus Winter
The changes to `hurd_types.defs' caused the glibc build to fail. Guard the problematic parts with `HURD_SERVER' similar how it is done in GNU Mach. * Makeconf: Define `HURD_SERVER' when preprocessing the RPC definitions for the server side. * hurd/hurd_types.defs: Guard problematic parts with `HUR

Re: [PATCH hurd 3/5] proc: implement `proc_make_task_namespace'

2014-12-12 Thread Justus Winter
Quoting David Michael (2014-12-12 23:01:57) > Hi, > > On Thu, Nov 13, 2014 at 7:26 AM, Justus Winter > <4win...@informatik.uni-hamburg.de> wrote: > > @@ -1008,9 +1069,42 @@ S_mach_notify_new_task (mach_port_t notify, > >childp = new_proc (task); > >

Re: Neat trick to rescue Hurd systems

2014-12-13 Thread Justus Winter
Quoting Svante Signell (2014-12-11 22:57:49) > On Thu, 2014-12-11 at 22:25 +0100, Svante Signell wrote: > > On Wed, 2014-12-10 at 15:02 +0100, Justus Winter wrote: > > > Hello, > > > > > > I came up with a neat trick to rescue hanging Hurd systems. Or > >

[PATCH gnumach 2/2] ipc: guard test code with `MACH_IPC_TEST'

2014-12-16 Thread Justus Winter
* ipc/ipc_kmsg.h (ikm_mark_bogus): New macro. (ipc_kmsg_rmqueue_first_macro): Use `ikm_mark_bogus'. * ipc/ipc_kmsg.c (ipc_kmsg_rmqueue): Likewise. --- ipc/ipc_kmsg.c | 4 +--- ipc/ipc_kmsg.h | 19 +++ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ipc/ipc_kmsg.c b

[PATCH gnumach 1/2] ipc: tune size of cached kernel message buffers

2014-12-16 Thread Justus Winter
The previous limit was 256 bytes. That seems a little crummy by todays standards, and we are frequently sending bigger packets (e.g. every RPC containing a string_t on Hurd). Use the page size for IKM_SAVED_KMSG_SIZE to make sure the page is pinned to a single processor. * ipc/ipc_kmsg.h (IKM_SA

[PATCH gnumach] kern: gracefully handle bogus sample pc sequence number

2014-12-16 Thread Justus Winter
If a sequence number larger than the sample control sequence number is supplied, `nsamples' becomes negative. Handle this gracefully. * kern/pc_sample.c (get_sampled_pcs): Handle bogus sequence number. --- kern/pc_sample.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kern/pc_sample.c b

[PATCH gnumach 1/2] ipc: rework the kernel message buffer cache

2014-12-18 Thread Justus Winter
Keep a per-processor stack of free kernel messages buffers. * ipc/ipc_kmsg.h (IKM_CACHE_SIZE): New macro. (struct ipc_mksg_cpu_cache): New type. (ipc_kmsg_cache): Use the new type for the cache. (ikm_cache): Drop macro. (ikm_cache_get, ikm_cache_put): New functions. (ikm_free): Return buffers inst

Rework of the kernel message buffer cache

2014-12-18 Thread Justus Winter
Hello, I recently increased the maximum size of kernel message buffers that are cached in commit 73314404. This greatly improved the overall system performance. This is a rework of said cache mechanism. It reduces the number of cache misses even further, but its impact on performance is unclear

[PATCH gnumach 2/2] ipc: also use the kernel message buffer cache for kernel messages

2014-12-18 Thread Justus Winter
* ipc/ipc_kmsg.c (ipc_kmsg_get_from_kernel): Use the ikm cache. (ipc_kmsg_put_to_kernel): Likewis. --- ipc/ipc_kmsg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ipc/ipc_kmsg.c b/ipc/ipc_kmsg.c index e16709c..dfbb3eb 100644 --- a/ipc/ipc_kmsg.c +++ b/ipc/ipc_kmsg.c @@

[PATCH gnumach 2/3] i386: specialize `copyinmsg' and `copyoutmsg'

2014-12-18 Thread Justus Winter
Previously, `copyinmsg' was the same function as `copyin'. The former is for messages, and the size of messages is a multiple of four. Likewise for `copyoutmsg'. Provide a specialized version of both functions. This shaves off a couple of instructions and improves our IPC performance. * i386/i3

[PATCH gnumach 1/3] kern: improve assert

2014-12-18 Thread Justus Winter
Use the ternary operator to implement `assert' like it is done in the glibc. The glibcs changelog does not mention the rationale behind this change, but it does improve our IPC performance. * kern/assert.h (assert): Define macro using the ternary operator. --- kern/assert.h | 7 +++ 1 file c

[PATCH gnumach 3/3] linux: fix compiler warning

2014-12-18 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

Re: [PATCH gnumach 1/3] kern: improve assert

2014-12-19 Thread Justus Winter
Quoting Samuel Thibault (2014-12-19 02:54:17) > Justus Winter, le Fri 19 Dec 2014 02:48:56 +0100, a écrit : > > Use the ternary operator to implement `assert' like it is done in the > > glibc. The glibcs changelog does not mention the rationale behind > > this change, b

Re: [PATCH gnumach 1/3] kern: improve assert

2014-12-19 Thread Justus Winter
Quoting Justus Winter (2014-12-19 11:19:34) > Quoting Samuel Thibault (2014-12-19 02:54:17) > > Justus Winter, le Fri 19 Dec 2014 02:48:56 +0100, a écrit : > > > Use the ternary operator to implement `assert' like it is done in the > > > glibc. The glibcs changelo

Reinventing the Hurd server bootstrap

2014-12-26 Thread Justus Winter
Hello :) I've been thinking how to improve the early Hurd server bootstrap. To be clear, this is not about `bootstrap' as in sysvinit, but it is about how to start the very first Hurd servers. Now we all know that system bootstrap is an emotional subject, so I'd like to address any concerns you

Re: Reinventing the Hurd server bootstrap

2014-12-26 Thread Justus Winter
Quoting Richard Braun (2014-12-26 17:10:19) > On Fri, Dec 26, 2014 at 01:58:28PM +0100, Justus Winter wrote: > > It requires only tiny tweaks to libdiskfs, and a tiny patch to gnumach > > that enables us to load non-elf files into tasks. > > What kind of non-elf files ? Any

Re: Reinventing the Hurd server bootstrap

2014-12-27 Thread Justus Winter
Quoting Richard Braun (2014-12-27 12:20:17) > On Fri, Dec 26, 2014 at 06:32:33PM +0100, Justus Winter wrote: > > Quoting Richard Braun (2014-12-26 17:10:19) > > > What kind of non-elf files ? > > > > Any file. I created this patch in an attempt to use a dead task

Re: Reinventing the Hurd server bootstrap

2014-12-27 Thread Justus Winter
Quoting Ludovic Courtès (2014-12-27 22:22:34) > Justus Winter <4win...@informatik.uni-hamburg.de> skribis: > > > Wait, that sounds like serverboot, doesn't it ? > > > > It does. I think it was a mistake to abandon it in the first place. > > Evidence fo

Re: Reinventing the Hurd server bootstrap

2014-12-28 Thread Justus Winter
Quoting Ludovic Courtès (2014-12-28 14:38:56) > Oh right. Guile 2.0 relies on the availability of a file system to load > its modules from. I wonder if we could make some sort of an initrd or > multiboot module that would contain those files? We could, but we'd rather avoid using an initrd. And

Re: Rework of the kernel message buffer cache

2015-01-02 Thread Justus Winter
Quoting Samuel Thibault (2015-01-02 01:26:10) > Justus Winter, le Thu 18 Dec 2014 11:30:23 +0100, a écrit : > > Otoh I believe this is the right thing to do even if it doesn't > > improve the performance, as the current solution might be worse in a > > multi-cpu setti

Re: Wish to contribute!

2015-01-05 Thread Justus Winter
Hello Raoul :) Quoting Raoul Halmagean (2015-01-04 17:24:36) > Can you please assign me a task i could start working on based on my > knowledge? Please have a look at http://darnassus.sceen.net/~hurd-web/contributing/ There is a list of small hacks that should be suited for newcomers. Fixing co

Re: [PATCH hurd 0/6] Add file record locking support

2015-01-08 Thread Justus Winter
Hello Svante :) Quoting Svante Signell (2015-01-08 12:28:05) > Hi, > > Attached in subsequent mails is a patch series for file record locking > support, mainly developed by Neal Walfield in 2001. The patch was > published by Marcus Brinkmann and later re-diffed by Michael Banck in > 2002. Now mod

Re: Scripts to build a Hurd distro

2015-01-08 Thread Justus Winter
Hi David :) Quoting David Michael (2015-01-04 23:40:03) > I've uploaded updates to my Hurd build scripts for Fedora 21, so I > thought I'd send a note about it in case it helps anyone else out there > who is interested in building Hurd outside Debian. (The project has > actually bloated into a fa

Re: [PATCH hurd 0/6] Add file record locking support

2015-01-09 Thread Justus Winter
Quoting Svante Signell (2015-01-09 09:06:34) > Cloning hurd git from debian > git clone git://git.debian.org/git/pkg-hurd/hurd.git > shows that no patches are committed to the git tree That is unfortunately correct. The Debian Hurd package is patched beyond recognition, to the point that if you b

Re: [PATCH hurd 0/6] Add file record locking support

2015-01-09 Thread Justus Winter
Quoting Svante Signell (2015-01-09 12:01:15) > On Fri, 2015-01-09 at 10:22 +0100, Justus Winter wrote: > > Quoting Svante Signell (2015-01-09 09:06:34) > > > > > I don't recommend that. Instead, hack on a branch that sits on top of > > the current master. T

Re: Scripts to build a Hurd distro

2015-01-13 Thread Justus Winter
Quoting David Michael (2015-01-13 05:50:28) > I've uploaded a disk image and screenshots here: http://dm0.me/projects/gnuxc/ I'm very impressed, nice to see another Hurd distribution :) Some thoughts: * I do not like the login shell. Ymmv, but it exposes quite a bit of system state to an unau

Re: [PATCH 8/8] startup: bind the startup server to /servers/startup

2015-01-16 Thread Justus Winter
Hello Samuel, Quoting David Michael (2014-09-18 23:14:17) > On Wed, Sep 3, 2014 at 8:33 AM, Justus Winter > <4win...@informatik.uni-hamburg.de> wrote: > > Bind the startup server to /servers/startup instead. Use this to > > contact the startup server. > > I&#x

Hurd development (was: Release process & rolling new releases)

2015-01-16 Thread Justus Winter
Hello :) Quoting Thomas Schwinge (2014-11-22 18:00:06) > Justus, believe me, I do understand your frustration. Thank you very > much for being insistent, instead of just going away. It has been two months, time to escalate the issue again :) > > The glibc change is trivial. And even if the cha

Re: Hurd development (was: Release process & rolling new releases)

2015-01-16 Thread Justus Winter
Quoting Samuel Thibault (2015-01-16 11:56:14) > Justus Winter, le Fri 16 Jan 2015 11:42:23 +0100, a écrit : > > I have reimplemented the startup server. The new server does not > > support the startup protocol over its message port. This change has > > not made it into the

Re: Hurd development (was: Release process & rolling new releases)

2015-01-16 Thread Justus Winter
Quoting Samuel Thibault (2015-01-16 12:08:07) > Justus Winter, le Fri 16 Jan 2015 12:01:26 +0100, a écrit : > > No it is not. > > You mean in Debian? Yes. > > I have a new server that implements the startup protocol, and it > > neither has a fixed PID nor does it spea

[PATCH hurd 1/7] libfshelp: improve error handling

2015-01-17 Thread Justus Winter
* libfshelp/start-translator-long.c (fshelp_start_translator_long): Once we have a task, go to `lose_task' so that we do not leave hosed tasks around. --- libfshelp/start-translator-long.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libfshelp/start-translator-long.c

[PATCH hurd 3/7] libports: silence pointless error message

2015-01-17 Thread Justus Winter
* libports/manage-multithread.c (adjust_priority): Silence pointless error message. --- libports/manage-multithread.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c index 2067cba..ad22991 100644 --- a/libports/manage-multithre

[PATCH hurd 6/7] auth: remove implicit assumption about the bootstrap process

2015-01-17 Thread Justus Winter
The current code assumes that it can speak the startup protocol over its bootstrap port. * auth/auth.c (main): Generalize by trying to use `/servers/startup' before falling back to the bootstrap port. --- auth/auth.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --gi

[PATCH hurd 4/7] startup: give the tasks we create a name

2015-01-17 Thread Justus Winter
* startup/startup.c (run): Name the tasks we start. --- startup/startup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/startup/startup.c b/startup/startup.c index 601c894..c9fe215 100644 --- a/startup/startup.c +++ b/startup/startup.c @@ -33,6 +33,7 @@ #include #include #include +#i

[PATCH hurd 5/7] auth: simplify expression

2015-01-17 Thread Justus Winter
* auth/auth.c (S_auth_{user,server}_authenticate): Simplify expression. --- auth/auth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auth/auth.c b/auth/auth.c index c36bcb2..a7a188a 100644 --- a/auth/auth.c +++ b/auth/auth.c @@ -299,7 +299,7 @@ S_auth_user_authenticate (

[PATCH hurd 7/7] proc: call `startup_essential_task' earlier

2015-01-17 Thread Justus Winter
Previously, the proc server did not call `startup_essential_task' until it got the message port of the startup server using `proc_setmsgport'. Now that we have `/servers/startup', we can do this in main, before we start our message service loop. A complication arises because the traditional start

[PATCH hurd 2/7] libdiskfs: fix port leak

2015-01-17 Thread Justus Winter
* libdiskfs/boot-start.c (get_console): Deallocate `device_master'. --- libdiskfs/boot-start.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c index cfe2303..9be8ed2 100644 --- a/libdiskfs/boot-start.c +++ b/libdiskfs/boot-start.c @@ -61,6 +61,7

[PATCH hurd 2/2] utils/rpctrace: fix notification port handling

2015-01-20 Thread Justus Winter
* utils/rpctrace.c (new_receiver_info): Fix handling of old notification port. --- utils/rpctrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/rpctrace.c b/utils/rpctrace.c index 62d3c87..48daa07 100644 --- a/utils/rpctrace.c +++ b/utils/rpctrace.c @@ -404,7 +404,8

[PATCH hurd 1/2] console: fix error and notification port handling

2015-01-20 Thread Justus Winter
This fixes a deallocation of an invalid port notably seen on system shutdown. * console/display.c (free_modreqs): Handle errors of `mach_port_request_notification' and check whether the old notification port was valid. (do_mach_notify_msg_accepted): Likewise. (display_notice_filechange): Likewise.

[PATCH gnumach] ipc: warn about more port management bugs

2015-01-22 Thread Justus Winter
* ipc/mach_port.c (mach_port_destroy): Simplify expression. (mach_port_deallocate): Likewise. (mach_port_mod_refs): Also warn about errors when using this function. --- ipc/mach_port.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/ipc/mach_port.c b/ipc/mach

Is deallocating MACH_PORT_NULL an error ?

2015-01-22 Thread Justus Winter
Hello :) I've been hunting port handling bugs, and came up with the patch that will follow this mail. You will note that we do not print warnings if MACH_PORT_NULL or MACH_PORT_DEAD is supplied: runsystem@nonmonolithic / > (mach-port-deallocate mach-task-self MACH_PORT_NULL) Error: (mach-port-de

Re: Is deallocating MACH_PORT_NULL an error ?

2015-01-22 Thread Justus Winter
Quoting Samuel Thibault (2015-01-22 22:37:49) > Justus Winter, le Thu 22 Jan 2015 22:22:04 +0100, a écrit : > > So do we consider {deallocating,destroying,mod_refing} MACH_PORT_NULL > > or MACH_PORT_DEAD an error, or an expensive nop ? > > AIUI frobbing PORT_DEAD is quit

Re: HURD installation on laptop

2015-01-27 Thread Justus Winter
Quoting Riccardo Mottola (2015-01-25 17:55:13) > Hi, > > I'm trying to install HURD on a laptop > PIII 700, 392MB Ram, wireless card ("ral") > > full image, 5-1-2015 > > 1) text install. Install hangs idle (the cpu fan stops, thus I suppose > no loop) > start ext2fs: Hurd server bootstrap: ext2

Re: Reinventing the Hurd server bootstrap

2015-01-30 Thread Justus Winter
Hello :) I produced a demo live cd using my new bootshell: http://darnassus.sceen.net/~teythoon/booting-debian-preboot.png http://darnassus.sceen.net/~teythoon/booting-debian-boot.png http://darnassus.sceen.net/~teythoon/bootshell0129.iso.xz Notable features: * Boots an unmodified Debian (deboo

Re: FOSDEM talk?

2015-01-30 Thread Justus Winter
Quoting Samuel Thibault (2015-01-30 02:02:33) > Hello, > > About the Hurd news in my slides, in recent work, I have listed: > > - Init system decoupled > - Allows to use standard Debian sysvinit scripts! > - Using dmd for Guix & such > - Distributed mtab translator > - Various optimizations >

Re: Reinventing the Hurd server bootstrap

2015-01-30 Thread Justus Winter
Quoting Thomas Schmitt (2015-01-30 12:04:57) > > http://darnassus.sceen.net/~teythoon/bootshell0129.iso.xz > > Was it produced by grub-mkrescue ? Yes. It is very easy to remaster: 1. Unpack bootshellXX.iso into a dir, e.g. `master'. Use /hurd/iso9660fs on Hurd, or fuseiso, or file-roller on Li

Re: Reinventing the Hurd server bootstrap

2015-01-30 Thread Justus Winter
Quoting Thomas Schmitt (2015-01-30 14:25:50) > Hi, > > Justus Winter wrote: > > 3. Remaster using `grub-mkrescue --output=my-bootshell.iso /=master'. > > The beauty of grub-mkrescue. Yes, it's super nice :) > > To start an translator on demand, the file

Re: Reinventing the Hurd server bootstrap

2015-02-02 Thread Justus Winter
Quoting Samuel Thibault (2015-02-02 10:03:16) > I'd rather avoid such kind of autodetection Yes, I understand. > Some time ago (5 Sep 2011), while working on the initrd part for the > Debian installer, I thought about introducing a data-task-create > command, which would tell gnumach to just load

[PATCH gnumach] XXX

2015-02-02 Thread Justus Winter
--- kern/bootstrap.c | 36 ++-- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/kern/bootstrap.c b/kern/bootstrap.c index 4edae7b..9c2eb87 100644 --- a/kern/bootstrap.c +++ b/kern/bootstrap.c @@ -35,6 +35,7 @@ #include #include +#include #incl

Re: Reinventing the Hurd server bootstrap

2015-02-02 Thread Justus Winter
Quoting Samuel Thibault (2015-02-02 10:08:54) > > * Starts the Hurd console early on, > > How will this interact with being able to restart the console with > /etc/init.d/hurd-console? Badly :D. You cannot kill it easily with the init script b/c we cannot write the pid file that early on, and if

Re: Investigation of the failing build of gnat-4.9 using fakeroot-hurd

2015-02-03 Thread Justus Winter
Hello :) Quoting Svante Signell (2015-02-02 12:26:06) > Confusing thing is: Printouts in > libnetfs/dir-lookup.c:netfs_S_dir_lookup() are not triggered, but > libdiskfs/dir-lookup.c:diskfs_S_dir_lookup are. > libnetfs is built into fakeroot itself, but not libdiskfs, which is > built into ext2fs.s

[PATCH hurd] startup: add more error handling

2015-02-07 Thread Justus Winter
* startup/startup.c (launch_core_servers): Add more error handling. --- startup/startup.c | 63 --- 1 file changed, 41 insertions(+), 22 deletions(-) diff --git a/startup/startup.c b/startup/startup.c index e01d2a8..da78b13 100644 --- a/startup/

Re: Justus Winter

2015-02-13 Thread Justus Winter
Hello :) Quoting Thomas Schwinge (2015-02-13 10:18:26) > Justus has contributed a great chunk of good work to the Hurd project, > ever since starting to contribute regularely, a bit less than two years > ago. :-) Many thanks! And it has been a pleasure :) > (By the way, if my records are correc

Server delegation (fsys_forward)

2015-02-13 Thread Justus Winter
Hello :) I was wondering what you think about the server delegation mechanism. What are the pros or the original motivation (memory footprint maybe?), what are the cons (reduced robustness?). Is it even worth the effort? We do not use it currently. /hurd/magic could use it, but we do not instal

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

2015-02-15 Thread Justus Winter
For variable-length arrays, up to 2048 bytes are transmitted inline. If the array is larger, the data is transmitted out-of-line, and a pointer to a vm_allocated region is stored at the beginning of the array. Previously, the generated code casted the field. Use a union instead. This fixes the g

[committed hurd] libports: avoid acquiring global lock in message dispatch

2015-02-17 Thread Justus Winter
* libports/interrupt-operation.c (ports_S_interrupt_operation): Update `cancel_threshold' using atomic operations. * libports/manage-multithread.c (internal_demuxer): Avoid taking the lock. * libports/ports.h (struct port_info): Mention that one needs atomic operations to access `cancel_threshold'.

Re: Server delegation (fsys_forward)

2015-02-19 Thread Justus Winter
Quoting Roland McGrath (2015-02-19 01:52:29) > Indeed the purpose is to avoid the overhead of many processes that are all > nearly identical. What kind of overhead? Is it still worth it?

[committed mach 2/2] kern: reduce the size of `struct thread'

2015-02-20 Thread Justus Winter
Reduce the size of `struct thread' by twelve bytes making it fit into exactly five cache lines (on 32-bit platforms). * kern/thread.h (struct thread): Group the state and all flags in a bitfield. (TH_EV_WAKE_ACTIVE, TH_EV_STATE): Provide macros that generate keys for synchronization primitives lik

[committed mach 1/2] kern: avoid #if 0ing out thread_collect_scan

2015-02-20 Thread Justus Winter
Currently, `thread_collect_scan' does nothing because `pcb_collect' is a nop. Its body is exempt from compilation by means of the preprocessor. This is unfortunate as it increases the risk of bitrot, and we still need to pay the price of rate-limiting thread_collect_scan. * kern/thread.c (thread

Re: e2fsck of non-root filesystem failing at boot time, because already mounted?

2015-02-20 Thread Justus Winter
Hey Thomas :) Quoting Thomas Schwinge (2015-02-20 23:38:49) > On Fri, 20 Feb 2015 22:44:17 +0100, I wrote: > > As in the subject, and see the attached QEMU screenshot. Has something > > been changed in the boot process ("startup" is new; Justus CCed ;-) just /hurd/startup is the new /hurd/init,

[committed mach 2/4] kern: improve assert

2015-02-20 Thread Justus Winter
Use the ternary operator to implement `assert' like it is done in the glibc. The glibcs changelog does not mention the rationale behind this change, but doing the same seems to improve our IPC performance. * kern/assert.h (assert): Define macro using the ternary operator. --- kern/assert.h | 7 +

[committed mach 4/4] i386: specialize `copyinmsg' and `copyoutmsg'

2015-02-20 Thread Justus Winter
Previously, `copyinmsg' was the same function as `copyin'. The former is for messages, and the size of messages is a multiple of four. Likewise for `copyoutmsg'. Provide a specialized version of both functions. This shaves off a couple of instructions and improves our IPC performance. * i386/i3

[committed mach 3/4] i386: drop needless instruction from `copyout'

2015-02-20 Thread Justus Winter
* i386/i386/locore.S (copyout): Do not needlessly copy length to %eax first. --- i386/i386/locore.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/i386/i386/locore.S b/i386/i386/locore.S index 15715f6..2e04bb8 100644 --- a/i386/i386/locore.S +++ b/i386/i386/locore.S @@ -1

<    7   8   9   10   11   12   13   14   15   >