[PATCH]: additional futex operations

Alexander Leidinger Alexander at Leidinger.net
Thu Mar 20 10:16:49 UTC 2008


Quoting Roman Divacky <rdivacky at FreeBSD.org> (from Thu, 20 Mar 2008  
09:51:22 +0100):

> On Thu, Mar 20, 2008 at 08:07:03AM +0100, Alexander Leidinger wrote:
>> Quoting Roman Divacky <rdivacky at FreeBSD.org> (from Wed, 19 Mar 2008
>> 21:45:21 +0100):
>>
>> >
>> >can you guys please test:
>> >
>> >	www.vlakno.cz/~rdivacky/futex_private_pi.patch
>> >
>> >especially if linux-firefox is still broken with this patch.
>>
>> What do you think about rate limiting (only one) the FD case instead
>> of hiding it completely (and using the content of the comment as the
>> message to print with a little bit of "only report if something is
>> obviously broken")? This way we could determine if we need it for
>> linux-backwards compatibility.
>
> I dont think the FD case is used widely and we correctly (now) return
> ENOSYS so no problems should be here.

The thought behind this is, that we can go from "should be" to "are".  
Doing a rate limited logging (print the message once) in -current (not  
in a MFC) should be enough to get a better idea.

> Also.. if anyone is willing/able to implement the FD backing I think such
> person is skilled enough to see what is the problem even without the printf.

It's not about finding some to implement it, it's about getting _hard_  
facts in our userbase.

> It can only confuse normal people I think..

For this reason I said to change the comment. Here's what I mean:
---snip---
static int limit_once = 0;
if (!limit_once) {
          limit_once = 1;
          printf("FD futex not implemented, linux wants to deprecate  
it. Do not report this, except when you see a real failure/misbehavior  
because of this.");
}
return (ENOSYS);
---snip---

> I'd let it be as it is
>
>> Is this a proof of concept (do you plan to make a no-op
>> LINUX_FUTEX_PRIVATE_FLAG case in the switch to be consistent) or the
>> final solution? I see pros/cons for both and I think it doesn't matter
>> how it is done, I'm just curious about your opinion.
>
> we DO implement private futexes. we DONT implement shared ones. We dont
> share futexes on "vm" structure or file descriptor. The only reason why
> it works is because 99% of application want private futexes but dont
> claim so :)

Yes, I understand that. What I wanted to know is, if you want to add a  
if/case statement with LINUX_FUTEX_PRIVATE_FLAG which does nothing  
(except containing the comment) for consistency/strict correctness  
reasons. As told above, I see value in both ways of doing it. I assume  
now you want to commit the patch as is, no need to comment further on  
this.

Bye,
Alexander.

-- 
You know you have a small apartment when Rice Krispies echo.
		-- S. Rickly Christian

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137


More information about the freebsd-emulation mailing list