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
parent
commit
8620d9cbe5
No known key found for this signature in database GPG Key ID: 287378CADCAB13
  1. 2
      src/audio_core/adsp/apps/audio_renderer/audio_renderer.cpp
  2. 1
      src/audio_core/renderer/system_manager.cpp
  3. 1
      src/core/core_timing.cpp
  4. 2
      src/core/hle/service/glue/time/worker.cpp
  5. 1
      src/video_core/cdma_pusher.cpp
  6. 3
      src/video_core/fence_manager.h
  7. 1
      src/video_core/gpu_thread.cpp

2
src/audio_core/adsp/apps/audio_renderer/audio_renderer.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!");

1
src/audio_core/renderer/system_manager.cpp

@ -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};

1
src/core/core_timing.cpp

@ -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();
}

2
src/core/hle/service/glue/time/worker.cpp

@ -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,

1
src/video_core/cdma_pusher.cpp

@ -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{};

3
src/video_core/fence_manager.h

@ -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()) {

1
src/video_core/gpu_thread.cpp

@ -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();

Loading…
Cancel
Save