Browse Source
[core] give exclusive affinity control to CPU threads
Signed-off-by: lizzie <lizzie@eden-emu.dev>
pull/2571/head
lizzie
6 months ago
No known key found for this signature in database
GPG Key ID: 287378CADCAB13
7 changed files with
0 additions and
11 deletions
-
src/audio_core/adsp/apps/audio_renderer/audio_renderer.cpp
-
src/audio_core/renderer/system_manager.cpp
-
src/core/core_timing.cpp
-
src/core/hle/service/glue/time/worker.cpp
-
src/video_core/cdma_pusher.cpp
-
src/video_core/fence_manager.h
-
src/video_core/gpu_thread.cpp
|
|
|
@ -132,11 +132,9 @@ void AudioRenderer::CreateSinkStreams() { |
|
|
|
void AudioRenderer::Main(std::stop_token stop_token) { |
|
|
|
static constexpr char name[]{"DSP_AudioRenderer_Main"}; |
|
|
|
Common::SetCurrentThreadName(name); |
|
|
|
Common::SetCurrentThreadPriority(Common::ThreadPriority::High); |
|
|
|
|
|
|
|
// TODO: Create buffer map/unmap thread + mailbox
|
|
|
|
// TODO: Create gMix devices, initialize them here
|
|
|
|
|
|
|
|
if (mailbox.Receive(Direction::DSP) != Message::InitializeOK) { |
|
|
|
LOG_ERROR(Service_Audio, |
|
|
|
"ADSP Audio Renderer -- Failed to receive initialize message from host!"); |
|
|
|
|
|
|
|
@ -80,7 +80,6 @@ bool SystemManager::Remove(System& system_) { |
|
|
|
void SystemManager::ThreadFunc(std::stop_token stop_token) { |
|
|
|
static constexpr char name[]{"AudioRenderSystemManager"}; |
|
|
|
Common::SetCurrentThreadName(name); |
|
|
|
Common::SetCurrentThreadPriority(Common::ThreadPriority::High); |
|
|
|
while (active && !stop_token.stop_requested()) { |
|
|
|
{ |
|
|
|
std::scoped_lock l{mutex1}; |
|
|
|
|
|
|
|
@ -56,7 +56,6 @@ CoreTiming::~CoreTiming() { |
|
|
|
void CoreTiming::ThreadEntry(CoreTiming& instance) { |
|
|
|
static constexpr char name[] = "HostTiming"; |
|
|
|
Common::SetCurrentThreadName(name); |
|
|
|
Common::SetCurrentThreadPriority(Common::ThreadPriority::High); |
|
|
|
instance.on_thread_init(); |
|
|
|
instance.ThreadLoop(); |
|
|
|
} |
|
|
|
|
|
|
|
@ -124,8 +124,6 @@ void TimeWorker::StartThread() { |
|
|
|
|
|
|
|
void TimeWorker::ThreadFunc(std::stop_token stop_token) { |
|
|
|
Common::SetCurrentThreadName("TimeWorker"); |
|
|
|
Common::SetCurrentThreadPriority(Common::ThreadPriority::Low); |
|
|
|
|
|
|
|
while (!stop_token.stop_requested()) { |
|
|
|
enum class EventType : s32 { |
|
|
|
Exit = 0, |
|
|
|
|
|
|
|
@ -29,7 +29,6 @@ CDmaPusher::CDmaPusher(Host1x::Host1x& host1x_, s32 id) |
|
|
|
CDmaPusher::~CDmaPusher() = default; |
|
|
|
|
|
|
|
void CDmaPusher::ProcessEntries(std::stop_token stop_token) { |
|
|
|
Common::SetCurrentThreadPriority(Common::ThreadPriority::High); |
|
|
|
ChCommandHeaderList command_list{host1x.System().ApplicationMemory(), 0, 0}; |
|
|
|
u32 count{}; |
|
|
|
u32 method_offset{}; |
|
|
|
|
|
|
|
@ -228,10 +228,7 @@ private: |
|
|
|
|
|
|
|
void ReleaseThreadFunc(std::stop_token stop_token) { |
|
|
|
std::string name = "GPUFencingThread"; |
|
|
|
|
|
|
|
Common::SetCurrentThreadName(name.c_str()); |
|
|
|
Common::SetCurrentThreadPriority(Common::ThreadPriority::High); |
|
|
|
|
|
|
|
TFence current_fence; |
|
|
|
std::deque<std::function<void()>> current_operations; |
|
|
|
while (!stop_token.stop_requested()) { |
|
|
|
|
|
|
|
@ -26,7 +26,6 @@ static void RunThread(std::stop_token stop_token, Core::System& system, |
|
|
|
std::string name = "GPU"; |
|
|
|
|
|
|
|
Common::SetCurrentThreadName(name.c_str()); |
|
|
|
Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical); |
|
|
|
system.RegisterHostThread(); |
|
|
|
|
|
|
|
auto current_context = context.Acquire(); |
|
|
|
|