Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Recent problems with multithreading  (Read 4269 times)

0 Members and 1 Guest are viewing this topic.

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1546
  • Last login:Yesterday at 09:40:48 am
  • retro maniac
Recent problems with multithreading
« on: April 26, 2015, 01:51:29 pm »
Some time ago new bugs shows up regarding multithreading:

http://mametesters.org/view.php?id=5898

Is groovymame affected as well? Specific for raw input and/or direct input?

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: Recent problems with multithreading
« Reply #1 on: April 27, 2015, 02:34:52 am »

I tried hard to see from where some speed drop could come from. Unfortunately, my i5 motherboard died this week-end and I replaced it with a Core 2 DUO. Surprisingly, all stuttering were gone and the emulation speed is now 100% constant.

It is now clear that the behaviour is coming from a component/driver combination. It is also the reason why some people do not experience this issue.

To confirm this, I am using the same software and video HW on the new configuration. Of course, the south bridge, ram, audio and cpu have changed but I am convinced that the speed hiccups does not come from groovymame.

adder

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 640
  • Last login:February 04, 2021, 10:51:51 am
  • Location: Easy St.
Re: Recent problems with multithreading
« Reply #2 on: April 28, 2015, 06:25:04 am »
I wonder if the problems are related to cpu features between various cpu families (such as EIST/speedstepping, throttling, C/wait states and so on)

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: Recent problems with multithreading
« Reply #3 on: April 28, 2015, 08:09:32 am »
I wonder if the problems are related to cpu features between various cpu families (such as EIST/speedstepping, throttling, C/wait states and so on)

Hi Jadder,

I have tested most of the mechanisms (C states, speedstep, governor, Core disabling, Hyperthreading disabling, turbo mode, clocksource tsc/hpet, CPU exclusivity, Interrupt routings, ... and others). Unfortunately, this system is still showing the hiccups effect.

The only thing which I identified and which could play a role in the current issue is the sound system (hw?/sw?). With mt involved or not, the system shows a different speed response. Unfortunately, the motherboard is dead (magic smoke) and I can not investigate further.

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1546
  • Last login:Yesterday at 09:40:48 am
  • retro maniac
Re: Recent problems with multithreading
« Reply #4 on: April 29, 2015, 12:59:55 pm »
I ask this because groovymame handles inputs differently (Am I wrong?) so maybe it does not suffer from this. Personally I use U360 (direct input) and so far I didn't spot any strange behaviour.

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1546
  • Last login:Yesterday at 09:40:48 am
  • retro maniac
Re: Recent problems with multithreading
« Reply #5 on: May 03, 2015, 06:18:38 am »
I forgot to mention - right now I'm on XP x32. Maybe problems are on 64 bit systems or windows 7 only.

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: Recent problems with multithreading
« Reply #6 on: May 03, 2015, 02:08:06 pm »
I forgot to mention - right now I'm on XP x32. Maybe problems are on 64 bit systems or windows 7 only.

I am on Linux 32/64 bit systems. I cannot speak about Windows setups.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7463
  • Last login:July 19, 2025, 04:03:33 am
  • Quote me with care
Re: Recent problems with multithreading
« Reply #7 on: May 03, 2015, 02:43:34 pm »
Whenever you read about bugs in baseline regarding multithreading, keep in mind that the implementation in GroovyMAME for Windows is completely different. I have written about this in several threads. I'm not saying it is bug free, however, but it's definitely free from rendering issues due to lack of threads synchronization, and it's rather stable as long as you don't mess a lot with alt+tab, etc.

Linux/SDL builds, on the other hand, have the same multithreading implementation as baseline.

Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1546
  • Last login:Yesterday at 09:40:48 am
  • retro maniac
Re: Recent problems with multithreading
« Reply #8 on: May 03, 2015, 04:06:03 pm »
I remember Calamity, that's why I actually ask about this - Is this behaviour present also in groovymame. Even if implementation is different bug may also appear. Anyway, so far on XP x32 everything is fine, at least for me. Next step will be do some tests on XP x64 and maybe on 7x64 but using only U360 because only directinput interests me. When I get some keyboard encoder than I consider tests using raw input.

AMDman13

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 455
  • Last login:April 08, 2023, 09:21:58 pm
  • This Cab is going to be the end of me!!
Re: Recent problems with multithreading
« Reply #9 on: June 23, 2015, 10:23:53 pm »
Quote
I have tested most of the mechanisms (C states, speedstep, governor, Core disabling, Hyperthreading disabling, turbo mode, clocksource tsc/hpet, CPU exclusivity, Interrupt routings, ... and others). Unfortunately, this system is still showing the hiccups effect.

I have tried all of these and more with my Phenom II 965BE. I still get hiccups. Speed will bounce around 102,101,100,99,98 fps messing up the sound etc.

In addition to what you have tried:
Disabling all unneeded software. I have disabled everything non crucial in bios. ie. Unneeded usb, ethernet etc. Disabled Cool and Quite, monitored core voltage and temps. Disabled TLB bug which does not effect Phenom II's, but I thought XP 64 may have enabled it by default. I have tried to use software to label Mame as a game, thus running it with a higher CPU priority. I have used software to designate specific cores for mame to run with. All to no avail. Hiccups remain.


My old user name was marlborroman13, but I kicked the habit many years ago!

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1546
  • Last login:Yesterday at 09:40:48 am
  • retro maniac
Re: Recent problems with multithreading
« Reply #10 on: June 24, 2015, 03:46:17 am »
That reminds me problems with laserdisc games. For unknown reason Cube Quest, Fire Fox and some other games had similiar hiccups ie. jumping speed from 98% do 102% and vice versa. Problem was solved by using frame_delay 2 or 3. Maybe you could try this option.

AMDman13

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 455
  • Last login:April 08, 2023, 09:21:58 pm
  • This Cab is going to be the end of me!!
Re: Recent problems with multithreading
« Reply #11 on: July 01, 2015, 10:47:56 pm »
Well after much testing I can safely say this is not a GM problem, but either a driver/OS or failing hardware. At, least in my case specifically. After cleaning up all of the unneeded services in XP 64 Professional Edition and disabling all features in bios things are much improved, but not perfect and it's really bizarre.

I will try and explain. I will fire up the cab with only essential windows services running. Task Manager will show CPU idle at 0% and then Mame will run at 100% for a period of time. It could be hours it could be for 5 mins. Then the problems will arise, Mame no longer running at a solid 100%, but instead fluctuating between 98, 99, 100, 101 etc. Opening Task Manager or Process Explorer will reveal that CPU idle is no longer at 0%, but is fluctuating the same fashion as Mame. The crazy thing is no other services have started. Whats happening is the services that have been running all along are now requiring more CPU than before. Even though nothing else has changed. 
 :dunno
My old user name was marlborroman13, but I kicked the habit many years ago!

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1546
  • Last login:Yesterday at 09:40:48 am
  • retro maniac
Re: Recent problems with multithreading
« Reply #12 on: July 02, 2015, 01:46:49 am »
AMDman13, did you try other sys (7, XP x32)? You might similiar problem to mine - http://forum.arcadecontrols.com/index.php/topic,143085.msg1483777.html#msg1483777

AMDman13

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 455
  • Last login:April 08, 2023, 09:21:58 pm
  • This Cab is going to be the end of me!!
Re: Recent problems with multithreading
« Reply #13 on: July 10, 2015, 08:19:51 am »
I'm happy to report that installing Win 7 Pro 64bit has cured my issues. I've had it up and running now for about a week with some pretty heavy use. This thing seems to be solid no matter what I through at it. I'm super happy with Win 7 and GM. It seems that my XP64 issue was simply HW related. I am assuming a bad driver somewhere although, I was unsuccessful in tracking down the culprit.

No matter. Win7 for me!
My old user name was marlborroman13, but I kicked the habit many years ago!

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1546
  • Last login:Yesterday at 09:40:48 am
  • retro maniac
Re: Recent problems with multithreading
« Reply #14 on: July 10, 2015, 11:24:14 am »
I could switch to 7 x64 too but I had problems with interlaced resolutions that's included Taito Type X games so I'm staying with XP x32.

AMDman13

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 455
  • Last login:April 08, 2023, 09:21:58 pm
  • This Cab is going to be the end of me!!
Re: Recent problems with multithreading
« Reply #15 on: July 13, 2015, 11:22:14 pm »
Well it appears I may not be completely out of the woods after all. I had an "episode" the other night. It was after transfering a lot of files around. I loaded GM  and the timing was all off again. A quick reboot seems to have fixed it.

I will say that unlike XP64 task manager on Win 7 showed 0% at idle. Upon GM exit.
My old user name was marlborroman13, but I kicked the habit many years ago!

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1546
  • Last login:Yesterday at 09:40:48 am
  • retro maniac
Re: Recent problems with multithreading
« Reply #16 on: July 19, 2015, 04:57:22 am »
About week ago I decided to enable frame_delay 2 combined with mt. So far results are better than frame_delay 2 without mt so at least for now I don't see any issues.