From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF040C49EA2 for ; Thu, 17 Jun 2021 02:57:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B81676102A for ; Thu, 17 Jun 2021 02:57:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230211AbhFQC7e (ORCPT ); Wed, 16 Jun 2021 22:59:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:39999 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbhFQC7c (ORCPT ); Wed, 16 Jun 2021 22:59:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623898644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DAFQKb5VrgrYV0k/wY/7SUmNCOTFhI8VI1aGDC5iIO8=; b=Jcaba2sjm3xtgD+41q9NtOflWiE+Pu157aXqzq8ftYx4PdDhyRuiN0EOv/D7UK9OJDMwRj ue6ccSw1tpICuLuaWPPTzO58+xG167gSdc2f4UqDtm3O7A9eKzgnBKMeD2+wZTbT2K0Lik B+t5rtVS469LzOp27G/e3vyJb9e+AmQ= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-517-r6lDFtJaMbiqyaHaEsl38Q-1; Wed, 16 Jun 2021 22:57:23 -0400 X-MC-Unique: r6lDFtJaMbiqyaHaEsl38Q-1 Received: by mail-wr1-f70.google.com with SMTP id d5-20020a0560001865b0290119bba6e1c7so2260799wri.20 for ; Wed, 16 Jun 2021 19:57:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=DAFQKb5VrgrYV0k/wY/7SUmNCOTFhI8VI1aGDC5iIO8=; b=gKSt0mzH2GfRQ7PvDheb4I3yXPbVcBC8SW84bvYa4kOmo/Mie1fIKH+hde3gE915MV qwnoEgrFY5f8/G+4u/iEQpWTMAM9/S8nUuP6vxbWtaezasaXoyPfrgZ9miPnZ/pQ9id7 iRXnSJuDMGjeuX8pm5o5rzcMjIDpRgwA3fFN21oGT0lFie9Y1MnFW6C70KRCP0ABlavT Bg9Tfd/CXq2DqS2MZcgaTVwIEKuK2kwFNOhoAajTOpkuFceyuNOA2O2HtRkMwFZBIeUz Zx9VDiuZu+HK9E3T/9Lxj8vt2aZGiyw17bITrxoOE+zDu//6ch/fF0OK+AYcwKRt23TY 4G6w== X-Gm-Message-State: AOAM532Xxa3KRq1BAlzuV4IdLUEH0i5qE4f3JXRB7ciwC3T5mZE2Pcn8 5KRxMUYqBZQ0oTYjolG0Wplou6uxsxly0oDlA2GeYjrmJt3G2wTSi0obQ4UyMP0UpuLkTk6lNi2 /sk+fxh+A40A5eYXf5TWVqPNB X-Received: by 2002:adf:fa08:: with SMTP id m8mr2588911wrr.319.1623898642537; Wed, 16 Jun 2021 19:57:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCrsdMs441mSf9ppOn+tdXQjRSYRgSoQKu8IvgKpu90SjG1vEtnx9wN6BEODI05JDaMf9R/Q== X-Received: by 2002:adf:fa08:: with SMTP id m8mr2588889wrr.319.1623898642332; Wed, 16 Jun 2021 19:57:22 -0700 (PDT) Received: from llong.remote.csb ([2601:191:8500:76c0::cdbc]) by smtp.gmail.com with ESMTPSA id x7sm3933291wrn.3.2021.06.16.19.57.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Jun 2021 19:57:21 -0700 (PDT) From: Waiman Long X-Google-Original-From: Waiman Long Subject: Re: [PATCH 2/5] cgroup/cpuset: Add new cpus.partition type with no load balancing To: Tejun Heo Cc: Zefan Li , Johannes Weiner , Jonathan Corbet , Shuah Khan , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Andrew Morton , Roman Gushchin , Phil Auld , Peter Zijlstra , Juri Lelli References: <20210603212416.25934-1-longman@redhat.com> <20210603212416.25934-3-longman@redhat.com> Message-ID: <557d7fdb-5dae-11e1-4f82-ae9f4334c06a@redhat.com> Date: Wed, 16 Jun 2021 22:57:18 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/16/21 4:47 PM, Tejun Heo wrote: > Hello, > > Generally looks fine to me. > > On Thu, Jun 03, 2021 at 05:24:13PM -0400, Waiman Long wrote: >> @@ -1984,12 +1987,31 @@ static int update_prstate(struct cpuset *cs, int val) >> goto out; >> >> err = update_parent_subparts_cpumask(cs, partcmd_enable, >> - NULL, &tmp); >> + NULL, &tmpmask); >> + >> if (err) { >> update_flag(CS_CPU_EXCLUSIVE, cs, 0); >> goto out; >> + } else if (new_prs == PRS_ENABLED_NOLB) { >> + /* >> + * Disable the load balance flag should not return an > ^ing > > and "else if" after "if (err) goto out" block is weird. The two conditions > don't need to be tied together. Yes, the else part is redundant in this case. Will remove it. > >> @@ -2518,6 +2547,9 @@ static int sched_partition_show(struct seq_file *seq, void *v) >> case PRS_ENABLED: >> seq_puts(seq, "root\n"); >> break; >> + case PRS_ENABLED_NOLB: >> + seq_puts(seq, "root-nolb\n"); >> + break; >> case PRS_DISABLED: >> seq_puts(seq, "member\n"); >> break; >> @@ -2544,6 +2576,8 @@ static ssize_t sched_partition_write(struct kernfs_open_file *of, char *buf, >> val = PRS_ENABLED; >> else if (!strcmp(buf, "member")) >> val = PRS_DISABLED; >> + else if (!strcmp(buf, "root-nolb")) >> + val = PRS_ENABLED_NOLB; >> else >> return -EINVAL; > I wonder whether there's a better name than "root-nolb" because nolb isn't > the most readable and we are using space as the delimiter for other names. > Would something like "isolated" work? Right. "isolated" is a better name and it corresponds better with the isolcpus kernel command line option. Will change the name. Thanks, Longman From mboxrd@z Thu Jan 1 00:00:00 1970 From: Waiman Long Subject: Re: [PATCH 2/5] cgroup/cpuset: Add new cpus.partition type with no load balancing Date: Wed, 16 Jun 2021 22:57:18 -0400 Message-ID: <557d7fdb-5dae-11e1-4f82-ae9f4334c06a@redhat.com> References: <20210603212416.25934-1-longman@redhat.com> <20210603212416.25934-3-longman@redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623898645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DAFQKb5VrgrYV0k/wY/7SUmNCOTFhI8VI1aGDC5iIO8=; b=AP8T6SHQDGeFomIdbb08DwtDjya1XrU912FCSbcvr+nxCOcnfhNSjWIk+2ADqaVyljqOzs DL50lDaRJLdZDgrdZAN4WVX+s/v9Ll9ax8hQJFcrVMrzyNlJgYzKKLPrRoNeM/l8nDVyxn CyubUrjBOi9sicPhXVplhOuJ80PlV7A= In-Reply-To: Content-Language: en-US List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Tejun Heo Cc: Zefan Li , Johannes Weiner , Jonathan Corbet , Shuah Khan , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kselftest-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrew Morton , Roman Gushchin , Phil Auld , Peter Zijlstra , Juri Lelli On 6/16/21 4:47 PM, Tejun Heo wrote: > Hello, > > Generally looks fine to me. > > On Thu, Jun 03, 2021 at 05:24:13PM -0400, Waiman Long wrote: >> @@ -1984,12 +1987,31 @@ static int update_prstate(struct cpuset *cs, int val) >> goto out; >> >> err = update_parent_subparts_cpumask(cs, partcmd_enable, >> - NULL, &tmp); >> + NULL, &tmpmask); >> + >> if (err) { >> update_flag(CS_CPU_EXCLUSIVE, cs, 0); >> goto out; >> + } else if (new_prs == PRS_ENABLED_NOLB) { >> + /* >> + * Disable the load balance flag should not return an > ^ing > > and "else if" after "if (err) goto out" block is weird. The two conditions > don't need to be tied together. Yes, the else part is redundant in this case. Will remove it. > >> @@ -2518,6 +2547,9 @@ static int sched_partition_show(struct seq_file *seq, void *v) >> case PRS_ENABLED: >> seq_puts(seq, "root\n"); >> break; >> + case PRS_ENABLED_NOLB: >> + seq_puts(seq, "root-nolb\n"); >> + break; >> case PRS_DISABLED: >> seq_puts(seq, "member\n"); >> break; >> @@ -2544,6 +2576,8 @@ static ssize_t sched_partition_write(struct kernfs_open_file *of, char *buf, >> val = PRS_ENABLED; >> else if (!strcmp(buf, "member")) >> val = PRS_DISABLED; >> + else if (!strcmp(buf, "root-nolb")) >> + val = PRS_ENABLED_NOLB; >> else >> return -EINVAL; > I wonder whether there's a better name than "root-nolb" because nolb isn't > the most readable and we are using space as the delimiter for other names. > Would something like "isolated" work? Right. "isolated" is a better name and it corresponds better with the isolcpus kernel command line option. Will change the name. Thanks, Longman