Re: [PATCH v3 10/10] sched/psi: per-cgroup PSI accounting disable/re-enable interface

From: Chengming Zhou
Date: Thu Aug 25 2022 - 09:30:39 EST


On 2022/8/25 21:20, Johannes Weiner wrote:
> On Thu, Aug 25, 2022 at 08:28:39PM +0800, Chengming Zhou wrote:
>> On 2022/8/24 17:59, Johannes Weiner wrote:
>>> Hi Chengming,
>>>
>>> Thanks for incorporating all the feedback. I have a few nitpicks
>>> below, but with those considered, please add:
>>>
>>> Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>
>>>
>>> On Wed, Aug 24, 2022 at 04:18:29PM +0800, Chengming Zhou wrote:
>>>> @@ -5171,12 +5220,19 @@ static struct cftype cgroup_base_files[] = {
>>>> {
>>>> .name = "irq.pressure",
>>>> .flags = CFTYPE_PRESSURE,
>>>> + .file_offset = offsetof(struct cgroup, psi_files[PSI_IRQ]),
>>>> .seq_show = cgroup_irq_pressure_show,
>>>> .write = cgroup_irq_pressure_write,
>>>> .poll = cgroup_pressure_poll,
>>>> .release = cgroup_pressure_release,
>>>> },
>>>> #endif
>>>> + {
>>>> + .name = "cgroup.pressure",
>>>> + .flags = CFTYPE_PRESSURE,
>>>> + .seq_show = cgroup_psi_show,
>>>> + .write = cgroup_psi_write,
>>>
>>> To match the naming convention, these should be called
>>> cgroup_pressure_show() and cgroup_pressure_write().
>>
>> I just find cgroup_pressure_write() already exists, so I change the names
>> to cgroup_pressure_enable_show() and cgroup_pressure_enable_write(),
>> since this file name is simplified from "cgroup.pressure.enable".
>
> That makes two outliers instead of one. It's probably better to steal
> cgroup_pressure_write for cgroup.pressure, and rename the currently
> misnamed helper. How about do_pressure_write()? pressure_write()?

Ok, I will change that helper to pressure_write().

Thanks.