You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// FIXME: As per Apple Document (https://developer.apple.com/library/archive/documentation/DeviceDrivers/Conceptual/IOKitFundamentals/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP0000018-BAJFFJAD Listing 7-5):
// FIXME: As per Apple Document (https://developer.apple.com/library/archive/documentation/DeviceDrivers/Conceptual/IOKitFundamentals/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP0000018-BAJFFJAD Listing 7-5):
// Events originating from timers are handled by the driver’s Action routine.
// As with other event handlers, this routine should never block indefinitely.
// This specifically means that timer handlers, and any function they invoke,
// must not allocate memory or create objects, as allocation can block for unbounded periods of time.
// As for now, the reading procedure reads only one byte, which is fairly fast in our case, so we assume
// this routine will not cause infinite blocking. Let me know if you have some other good ideas.
The solution just need to do a replacement and to modify the function CPUTune::init():
replace all the "/tmp/"with "/tmp/CPUTune/" in the project;
in the init function:
mkdir /tmp/CPUTune
mount a disk made by RAM with just 1MB size; All the config files work in RAM.
In this way, the disk I/O requests could be transformed into RAM requests. Therefore the
infinite blocking risk avoided.
I have a solution to solve this potential issue, but as for my ability, I am unable to realize it:
CPUTune/CPUTuneCore/CPUTune/CPUTune.cpp
Line 158 in 3ba49ae
The solution just need to do a replacement and to modify the function CPUTune::init():
in the init function:
In this way, the disk I/O requests could be transformed into RAM requests. Therefore the
infinite blocking risk avoided.
@syscl @asepms92 @Mrc527 @christophe-duc @schdt899
The text was updated successfully, but these errors were encountered: