Cool VL Viewer forum http://sldev.free.fr/forum/ |
|
IO Completion Port based LLLFSThread for windows & Linux http://sldev.free.fr/forum/viewtopic.php?f=10&t=2222 |
Page 5 of 5 |
Author: | kathrine [ 2021-10-07 21:21:56 ] | |||||||||
Post subject: | Re: IO Completion Port based LLLFSThread for windows & Linux | |||||||||
Hi, as you were worried about the idle spinning of the thread, i added blocking on the completions, when the request queue is empty: The code adds some override for the LLThread::wake() method (which needs to be made virtual and added to the lllfsthread.h). Now a wake() first calls the base implementation and wakes up the LLCondition of the thread and then (if the io_uring is initialized) queues a NOP/dummy completion with key = 1 on the blocking io_uring call (io_uring_wait_cqe() instead of peek) to wake it up. The threadedUpdate() blocks on the completion port, if no more requests are queued and just peeks (as before) when new requests are incoming. I did not test the Linux part yet, but the Windows part seems to run nicely, as far as i could tell.
|
Author: | Henri Beauchamp [ 2021-10-07 22:19:05 ] |
Post subject: | Re: IO Completion Port based LLLFSThread for windows & Linux |
Well, for Linux you need to change the code (beside "(intptr_1)req == 1" in the if clause, and using &mRing directly instead of &(mThread->mRing) in wake()) so that a "++mPendingResults;" is inserted before the "io_uring_sqe_set_data(sqe, (void*)1);" line in wake(), else you hit the llassert_always(mPendingResults > 0) and crash. But even once the code fixed, and while it seems to be working while logged in, the viewer never shuts down completely on exit and I must kill it manually... So, I'll stick with the "spinning thread version" for now... |
Author: | ZaneZimer [ 2021-10-10 13:19:40 ] | ||||||||||||||||||||||||||||||||||||
Post subject: | Re: IO Completion Port based LLLFSThread for windows & Linux | ||||||||||||||||||||||||||||||||||||
While testing out the latest build (1.28.2.44), I noticed that the .dsf files do not get created with the proper file permissions in cache. I swear this was working before with the various builds and patches, but perhaps I was mistaken and/or did not have the feature properly enabled. The cache entry yields entries like:
Note the .dsf file has no permissions, which leads to these errors in the log:
This is the case with the official or self-built versions. I have not tried this without a ram disc configuration, however, but reverting UseIOURing to false, allows .dsf files to be created as:
My viewer info is:
|
Author: | Henri Beauchamp [ 2021-10-10 14:33:18 ] | |||||||||
Post subject: | Re: IO Completion Port based LLLFSThread for windows & Linux | |||||||||
|
Author: | Henri Beauchamp [ 2021-10-10 17:17:26 ] | |||||||||
Post subject: | Re: IO Completion Port based LLLFSThread for windows & Linux | |||||||||
In fact, the problem is not with io_uring but with the open() call for write operations: since O_CREAT is among the flags, it needs a supplementary parameter specifying the file permissions. Simply replace line 512 in linden/indra/llfilesystem/lllfsthread.cpp with:
|
Author: | ZaneZimer [ 2021-10-10 18:23:52 ] | ||||||||||||||||||
Post subject: | Re: IO Completion Port based LLLFSThread for windows & Linux | ||||||||||||||||||
|
Page 5 of 5 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |