Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp652385rwe; Thu, 25 Aug 2022 07:03:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR7RfOMpI6o82jO7wAss3hKZqV/wLCflLr36GNjP0kobSV9Q1wi+n713gpvIVCJuSvrHqzXN X-Received: by 2002:a17:907:3e18:b0:73d:8180:a3c6 with SMTP id hp24-20020a1709073e1800b0073d8180a3c6mr2635767ejc.447.1661436214842; Thu, 25 Aug 2022 07:03:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661436214; cv=none; d=google.com; s=arc-20160816; b=a3QHzz0gZc9gEeuvgIrrJZugzd54gFQgry4i4quh54DqBrl86KuBqNywK7NppBUDUy VwAgJuBkj+s+O1xbUkeZjjAL+dtZrlBD9AvT2xH4NWZzhq8D5LKuFQIjjlqaiyGtroNv pAbjgrOmEXBkn7CshJeHzX0GlCAZApMQsOkbd5ZEn8grTyRQs3foYQ4iLq1K89kbthnW WxWNSXyKnKGh1Ho+sIXYZMgmLVY4XJLXQeFE7XaToQ7WUpMPWkiq+Ux4/HOjbpjMrHiq vHbWcR2icF9OybelfGQBOCgGC7sJPvhicS0xaUAnjhJ0pRBsaaJaspcxO4bN0spmHYhc 39Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=dTFw9x7UWEYWmcpi8QQ3ADKhSd2hLCnt4Nb7ZML9r2c=; b=QoB+WBMEIUOfn1BGAMA4fRs1cuK2GP9AtVxa+E1kPx31J9Mm5ks78OSazX46SI9qgm w5vIF/QGIBnqSQmepj0naubgx1eGzJSxN5t9A1dQdj1NZmhIZOcJ6ETCUsYNhHoSDUrk ZfznizkGEBmhZUnfMzIzSutt0s9TO/FJgh8Fkf1kMBrKeqEQr0gH2ra09/G5tWNM0qeF nuUEB00HQVhCLNSnP916ahMcVPy96A9lrYQPHK2+HdBIqiQrowAEhSUaIiBP4JalgWrq C8EEbsSgpSsd+I98UCbe5P/ysqHlHGjWMWELKbCtT8mHZ+VGDo+3Jy1WvhGVkQnRZDRu 3ySA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=pOJV7py+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f18-20020a056402355200b00440d768eb42si7211615edd.89.2022.08.25.07.02.45; Thu, 25 Aug 2022 07:03:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=pOJV7py+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242624AbiHYNaR (ORCPT + 99 others); Thu, 25 Aug 2022 09:30:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242676AbiHYNaC (ORCPT ); Thu, 25 Aug 2022 09:30:02 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87FD96BCC8 for ; Thu, 25 Aug 2022 06:29:57 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id y127so16806577pfy.5 for ; Thu, 25 Aug 2022 06:29:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=dTFw9x7UWEYWmcpi8QQ3ADKhSd2hLCnt4Nb7ZML9r2c=; b=pOJV7py+1gmdPby1+qgIJXeyyz4vq0Y6SLPWPk9C8wUZ3jbdpsjj+uYWZc4U5ah1p+ yuDLAenPGiZt6i2y5O9Yjy3d+66C3b0XSxLsquozHv/qZWsspon/9kgcx0Slj2iTSp1k tf1pbn+dGkU5JKNE6CsKL0XkZsCaDBaP57N3oUk7avUm45JecCZgR0w917DxONm4foP9 xOgSNwfIZVy54TaQXWB3pMJ3kszwkTpW+JZncbc3bnLEpumsNiR5JaB77HhsTQGz+MOu ozcglXwiMk+OTMLGHZ8euypblNhMuH8XJxn2qewzILgRw3UqQ1IkQCC86Z7Hg5aEY57Y POfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=dTFw9x7UWEYWmcpi8QQ3ADKhSd2hLCnt4Nb7ZML9r2c=; b=gC47AMkRp3rN7KSBJq3OUrEKvzSoGD/BiQqr0HDBwBdX88ZuCch1/B0eTVS0+X5p1R CXxbGSIpK7bP+GgTDeoLI14RKc3gs7LaM/ID9SpeZypcxwSpGHuXWIxiLm271AkW3Tnp 77P6b1Qt5O2AWTXkXYhUNTIkHI7WWcqUfOEzIzj+0eBpsBIpWOHG1aUdx/ypzmW1Zza+ o6J4A3dAje1rMEEmvqSP/ZBhOq+PqwgJZ5izahhpKSf/4c7epvEFekUwJBfYXW3MvIYs WbcY4zjMIMaYkoETz6F0ARvHhCbneAHw39EZyM04fomidM27uS64yOitmX86Cqk2W0FY 0XgA== X-Gm-Message-State: ACgBeo3YVUgfdAalbIngi1p9+WUx6d5s4zAH+kUV1SUPaLb+pKClIsYJ EcBSpZtbxFD+vm2OcgkGlOyzVQ== X-Received: by 2002:a65:6bca:0:b0:420:712f:ab98 with SMTP id e10-20020a656bca000000b00420712fab98mr3331215pgw.350.1661434196720; Thu, 25 Aug 2022 06:29:56 -0700 (PDT) Received: from [10.254.35.15] ([139.177.225.252]) by smtp.gmail.com with ESMTPSA id d17-20020a170902f15100b00172ef499c83sm7990449plb.32.2022.08.25.06.29.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 06:29:56 -0700 (PDT) Message-ID: <5165abfc-9f42-93ea-a888-11eaa4ab3420@bytedance.com> Date: Thu, 25 Aug 2022 21:29:48 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [PATCH v3 10/10] sched/psi: per-cgroup PSI accounting disable/re-enable interface Content-Language: en-US To: Johannes Weiner Cc: tj@kernel.org, mkoutny@suse.com, surenb@google.com, gregkh@linuxfoundation.org, corbet@lwn.net, mingo@redhat.com, peterz@infradead.org, songmuchun@bytedance.com, cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220824081829.33748-1-zhouchengming@bytedance.com> <20220824081829.33748-11-zhouchengming@bytedance.com> <324b1d0f-42e5-8947-68cb-a3d20135f2c6@bytedance.com> From: Chengming Zhou In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >>> >>> 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.