[LTP] [PATCH v2 3/5] API/cgroup: Add memory.min
Richard Palethorpe
rpalethorpe@suse.de
Mon Feb 7 12:36:21 CET 2022
Hello,
Cyril Hrubis <chrubis@suse.cz> writes:
> Hi!
>> static const struct cgroup_file memory_ctrl_files[] = {
>> { "memory.current", "memory.usage_in_bytes", CTRL_MEMORY },
>> + { "memory.min", NULL, CTRL_MEMORY },
>
> This is obviously OK.
>
>> { "memory.max", "memory.limit_in_bytes", CTRL_MEMORY },
>> { "memory.stat", "memory.stat", CTRL_MEMORY },
>> { "memory.swappiness", "memory.swappiness", CTRL_MEMORY },
>> @@ -896,7 +897,7 @@ tst_cgroup_group_mk(const struct tst_cgroup_group *const parent,
>>
>> for_each_dir(parent, 0, dir) {
>> new_dir = SAFE_MALLOC(sizeof(*new_dir));
>> - cgroup_dir_mk(*dir, group_name, new_dir);
>> + cgroup_dir_mk(*dir, cg->group_name, new_dir);
>
> However this change should go in in a separate ptach.
>
> I guess that what we do is that we store a pointer passed to us by the
> user of the API into our structures instead of the copy we made, which
> is mostly working fine, since we pass pointers to statically allocated
> strings, but it should be fixed. But please do so in a separate patch.
>
> If you split this change into two separate patches you can consider both
> of them to have my Reviewed-by:
Ah, this should have been in the patch to make it printf like.
>
>> cgroup_group_add_dir(parent, cg, new_dir);
>> }
>>
>> --
>> 2.34.1
>>
>>
>> --
>> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Thank you,
Richard.
More information about the ltp
mailing list