-mutate.h b/devnode/mig-mutate.h
new file mode 100644
index 000..f692236
--- /dev/null
+++ b/devnode/mig-mutate.h
@@ -0,0 +1,25 @@
+/*
+ Copyright (C) 2014 Free Software Foundation, Inc.
+ Written by Justus Winter.
+
+ This file is part of the GNU Hurd.
+
+ The GNU Hurd is free software
Dear maintainer :)
please merge the random translator (found in [0]) into the main Hurd
repository.
0: git://git.sv.gnu.org/hurd/incubator.git, branch random
Rationale:
The random translator provides /dev/{,u}random that provide
cryptographically secure random numbers. A lot of software depend
Hi :)
this is a rebased patch series created by Emilio Pozuelo Monfort.
I've slightly amended the first patch.
This patch series makes the fakeroot translator usable, more precisely
the execution of interpreted scripts within the fakeroot environment.
Both the patch series and my amendment have r
d-off-by: Justus Winter <4win...@informatik.uni-hamburg.de>
---
doc/hurd.texi | 8 ++---
exec/exec.c | 48 ++---
exec/hashexec.c | 95 +
exec/priv.h | 4 ++-
hurd/exec.defs | 19 ++--
5 fi
From: Emilio Pozuelo Monfort
* configure.in: Check for _hurd_exec_file_name.
* utils/fakeauth.c: Call _hurd_exec_file_name instead of
_hurd_exec if it's available.
* utils/rpctrace.c: Likewise.
* utils/shd.c: Likewise.
Signed-off-by: Jeremie Koenig
Signed-off-by: Justus Winter
-by: Jeremie Koenig
Signed-off-by: Justus Winter <4win...@informatik.uni-hamburg.de>
---
TODO | 2 +-
doc/hurd.texi | 16
exec/hashexec.c | 32 ++-
hurd/fs.defs | 28 +++--
Hi,
Quoting Samuel Thibault (2014-04-08 02:18:13)
> Well, I'm not the one to be convinced: it's only Roland which can ack
> the glibc part, and thus the whole idea of the RPC addition. One "just"
> needs to explain him why we really need it.
I thought that this patch series was necessary for fak
Quoting Samuel Thibault (2014-04-08 13:50:28)
> Justus Winter, le Tue 08 Apr 2014 13:46:26 +0200, a écrit :
> > Quoting Samuel Thibault (2014-04-08 02:18:13)
> > > Well, I'm not the one to be convinced: it's only Roland which can ack
> > > the glibc par
Make the intran, outtran and destructor functions mutable using
preprocessor macros. Make it possible to inject imports using the
DEVICE_IMPORTS macro. This way, userspace servers can provide their
own translation functions.
* include/device/device_types.defs: Honor DEVICE_IMPORTS.
(device_t): M
* hurd/hurd_types.defs (interrupt_t): New type.
* hurd/hurd_types.h (interrupt_t): Likewise.
* hurd/interrupt.defs (interrupt_operation): Use the new type.
---
hurd/hurd_types.defs | 12
hurd/hurd_types.h| 1 +
hurd/interrupt.defs | 6 +-
3 files changed, 18 insertions(+),
* libports/interrupt-operation.c (ports_S_interrupt_operation): Fix
receiver lookup.
* libports/mig-mutate.h: Add mutators.
* libports/ports.h: Remove superfluous declarations.
---
libports/interrupt-operation.c | 4 +---
libports/mig-mutate.h | 7 +++
libports/ports.h |
* eth-filter/filter.c (ds_device_open): Remove invalid port deallocation.
---
eth-filter/filter.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/eth-filter/filter.c b/eth-filter/filter.c
index f3d58dd..04bf7b1 100644
--- a/eth-filter/filter.c
+++ b/eth-filter/filter.c
@@ -348,7 +348,6 @@ ds_de
Quoting Riccardo Mottola (2014-04-09 23:35:16)
> Hi,
>
> I was able to investigate this more. I have the inconveninece that at
> every HURD shtudown (even if graceful) I lookse my date&time in the bios...
>
> Justus Winter wrote:
> >> Sometimes bugs can't be
Previously, every userspace server implementing the device protocol
filtered the device definitions to replace the device_t type with
mach_port_send_t to make the device argument of device_open
polymorphic. Rather than doing that, which makes it impossible to use
translation functions, fix the def
Previously, the device definitions were filtered using sed to replace
the device_t type with mach_port_send_t to make the device argument of
device_open polymorphic. Rather than doing that, which makes it
impossible to use translation functions, the definition of device_open
has been amended.
* b
Hi :)
Quoting Richard Braun (2014-04-11 11:42:47)
> On Thu, Apr 10, 2014 at 02:01:17AM +0200, Richard Braun wrote:
> > The first issue that can be noticed is that, despite the filter being
> > filled with both NETF_IN and NETF_OUT, only incoming packets seem
> > to be captured. This is probably a
* libmachdev/ds_routines.c (mach_device_reference): Remove unused function.
---
libmachdev/ds_routines.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c
index a1fb058..66e5756 100644
--- a/libmachdev/ds_routines.c
+++ b/libmachdev/ds_rou
ev);
return err;
}
diff --git a/eth-multiplexer/mig-decls.h b/eth-multiplexer/mig-decls.h
new file mode 100644
index 000..a68e2ec
--- /dev/null
+++ b/eth-multiplexer/mig-decls.h
@@ -0,0 +1,45 @@
+/*
+ Copyright (C) 2014 Free Software Foundation, Inc.
+ Written by Justus Winter.
+
+ Th
ON;
proxy = user->proxy;
- ports_port_deref (user);
if (proxy->device == NULL)
{
diff --git a/eth-filter/mig-decls.h b/eth-filter/mig-decls.h
new file mode 100644
index 000..0bb29a6
--- /dev/null
+++ b/eth-filter/mig-decls.h
@@ -0,0 +1,45 @@
+/*
+ Copyright (C) 2014 Free
Here are some patches for the dde stuff currently residing in the
incubator repo.
Justus
* libmachdev/ds_routines.c: Include mig-generated device_S.h.
(ds_device_intr_register): Fix function declaration.
---
libmachdev/ds_routines.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c
index e415cdb..bbf5488 100644
--
CH_PORT_NULL)
+ if (device == NULL)
return D_NO_SUCH_DEVICE;
return D_INVALID_OPERATION;
diff --git a/libmachdev/mig-decls.h b/libmachdev/mig-decls.h
new file mode 100644
index 000..1d137cd
--- /dev/null
+++ b/libmachdev/mig-decls.h
@@ -0,0 +1,44 @@
+/*
+ Copyright (C) 2014
Previously, mach_convert_port_to_device would return a pointer to
struct emul_device, which is embedded in struct mach_device. In order
to get to the port_info structure which is right before that,
device_to_pi would subtract offsetof (struct mach_device, dev) from
the pointer. Avoid that by maki
* devnode/devnode.c: Fix argp_program_version, remove
argp_program_bug_address.
---
devnode/devnode.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/devnode/devnode.c b/devnode/devnode.c
index 101675d..dbbd40e 100644
--- a/devnode/devnode.c
+++ b/devnode/devnode.c
@@ -35,
Previously, the device definitions were filtered using sed to replace
the device_t type with mach_port_send_t to make the device argument of
device_open polymorphic. Rather than doing that, which makes it
impossible to use translation functions, the definition of device_open
has been amended.
* d
* eth-multiplexer/multiplexer.c: Fix argp_program_version, remove
argp_program_bug_address.
---
eth-multiplexer/multiplexer.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/eth-multiplexer/multiplexer.c b/eth-multiplexer/multiplexer.c
index c36ab78..a133f45 100644
--- a/e
* eth-filter/filter.c: Fix argp_program_version, remove
argp_program_bug_address.
---
eth-filter/filter.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/eth-filter/filter.c b/eth-filter/filter.c
index 8c76c7b..7a25c10 100644
--- a/eth-filter/filter.c
+++ b/eth-filter/filt
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function. The reply message has already been properly initialized in
libports, so there is no need t
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function. The reply message has already been properly initialized in
libports, so there is no need t
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function. The reply message has already been properly initialized in
libports, so there is no need t
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function. The reply message has already been properly initialized in
libports, so there is no need t
Quoting Samuel Thibault (2014-04-11 22:27:09)
> Justus Winter, le Fri 11 Apr 2014 09:32:30 +0200, a écrit :
> > Previously, every userspace server implementing the device protocol
> > filtered the device definitions to replace the device_t type with
> > mach_port_send_t to mak
Quoting Justus Winter (2014-04-11 23:11:59)
> Quoting Samuel Thibault (2014-04-11 22:27:09)
> > Justus Winter, le Fri 11 Apr 2014 09:32:30 +0200, a écrit :
> > > Previously, every userspace server implementing the device protocol
> > > filtered the device definitions t
Quoting Samuel Thibault (2014-04-11 22:25:26)
> Justus Winter, le Fri 11 Apr 2014 15:34:09 +0200, a écrit :
> > -DIST_FILES = ourdevice.defs notify.defs
> > +DIST_FILES = device.defs notify.defs
>
> Mmm, why keeping device.defs? Shouldn't we be using the one from
>
Since 50bfb9acf98d5f4c0c5948cc28285e990b40b659 git is used to produce
dist tarballs.
* console-client/Makefile (DIST_FILES): Do not set obsolete variable.
---
console-client/Makefile | 4
1 file changed, 4 deletions(-)
diff --git a/console-client/Makefile b/console-client/Makefile
index 65a
Quoting Samuel Thibault (2014-04-12 09:19:54)
> Justus Winter, le Fri 11 Apr 2014 15:34:13 +0200, a écrit :
> > --- a/libmachdev/device.defs
> > +++ b/libmachdev/device.defs
>
> That being said, I guess we should be using gnumach's .defs?
Yes, some day, but for now th
* kern/bootstrap.c (boot_script_task_create): Set the name of newly
created tasks.
---
kern/bootstrap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kern/bootstrap.c b/kern/bootstrap.c
index 7cfff3a..d919e90 100644
--- a/kern/bootstrap.c
+++ b/kern/bootstrap.c
@@ -800,6 +800,7 @@ boot_scrip
device_open used to explicitly call ds_device_open_reply instead of
just letting the mig-generated wrapper around ds_device_open generate
the return message. There is really no need for that.
* libmachdev/net.c: Do not include device_reply_U.h.
(device_open): Do not call ds_device_open_reply.
Set
Some more fixes for the code in the dde branch of the incubator.
Justus
libmachdev uses two port buckets previously both named port_bucket.
Rename the one containing device_t ports to device_bucket to clearly
distinguish them.
* libmachdev/ds_routines.c (port_bucket): Rename to device_bucket.
* libmachdev/mig-decls.h: Likewise.
---
libmachdev/ds_routines.c | 8 --
mach_device_deallocate just called ports_port_deref. However, the
reference counting is done by the translation functions, explicitly
reducing the reference count is just wrong.
* libmachdev/ds_routines.c (mach_device_deallocate): Remove now unused
function.
(ds_device_close): Drop spurious call
* libmachdev/net.c (linux_intr_pri): Drop unused declaration.
(port_bucket): Likewise.
(dev_class): Likewise.
---
libmachdev/net.c | 4
1 file changed, 4 deletions(-)
diff --git a/libmachdev/net.c b/libmachdev/net.c
index 300d946..6037e2f 100644
--- a/libmachdev/net.c
+++ b/libmachdev/net.c
* libmachdev/ds_routines.c (create_device_port): Fix the type of the
size parameter. Make it return error_t.
* libmachdev/ds_routines.h (create_device_port): Add declaration.
* libmachdev/net.c: Include ds_routines.h.
* libmachdev/block.c: Include ds_routines.h.
---
libmachdev/block.c | 1 +
Include the mig-generated X_S.h files so that the X_routine functions
can be inlined into the demuxer functions.
* libmachdev/ds_routines.c: Add missing include of notify_S.h
* libmachdev/trivfs_server.c: Add missing include of device_S.h, and
notify_S.h.
---
libmachdev/ds_routines.c | 1 +
lib
This enables the compiler to check that the server function
declarations match MIGs expectations. Fix a few oddities along the
way.
* console-client/trans.c: Include MIG-generated server header file(s).
* console/console.c: Likewise. Also, fix declarations.
* console/mutations.h (TIOCTL_IMPORTS)
Hi :)
here is a patch that will help prevent me from doing mistakes like [0]
in the future. Oh, and it will make fakeroot faster.
0: f1aa15a509d4249b19bb3d7f1f388829dd5135f8
Cheers,
Justus
Quoting Svante Signell (2014-04-24 10:39:10)
> On Fri, 2014-04-18 at 10:03 +0200, Samuel Thibault wrote:
> > Samuel Thibault, le Thu 17 Apr 2014 00:03:45 +0200, a écrit :
> > > Thomas Schwinge, le Wed 09 Apr 2014 09:36:42 +0200, a écrit :
> > > > Well, the first step is to verify that TARGET_THREAD
Quoting Solal (2014-04-24 09:53:45)
> ../device/net_io.c:1184:5: error: function definition is not allowed here
> {
> ^
> 4 warnings and 1 error generated.
You stumbled across the only file in gnumach containing nested
functions. Maybe your compiler just does not support them?
Justus
Quoting Solal (2014-04-26 10:06:59)
> What's nested functions?
It is a gcc extension:
http://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html
> That's as closures in JavaScript?
Yes.
Justus
Quoting Svante Signell (2014-04-26 13:59:57)
> > For reference, here are my notes about one of these crashes (Svante,
> > is this still current?):
>
> Yes it is, thanks for your help so far. Is the rpctrace bug you
> mentioned that the wrong ports are reported?
>
> > ~~~ snip ~~~
> > [...]
> > ta
Hi :)
Quoting Solal (2014-04-26 11:29:06)
> How active them on LLVM?
You don't:
http://clang.llvm.org/docs/UsersManual.html#gcc-extensions-not-implemented-yet
You could propose a patch to turn this into a normal function. Or you
could use gcc.
Justus
Hey Solal :)
Quoting Solal (2014-04-26 16:09:03)
> I've tried to compile GCC but that's still LLVM which I call when I type
> "gcc".
My mind-reading device tells me that you are using "Mac OS X 10.9".
Entering "installing gcc on mac os x 10.9" into a popular search
engine turned up various hits,
_ports_bucket_class_iterate creates a snapshot of the buckets hash
table. This is done so that the lock protecting the hash table can be
released while we iterate over the snapshot.
Formerly, a linked list was used to store the snapshot. As the
maximal number of items is known, using an array is
Some servers use ports_manage_port_operations_one_thread to process
requests and terminate when it returns. Since many of them don't detach
before shutting down, a client may receive an error if its request
arrived while the server is shutting down. Prevent those spurious errors
by forcing ports_ma
The default sync interval has been changed in 9e55fdd7 from 30 to 5
seconds. This change was not reflected in the documentation.
At least for current hardware, using 30 seconds instead of just 5
alleviates the thread-storm problem. Make 30 seconds the default
again.
* libdiskfs/priv.h (DEFAULT_
* exec/exec.c (do_exec): If the formatted task name exceeds
TASK_NAME_SIZE, abbreviate it.
---
exec/exec.c | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/exec/exec.c b/exec/exec.c
index 935762e..b068f5e 100644
--- a/exec/exec.c
+++ b/exec/exec.c
@@ -1168,9 +11
* ext2fs/pager.c (add_pager_max_prot): Simplify expression.
---
ext2fs/pager.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ext2fs/pager.c b/ext2fs/pager.c
index 6e99c83..9116b8c 100644
--- a/ext2fs/pager.c
+++ b/ext2fs/pager.c
@@ -1453,8 +1453,7 @@ diskfs_max_user_pager_p
Hi :)
tl;dr: How many pager threads does it take to skrew in a light bulb?
One.
[PATCH 1/9] libdiskfs: set the default sync interval to 30 seconds
Well, I made this one before I knew that the thread-storm problem
might just be gone with this patch series. Still, we should either
apply this patc
* libpager/Makefile (MIGSFLAGS): Drop -DSEQNOS.
* libpager/chg-compl.c: Adjust accordingly.
* libpager/data-request.c: Likewise.
* libpager/data-return.c: Likewise.
* libpager/data-unlock.c: Likewise.
* libpager/demuxer.c: Likewise.
* libpager/lock-completed.c: Likewise.
* libpager/no-senders.c: Li
Previously, libpager used multiple threads to service requests to
memory objects. This has proven to be problematic, as paging requests
often arrive in batches, resulting in the creation of many hundred
threads.
Furthermore, the semantic of paging requests requires that the
requests to an object
Previously, inum was of type int, whereas dino_ref expects ino_t. On
Hurd/x86 the former is 32 bit wide, the latter 64. If dino_ref is
inlined, this does not seem to pose a problem, but if ext2fs is
compiled with -O0, this most likely results in an invalid memory access.
* ext2fs/ialloc.c (ext2_
ext2fs has two kinds of pagers. One for the files, one for the disk.
Previously, both were in the same port bucket.
If a request for a file pager arrives, it most likely touches some
metadata (like the superblock). This is in turn backed by the disk
pager, so another request is generated for the
Quoting Samuel Thibault (2014-04-28 12:34:43)
> Justus Winter, le Mon 28 Apr 2014 12:20:00 +0200, a écrit :
> > Previously, inum was of type int, whereas dino_ref expects ino_t. On
> > Hurd/x86 the former is 32 bit wide, the latter 64. If dino_ref is
> > inlined, this do
Follow-up Comment #1, bug #18883 (project hurd):
Contrary to its documentation, my gnumach has actually 50 priorities:
shed.h:
#define NRQS50 /* 50 run queues per cpu */
[...]
#define invalid_pri(pri) (((pri) < 0) || ((pri) >= NRQS))
So we can actually have a bijective m
_ports_bucket_class_iterate creates a snapshot of the buckets hash
table. This is done so that the lock protecting the hash table can be
released while we iterate over the snapshot.
Formerly, a linked list was used to store the snapshot. As the
maximal number of items is known, using an array is
Update of bug #15329 (project hurd):
Status: In Progress => Wont Fix
___
Follow-up Comment #4:
Support for zipped binaries has been removed in
23ca8f5f942f831ec5be3667fd0a29873fae2912 and
b2e27f
* fatfs/pager.c (add_pager_max_prot): Simplify expression.
---
fatfs/pager.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fatfs/pager.c b/fatfs/pager.c
index 8146e64..6180aac 100644
--- a/fatfs/pager.c
+++ b/fatfs/pager.c
@@ -1008,8 +1008,7 @@ diskfs_max_user_pager_prot ()
Currently, diskfs_node_iterate iterates twice over all nodes in the
cache. The first time only to determine the number of nodes currently
in the cache. Simply count them instead.
* ext2fs/inode.c (nodehash_nr_items): New variable.
(diskfs_cached_lookup): Increment nodehash_nr_items.
(diskfs_node
Currently, diskfs_node_iterate iterates twice over all nodes in the
cache. The first time only to determine the number of nodes currently
in the cache. Simply count them instead.
* fatfs/inode.c (nodehash_nr_items): New variable.
(diskfs_cached_lookup): Increment nodehash_nr_items.
(diskfs_cache
Currently, diskfs_node_iterate iterates twice over all nodes. The
first time only to determine the number of nodes. Simply count them
instead.
* tmpfs/node.c (all_nodes_nr_items): New variable.
(diskfs_free_node): Decrement all_nodes_nr_items.
(diskfs_node_norefs): Likewise.
(diskfs_cached_looku
The number of priorities has been changed from 32 to 50 in
6a234201081156e6d5742e7eeabb68418b518fad.
* doc/mach.texi: Update accordingly.
---
doc/mach.texi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/mach.texi b/doc/mach.texi
index d089224..49c0d67 100644
--- a/d
The task_set_name RPC introduced in 877a319c changed
include/mach/gnumach.defs to include mach_debug/mach_debug_types.defs.
Previously though, the debug headers were not installed.
* Makefrag.am: Install the mach_debug header files.
---
Makefrag.am | 15 ---
1 file changed, 12 inserti
GNU MIG recently gained support for emitting x_server_routine
declarations in the generated server header file. Using this
declaration, the x_server_routine functions can be inlined into the
ipc_kobject_server function.
* kern/ipc_kobject.c: Include the MIG-generated server headers for the
machin
Previously, the definition of the host_slab_info RPC was guarded with
MACH_VM_DEBUG, even though it is not at all concerned with the VM
subsystem. Furthermore, there was no "skip" directive for
host_slab_info.
The function host_slab_info is guarded with MACH_DEBUG. The server
for the RPCs in mac
Commit b6dab094 introduced a way to include the MIG-generated server
files for the machine specific interface in ipc_kobject.c.
This broke out-of-tree builds. Here, 'machine' is a symlink to
'../i386/i386', it points into the source tree. The MIG-generated
files however are put in the build tree
Currently, the size of struct vm_map is 68 bytes. By using a bit
field for the boolean flags, it can be made fit into a cache line.
* vm/vm_map.h (struct vm_map): Use a bit field for the boolean flags
wait_for_space and wiring_required.
---
vm/vm_map.h | 7 +--
1 file changed, 5 insertions(+
Hi :)
Quoting Samuel Thibault (2014-05-02 02:22:01)
> Does anybody remember precisely why chroots should have their own
> ext2fs? I can build packages fine from inside a chroot which doesn't
> have its own ext2fs, for instance.
I thought only subhurds need their own translator?
Justus
io_map_cached is like io_map, but reuses the old mapping if it is
applicable.
* i386/i386/io_map.c: Add io_map_cached.
---
i386/i386/io_map.c | 29 +
1 file changed, 29 insertions(+)
diff --git a/i386/i386/io_map.c b/i386/i386/io_map.c
index 74e0b47..03d7152 100644
--
* ddb/db_command.c (db_command_table): Add "halt" command.
* i386/i386/db_interface.h (db_halt_cpu): New declaration.
* i386/i386at/model_dep.c (db_halt_cpu): New function.
---
ddb/db_command.c | 1 +
i386/i386/db_interface.h | 2 ++
i386/i386at/model_dep.c | 5 +
3 files changed, 8 i
I forgot to add i386/i386at/acpihalt.h.
Quoting Justus Winter (2014-05-03 01:33:14)
> This is a mostly verbatim copy of acpihalt.c from GRUB2 with a little
> bit of glue code.
> [...]
> * i386/i386at/acpihalt.c: Likewise.
> (grub_acpi_halt): Map physical addresses.
Hum. Maybe I'm holding stuff wrong. A little
/* Hi :)
I believe I have found two problems in the glibc.
1. hurd_check_cancel takes 'lock', and then asserts that
'critical_section_lock' is not taken. However, hurd_thread_cancel
first takes 'critical_section_lock' and then 'lock'. This program
demonstrates this by spinning on both
Quoting Samuel Thibault (2014-05-05 16:55:19)
> Richard Braun, le Mon 28 Apr 2014 16:55:17 +0200, a écrit :
> > But it's certainly on the right path and shouldn't be far from being
> > reliable (or at least, a lot more reliable than the current code).
We encountered two problems:
1. netdde kept c
* libports/bucket-iterate.c (_ports_bucket_class_iterate): Unlock
_ports_lock on malloc failure.
---
libports/bucket-iterate.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libports/bucket-iterate.c b/libports/bucket-iterate.c
index 498cf13..babc204 100644
--- a/libports/
fatfs has two kinds of pagers. One for the files, one for the disk.
Previously, both were in the same port bucket.
If a request for a file pager arrives, it most likely touches some
metadata (like the superblock). This is in turn backed by the disk
pager, so another request is generated for the
* libdiskfs/diskfs.h (struct peropen): Use refcount_t for field refcnt.
* libdiskfs/peropen-make.c (diskfs_make_peropen): Initialize refcnt.
* libdiskfs/peropen-rele.c (diskfs_release_peropen): Adjust accordingly.
* libdiskfs/protid-make.c (diskfs_start_protid): Likewise. Also, the
node must no lo
* libtrivfs/trivfs.h (struct trivfs_peropen): Use refcount_t for field
refcnt.
(struct trivfs_control): Remove unused field lock.
* libtrivfs/cntl-create.c (trivfs_create_control): Drop the mutex
initialization.
* libtrivfs/io-reauthenticate.c (trivfs_S_io_reauthenticate): Adjust
accordingly.
* lib
* libports/ports.h (struct port_info): Use the new type.
* libports/lookup-port.c: No need to lock _ports_lock anymore.
* libports/bucket-iterate.c: Likewise.
* libports/complete-deallocate.c: Check if someone reacquired a
reference through a hash table lookup.
* libports/create-internal.c: Use the
Previously, the superblock was mmaped and a pointer stored in sblock
by map_hypermetadata. This memory is backed by our disk pager.
This is rather unfortunate, as this means that whenever we read a
value from that location, we might generate a request our disk pager.
This amplifies the so-called
* ext2fs/pager.c (enable_caching, disable_caching): Iterate over the
pager class instead of over both pager buckets.
---
ext2fs/pager.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/ext2fs/pager.c b/ext2fs/pager.c
index 017efcc..6328f3b 100644
--- a/ext2fs/pager.c
+++ b
Previously, libports used a hash table per port bucket. This makes
looking up a port difficult if one does not know the port bucket, as
one has to iterate over all buckets and do a hash table lookup each.
Having to iterate over the buckets makes it necessary to keep a list
of all buckets, which h
Use an integer hash function to derive the index from the key. This
should reduce the number of collisions.
* libihash/ihash.c (hash_int32): New function.
(find_index): Use hash_int32 on the key to derive the index.
(add_one): Likewise.
---
libihash/ihash.c | 23 +--
1 file c
* fatfs/pager.c (enable_caching, disable_caching): Iterate over the
pager class instead of over both pager buckets.
---
fatfs/pager.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/fatfs/pager.c b/fatfs/pager.c
index f855ecf..7aa5c5e 100644
--- a/fatfs/pager.c
+++ b/f
libihash uses open addressing. Previously, quadratic probing in both
directions was used to resolve collisions. Quadratic probing might
result in a less efficient use of caches.
Also, prime numbers of the form 4 * i + 3 were used as array sizes.
This was used in combination with the integer modu
* libihash/ihash.h (HURD_IHASH_MAX_LOAD_DEFAULT): Set to 75.
---
libihash/ihash.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libihash/ihash.h b/libihash/ihash.h
index 3ca5ec3..6bdc925 100644
--- a/libihash/ihash.h
+++ b/libihash/ihash.h
@@ -94,7 +94,7 @@ typedef struct hur
/null
+++ b/include/refcount.h
@@ -0,0 +1,174 @@
+/* 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 software; y
The performance of hash tables depend critically on a low number of
hash collisions. As the table fills up, the chance of collisions
necessarily raises.
Previously, libihash resized the hash table when the load exceeded
80%. This seems a bit optimistic (e. g. java.util.Hashtable uses 75%
as defa
Quoting Samuel Thibault (2014-05-13 01:00:30)
> Justus Winter, le Mon 12 May 2014 12:05:40 +0200, a écrit :
> > Previously, libports used a hash table per port bucket. This makes
> > looking up a port difficult if one does not know the port bucket, as
> > one has to iterate
Quoting Samuel Thibault (2014-05-13 01:04:13)
> Justus Winter, le Mon 12 May 2014 12:05:41 +0200, a écrit :
> > +/* An opaque type. You must not access these values directly. */
> > +typedef uint64_t refcounts_t;
> > +
> > +/* Instead, the functions manipulating r
Quoting Neal H. Walfield (2014-05-13 09:44:21)
> At Mon, 12 May 2014 12:05:41 +0200,
> Justus Winter wrote:
> > +/* Decrement REF. Return the result of the operation. This function
> > + uses atomic operations. It is not required to serialize calls to
> > + this f
701 - 800 of 1489 matches
Mail list logo