..:: PCSX2 Forums ::..
Register | Help | Log In |
Register PCSX2 Site Forums Member List Donate View Today's Posts Search

Current time: 05-22-2013, 09:49 AM Hello There, Guest! (Login — Register)

..:: PCSX2 Forums ::.. / PCSX2 Discussion and Support / Developer Discussion v
1 2 3 4 Next »
/ [blog] Threading VU1



User(s) browsing this thread: 1 Guest(s)

Pages (14): « Previous 1 ... 3 4 5 6 7 ... 14 Next »
Post Reply 
 
Thread Rating:
  • 4 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
[blog] Threading VU1
Author Message
cottonvibes Offline
Pencil Sharpener
******

Posts: 746
Joined: Nov 2008
Location:
Reputation: 19
Post: #41
RE: [blog] Threading VU1
currently save states that are created with MTVU Off and then loaded with MTVU On can be incompatible (or vice-versa).
its also not 100% safe to be switching mtvu On/Off while in game.
i don't have a good solution for solving these problems.
the gif unit works differently for mtvu on/off by design, so whether or not there are problems between the switching depends on the state the gif was in at the time of the saved state (or the switching of mtvu on/off through speedhack dialog)

Check out my blog: Trashcan of Code
08-17-2011 08:19 AM
Visit this user's website Find all posts by this user Quote this message in a reply
yes9111 Offline
Newbie

Posts: 7
Joined: Dec 2010
Location:
Reputation: 0
Post: #42
RE: [blog] Threading VU1
Great write-up! Didn't finish reading about all the problems but I've learned a lot already. Thanks conttonvibes!
08-17-2011 08:47 AM
Find all posts by this user Quote this message in a reply
MyDreamName Offline
Raw Danger!!!11one!!
***

Posts: 596
Joined: Mar 2011
Location: Earth
Reputation: 15
Post: #43
RE: [blog] Threading VU1
Well, actually, when this corruption happened, the save state was created and loaded with the speedhack on. Even loading it with the speedhack off didn't cause any different result. It must be a rare occurrence, because as I said before, I couldn't replicate it with the same save state on a different session.

Although, a save state is a RAM dump, right? I might be wrong, but how could something in the RAM cause such severe graphical issues and such while keeping the game *playable*?

The video is here, in case you're curious, and all sounds play correctly (I just don't bother to record them):

http://www.youtube.com/watch?v=GRVIq4Tm-gQ

Want to contribute? Don't know how? Check out the PCSX2 Wiki page!



Keep safe with MyWOT.

I have everything...
08-17-2011 10:41 AM
Visit this user's website Find all posts by this user Quote this message in a reply
arcum42 Offline
PCSX2 coder
******

Posts: 510
Joined: Dec 2008
Location: Las Vegas, NV
Reputation: 5
Post: #44
RE: [blog] Threading VU1
(08-16-2011 11:00 PM)cottonvibes Wrote:  If you use devel builds there should be error messages in the console on games with the behavior that MTVU can't support.
also nice to hear that its working --- if it didn't (due to the signal handling not allocating memory correctly) it would basically crash all games.

It'd just been a few days since I tested it, and I didn't have a chance to reproduce the error when posting. When starting Baroque with MTVU on, I got:
Code:
GIF Handler Debug - SIGNAL
watchdog started
Two read circuit enabled
/usr/local/src/pcsx2/pcsx2/Gif_Unit.h(324) : assertion failed:
    Function:  void Gif_Path::ExecuteGSPacketMTVU()
    Thread:    MTVU
    Condition: !Gif_HandlerAD_Debug(&buffer[curOffset])
08-17-2011 12:01 PM
Find all posts by this user Quote this message in a reply
cottonvibes Offline
Pencil Sharpener
******

Posts: 746
Joined: Nov 2008
Location:
Reputation: 19
Post: #45
RE: [blog] Threading VU1
(08-17-2011 10:41 AM)MyDreamName Wrote:  Although, a save state is a RAM dump, right? I might be wrong, but how could something in the RAM cause such severe graphical issues and such while keeping the game *playable*?

a saved state isn't just a RAM dump of ps2's main memory, it saves various pcsx2-statuses and buffers at the time the state was created.
with threads its more difficult to do saved states because of syncing issues and race conditions.

(08-17-2011 12:01 PM)arcum42 Wrote:  It'd just been a few days since I tested it, and I didn't have a chance to reproduce the error when posting. When starting Baroque with MTVU on, I got: [...]

yeh that's the error that you should be getting on unsupported games; so its indeed an expected problem and not a linux-only thing Biggrin

Check out my blog: Trashcan of Code
(This post was last modified: 08-17-2011 09:12 PM by cottonvibes.)
08-17-2011 09:11 PM
Visit this user's website Find all posts by this user Quote this message in a reply
MyDreamName Offline
Raw Danger!!!11one!!
***

Posts: 596
Joined: Mar 2011
Location: Earth
Reputation: 15
Post: #46
RE: [blog] Threading VU1
Hey, I noticed that without the speedhack on, I was using ~30% of my CPU (at EE% maxed out) (4 cores, 4 threads), but with it on I was using 50% (at VU% maxed out) - is one thread maxing out while the others are getting relatively low activity?

Want to contribute? Don't know how? Check out the PCSX2 Wiki page!



Keep safe with MyWOT.

I have everything...
08-19-2011 04:30 PM
Visit this user's website Find all posts by this user Quote this message in a reply
xstyla Offline
hobby coder
***

Posts: 682
Joined: Aug 2011
Location: just a box
Reputation: 3
Post: #47
RE: [blog] Threading VU1
it's more or less impossible to max out one thread alone. EE should still count DMA partially. and the GS running data.

for the meters. without the hack the EE meter is EE+VU which is why it maxes. with the hack the EE runs for itself and the VU makes its own thread meter.

as for the 50%. this cause of the MTVU runs VU in parallel to the EE and syncronizing more or less only starts or ends of VU programs with other components. therefor it speeds up the complete VM and CPU usage. you'll reach 100% only if the EE sync and GS data thruput allows it.
(This post was last modified: 08-19-2011 05:16 PM by xstyla.)
08-19-2011 04:51 PM
Find all posts by this user Quote this message in a reply
xstyla Offline
hobby coder
***

Posts: 682
Joined: Aug 2011
Location: just a box
Reputation: 3
Post: #48
RE: [blog] Threading VU1
this flow charts kinda show exactly what it does. can't attach it. I'm still banned and on a proxy. -_-

http://www.philvaz.com/games/figure_08b.jpg

http://www.philvaz.com/games/figure_09b.jpg

they are about programming for ps2 but this kinda same how mtvu works now.

what's causing the missing 50% of the CPU usage is the stalls when threads waiting for each other to deliver new data.
(This post was last modified: 08-19-2011 05:31 PM by xstyla.)
08-19-2011 05:25 PM
Find all posts by this user Quote this message in a reply
dubigrasu Offline
Newbie

Posts: 17
Joined: Apr 2011
Location:
Reputation: 0
Post: #49
RE: [blog] Threading VU1
Quote:Has anyone tested MTVU on linux btw? just want to confirm it actually works.
I can only say for sure that Pcsx2 is able to run in Linux with MTVU option enabled.
If is actually doing something, that I'm not so sure.

First of all, in Windows MTVU is doing a great job, I can see a huge increase in FPS in GOW for example and some other games, so no problems there.

In Linux however (with both gsdx and zzogl), using same settings, same games and same hardware I see...well, nothing.
I spent a lot of time searching for that elusive FPS increase but without luck, it won't budge a single frame faster.
Pretty depressed now because I could use little speed, since the Linux build is already few times slower than Windows one.

Maybe I understood it all wrong and is supposed to work (doing something) only in Windows?

(AMD Phenom II X4 965 - GeForce GTX 470 - 4GB RAM)
(This post was last modified: 08-21-2011 07:46 PM by dubigrasu.)
08-21-2011 07:25 PM
Find all posts by this user Quote this message in a reply
Bositman Offline
Angel of Death
********

Posts: 12.399
Joined: Aug 2005
Location: Athens,Greece
Reputation: 175
Post: #50
RE: [blog] Threading VU1
You are probably limited by the slow GS plugins available to Linux, thus taking the load off the VU does not help speed since the bottleneck is set by the GS

[Image: newsig.jpg]
08-21-2011 09:15 PM
Visit this user's website Find all posts by this user Quote this message in a reply
« Next Oldest | Next Newest »
Pages (14): « Previous 1 ... 3 4 5 6 7 ... 14 Next »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread



Current time: 05-22-2013, 09:49 AM

Contact Us | PCSX2 | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication

Powered By MyBB, © 2002-2013 MyBB Group.
Theme created by IncadudeF and modified by bositman