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

2014-12-18 Thread Samuel Thibault
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, but it does improve our IPC performance. Mmm, is it not a matter of changing the e

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

2014-12-18 Thread Samuel Thibault
Justus Winter, le Fri 19 Dec 2014 02:48:58 +0100, a écrit : > If the loop above completes at least one iteration, `i' will be larger > than zero. Ack. > * linux/dev/glue/block.c (rdwr_full): Add assertion to appease the > compiler. > --- > linux/dev/glue/block.c | 1 + > 1 file changed, 1 insert

[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

[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

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 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