nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   [PATCH] Mutexes instead of semaphores (http://www.nvnews.net/vbulletin/showthread.php?t=86631)

JaXXoN 02-18-07 02:13 PM

[PATCH] Mutexes instead of semaphores
 
1 Attachment(s)
Since 2.6.18, most semaphores in the Linux kernel have been changed to
mutexes. The kernel module of the nvidia linux graphics driver still uses
semaphores. There is bascially nothing wrong about that since mutexes
and semaphores can be mixed (AFAIK), but i have experienced a very
strange problem with 2.6.18, 2.6.19 and 2.6.20-rt5 with UT2004:

While doing network matches, it apears as if the connection to the server
gets lost - means, you can still move around or perform menu operations,
but you can't hit enemies, etc. With tcpdump, you can still see network
traffic to/from the server - i guess this is the reason why you don't get a
"connection lost" message. The problem tyically showed up within
20 minutes of playing.

I tried a whole lot of things that didn't helped, but after replacing the
semaphores in the nvidia graphics driver with mutexes, the problem
seems to have disapeared.

So if you are experiencing similar issues with newer kernels, then you may
like to try out the attached patch.

regards

Bernhard

dmetz99 02-18-07 07:16 PM

Re: [PATCH] Mutexes instead of semaphores
 
I haven't noticed the same problem, here (maybe because I don't do any on-line gaming), but I will give you patch a try later tonight or tomorrow evening and see what happens. Have you noticed any other performance changes (for the better or for the worse) as a result?

(PS - always appreciate you efforts in the RT arena!)

JaXXoN 02-18-07 08:27 PM

Re: [PATCH] Mutexes instead of semaphores
 
Quote:

Originally Posted by dmetz99
I haven't noticed the same problem, [...], but I will give you patch a try

If you don't notice any problems, then the patch shouldn't make any
difference for you, and I haven't recoginzed any significant performance
boost :-)

Quote:

Originally Posted by dmetz99
(PS - always appreciate you efforts in the RT arena!)

Thanks, but this issue is basically not -rt related, except that the
mutexes have formerly been part of the -rt patch and now got mainstream :-)
(So it is an -rt related issue? hmm ... )

regards

Bernhard

JaXXoN 02-18-07 08:31 PM

Re: [PATCH] Mutexes instead of semaphores
 
Quote:

Originally Posted by dmetz99
maybe because I don't do any on-line gaming

BTW.: i'm just doing hours of hours of online-gaming for the purpose of
stability testing, of course! ;-)

regards

Bernhard

TPG 02-18-07 11:50 PM

Re: [PATCH] Mutexes instead of semaphores
 
And what about legacy drivers?

Any special patches for Enemy-Territory fans? :)

JaXXoN 02-19-07 09:41 AM

Re: [PATCH] Mutexes instead of semaphores
 
Quote:

Originally Posted by TPG
And what about legacy drivers?

Do you mean 7184?

Quote:

Originally Posted by TPG
Any special patches for Enemy-Territory fans? :)

Not that i'm aware of! What kind of problem do you experience (if at all)?

regards

Bernhard

TPG 02-19-07 01:36 PM

Re: [PATCH] Mutexes instead of semaphores
 
Quote:

Originally Posted by JaXXoN
Do you mean 7184?

Nope, 9631.

Quote:

Originally Posted by JaXXoN
Not that i'm aware of! What kind of problem do you experience (if at all)?

regards

Bernhard

Well, i must say that game "handling" is quite different that on older drivers and kernels. If i recalm correctly, best performance was with kernel < 2.6.17 and with nvidia < 1.0-9XXX.

Does that "incompatabilities" could have any impact on ET ?

JaXXoN 02-20-07 05:59 AM

Re: [PATCH] Mutexes instead of semaphores
 
Quote:

Originally Posted by TPG
best performance was with kernel < 2.6.17 and with
nvidia < 1.0-9XXX.

Out of my stomac, I don't have the expression that there is a significant
performance difference amongst kernels (however, i didn't do
benchmarks on that topic)

regards

Bernhard

JaXXoN 02-20-07 06:25 AM

Re: [PATCH] Mutexes instead of semaphores
 
Hi just to keep you in the loop, the problem still exists with
the patched module. However, i have the feeling that it does
show up less often than before ...

With 2.6.14, this issue never showed up within many month
of usage. I also tried 2.6.17 and it also seemes to be stable.
I suspect the mutexes as the root cause of the problem.
(BTW.: nvidia-bug-report.log doesn't give a clue what could be
the problem).

regards

Bernhard

JaXXoN 02-21-07 06:31 PM

Re: [PATCH] Mutexes instead of semaphores
 
Hi just to keep you again in the loop, the problem still exists with
"mutex-free" 2.6.17. So it seems that mutexes are basically not the
problem ! However, it seems that there is some relationship concerning
how often the problem occurs ...

I fear, i need to go back kernel by kernel to 2.6.14 in order to
figure out where the regression was introduced.

regards

Bernhard


All times are GMT -5. The time now is 05:00 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.