From: Richard Palethorpe <rpalethorpe@suse.de>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 3/5] API/cgroup: Add memory.min
Date: Mon, 07 Feb 2022 11:36:21 +0000 [thread overview]
Message-ID: <87pmnyx60c.fsf@suse.de> (raw)
In-Reply-To: <YfvU6fqZK2d1PKVg@yuki>
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.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-02-07 11:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-03 8:18 [LTP] [PATCH v2 0/5] Add memcontrol03 and declarative CG API Richard Palethorpe via ltp
2022-02-03 8:18 ` [LTP] [PATCH v2 1/5] memcontrol: Lift out some common definitions into a shared header Richard Palethorpe via ltp
2022-02-03 13:04 ` Cyril Hrubis
2022-02-04 7:42 ` Li Wang
2022-02-03 8:18 ` [LTP] [PATCH v2 2/5] API/cgroup: Declare required controllers and version in test struct Richard Palethorpe via ltp
2022-02-03 13:03 ` Cyril Hrubis
2022-02-04 7:37 ` Li Wang
2022-02-07 13:18 ` Richard Palethorpe
2022-02-03 8:18 ` [LTP] [PATCH v2 3/5] API/cgroup: Add memory.min Richard Palethorpe via ltp
2022-02-03 13:13 ` Cyril Hrubis
2022-02-07 11:36 ` Richard Palethorpe [this message]
2022-02-03 8:18 ` [LTP] [PATCH v2 4/5] API/cgroup: Allow formatting of new cg names Richard Palethorpe via ltp
2022-02-03 8:18 ` [LTP] [PATCH v2 4/5] API/cgroup: Make tst_cgroup_group_mk sprintf like Richard Palethorpe via ltp
2022-02-03 13:20 ` Cyril Hrubis
2022-02-04 6:41 ` Li Wang
2022-02-04 10:01 ` Cyril Hrubis
2022-02-07 8:44 ` Richard Palethorpe
2022-02-03 8:18 ` [LTP] [PATCH v2 5/5] memcontrol03: Copy from kselftest Richard Palethorpe via ltp
2022-02-03 13:52 ` Cyril Hrubis
2022-02-07 9:46 ` Richard Palethorpe
2022-02-08 8:03 ` Li Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pmnyx60c.fsf@suse.de \
--to=rpalethorpe@suse.de \
--cc=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox