oomd: fix doc comment for oomd_fetch_cgroup_oom_preference

Explicitly state that ManagedOOMPreference is always honored when the
unit's cgroup is owned by root.
This commit is contained in:
Nick Rosbrook
2022-11-29 16:01:58 -05:00
parent 3b44e33ff4
commit 3c0562778b
+4 -3
View File
@@ -109,9 +109,10 @@ static inline int compare_swap_usage(OomdCGroupContext * const *c1, OomdCGroupCo
* Returns the number of sorted items; negative on error. */
int oomd_sort_cgroup_contexts(Hashmap *h, oomd_compare_t compare_func, const char *prefix, OomdCGroupContext ***ret);
/* If the cgroups represented by `ctx` and `prefix` are owned by the same user,
* then set `ctx->preference` using the `user.oomd_avoid` and `user.oomd_omit`
* xattrs. Otherwise, set `ctx->preference` to MANAGED_OOM_PREFERENCE_NONE.
/* If the the cgroup is owned by root, or the cgroups represented by `ctx` and
* `prefix` are owned by the same user, then set `ctx->preference` using the
* `user.oomd_avoid` and `user.oomd_omit` xattrs. Otherwise, set
* `ctx->preference` to MANAGED_OOM_PREFERENCE_NONE.
*
* If `prefix` is NULL or the empty string, it is treated as root. If `prefix`
* does not specify an ancestor cgroup of `ctx`, -EINVAL is returned. Returns