return 0;
}
+static bool system_memory_pressure_level_is_supported(int resource_id,
+ const struct syscommon_resman_resource_attribute *attr)
+{
+ return !access(PSI_MEMORY_GLOBAL, W_OK);
+}
+
static void
system_handle_psi_listener(int resource_id,
const struct syscommon_resman_resource_attribute *attr,
.flag = SYSCOMMON_RESMAN_RESOURCE_ATTR_FLAG_PUBLIC,
.ops = {
.get = system_get_memory_pressure_level,
+ .is_supported = system_memory_pressure_level_is_supported,
},
.listener_ops = {
.init = system_init_psi_listener,