[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 04/30: libports: clarify why we emulate protected payloads
From: |
Samuel Thibault |
Subject: |
[hurd] 04/30: libports: clarify why we emulate protected payloads |
Date: |
Tue, 22 Sep 2015 21:51:57 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 8d862231a0016dcf40f269e73d5b189606038490
Author: Justus Winter <address@hidden>
Date: Fri Aug 14 10:03:46 2015 +0200
libports: clarify why we emulate protected payloads
The Hurd uses protected payloads to improve the receiver lookup on the
server side to the point that we no longer do a hash table lookup in
the dispatch code.
If the kernel does not support protected payloads, we degrade
gracefully, do one lookup in libports' dispatching code, and emulate
the protected payload feature to still save one hash table lookup in
the intrans function.
* libports/manage-multithread.c (ports_manage_port_operations_multithread):
Add comment.
* libports/manage-one-thread.c (ports_manage_port_operations_one_thread):
Likewise.
---
libports/manage-multithread.c | 5 +++++
libports/manage-one-thread.c | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c
index dcb6905..60743d9 100644
--- a/libports/manage-multithread.c
+++ b/libports/manage-multithread.c
@@ -175,6 +175,11 @@ ports_manage_port_operations_multithread (struct
port_bucket *bucket,
pi = ports_lookup_port (bucket, inp->msgh_local_port, 0);
if (pi)
{
+ /* Store the objects address as the payload and set the
+ message type accordingly. This prevents us from
+ having to do another hash table lookup in the intran
+ functions if protected payloads are not supported by
+ the kernel. */
inp->msgh_bits = MACH_MSGH_BITS (
MACH_MSGH_BITS_REMOTE (inp->msgh_bits),
MACH_MSG_TYPE_PROTECTED_PAYLOAD);
diff --git a/libports/manage-one-thread.c b/libports/manage-one-thread.c
index 192907a..b920338 100644
--- a/libports/manage-one-thread.c
+++ b/libports/manage-one-thread.c
@@ -66,6 +66,11 @@ ports_manage_port_operations_one_thread (struct port_bucket
*bucket,
pi = ports_lookup_port (bucket, inp->msgh_local_port, 0);
if (pi)
{
+ /* Store the objects address as the payload and set the
+ message type accordingly. This prevents us from
+ having to do another hash table lookup in the intran
+ functions if protected payloads are not supported by
+ the kernel. */
inp->msgh_bits = MACH_MSGH_BITS (
MACH_MSGH_BITS_REMOTE (inp->msgh_bits),
MACH_MSG_TYPE_PROTECTED_PAYLOAD);
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (3dc2076 -> 3f883d3), Samuel Thibault, 2015/09/22
- [hurd] 03/30: pflocal: fix receiver lookup, Samuel Thibault, 2015/09/22
- [hurd] 04/30: libports: clarify why we emulate protected payloads,
Samuel Thibault <=
- [hurd] 06/30: Fake full file access only for faked nodes, Samuel Thibault, 2015/09/22
- [hurd] 05/30: Make fakeroot return file types from underly fs, Samuel Thibault, 2015/09/22
- [hurd] 07/30: ext2fs: improve ext2fs debugging, Samuel Thibault, 2015/09/22
- [hurd] 10/30: libdiskfs: fix typo, Samuel Thibault, 2015/09/22
- [hurd] 02/30: Print which path init tried to execv, Samuel Thibault, 2015/09/22
- [hurd] 11/30: libdiskfs: add missing declarations, Samuel Thibault, 2015/09/22
- [hurd] 08/30: ext2fs: provide unconditional debug macro, Samuel Thibault, 2015/09/22
- [hurd] 16/30: Make procfs accept none or proc as "device", Samuel Thibault, 2015/09/22
- [hurd] 15/30: Fix opening a fifo with O_RDWR, Samuel Thibault, 2015/09/22
- [hurd] 09/30: libdiskfs: fix parent lookup in the name cache, Samuel Thibault, 2015/09/22