Re: Background loading thread

"Mat Noguchi (BUNGIE)" <[email protected]> Fri, 8 Sep 2006 14:34:09 -0700
Newsgroups gmane.games.devel.windows
Message-ID <1B678752C03CB44AAA5D9C90991EFEEC0A5CFEA6@RED-MSG-42.redmond.corp.microsoft.com>
1. Why burn a thread to do synchronous I/O? You can do sync I/O on the
same thread and have more opportunity to interleave reads and other
similar logic.
2. True overlapped I/O (NO_BUFFERING, ReadFileScatter, and
IOCompletionPorts to avoid the event handle) is about as optimal as you
can get. And it's easy to interrupt and all that other fun stuff that
you'll want eventually.
3. If you are going to mix huge sequential reads and streaming, you can
use asynchronous I/O or eat the logic cost of reading smaller buffers
manually.

MSN
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
Ivan-Assen Ivanov
Sent: Friday, September 08, 2006 1:42 PM
To: [email protected]
Subject: [GD-Windows] Background loading thread

Hello,

I'm in the process of reengineering our data loading process with the
goal of moving as much as possible of the loading of art assets into a
separate thread.

Now, if all the ReadFile calls happen from a separate thread, devoted
100% to them, is there a good reason to inflict on myself considerable
pain and suffering by using the overlapped I/O API? We have a
perfectly good packfile/filesystem support which should be thread-safe
for the most part (famous last words material, eh?) except for a few
isolated places which can be mutexed out, and which will have to be
thrown away to use overlapped API.

I hope Windows has the common sense to switch away from a thread which
is performing a lengthy synchronuous IO operation? What about a
hypothetical other platform, that would happen be produced by the same
OS vendor around the same OS kernel, would be in even greater need of
offloading loading to another core, but wouldn't happen to be covered
by NDAs?

Does anyone have any related war stories to tell?

Best regards,
Assen

------------------------------------------------------------------------
-
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Gamedevlists-windows mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=555

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Gamedevlists-windows mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=555