oomd
oomd copied to clipboard
Inefficient TryToKillSomething(): ranking gets made twice for a single run
Right now TryToKillSomething() seems to be very inefficient, because for a single evaluation ranking functions get called twice and including calculation of current overall memory usage (3 times). There should probably be an opaque structure containing the related information (e.g. wrt. src/oomd/plugins/KillMemoryGrowth-inl.h: KMGPhase, sum_current_mem_cgroups, sum_effective_mem_cgroups), which one may pass to ologKillTarget(), and thus eliminates the need to do all the ranking/wasting resources again just for logging ...