[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Justus Winter
Subject: Re: [PATCH hurd 28/30] libports: use protected payloads to optimize the object lookup
Date: Fri, 03 Apr 2015 11:55:07 +0200
User-agent: alot/0.3.5

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 delivered to X.
> Mmm, isn't that also true for any kind of message?

You are right, it is.

I briefly spoke with Richard about the problem.  He suggested to
insert a tomb-stone in ports_destroy, and use Mach's no-senders
notification to deallocate the portinfo structure.  No need for a
fancy deallocation scheme.

That sounds great, and I couldn't believe that I didn't came up with
that by myself.  But when I got the chance to look at my patchset
again, I remembered the problem with that approach:

No-senders notifications are sent to the port they are registered for.

So when we destroy the receive right in ports_destroy, we either get
the notification because it was dequeued to userspace before we
destroyed the right, or we destroy the right before it is dequeued and
we miss it.

So, having turned this over in my head I believe that creating a new
kind of no-senders notification (that is sent to an unrelated port but
carry the name of the port that ran out of senders, similar to how
dead-name notifications work) and then implementing what Richard
suggested is the cleanest solution.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]