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=-13.2 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 C89E4C432BE for ; Wed, 28 Jul 2021 16:28:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B19DD61019 for ; Wed, 28 Jul 2021 16:28:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229972AbhG1Q2F (ORCPT ); Wed, 28 Jul 2021 12:28:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:40770 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229880AbhG1Q2D (ORCPT ); Wed, 28 Jul 2021 12:28:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627489681; 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=oVx/5yrmyZbbRVeN3LD+d66Q2FozCvKMMwaCU5JpwKA=; b=C8TkkbLtJNQFJzm7vuOth01N1hoMg0o0Hs8+2dm7BpdaI8dOJqXNDhrEA3SBMadh7Jwh/W lPwIwRsPDZSA32snFj1Bcb9EEFYnZKf0h78flfT2UnWWzerOSoKlOUmmgKM5TXw/JDZkc8 RwAXJ7aDIw2Oj6fYt/TdD2tgTxNPJqE= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-131-RFve3lQaPL-BQxg7owug5g-1; Wed, 28 Jul 2021 12:28:00 -0400 X-MC-Unique: RFve3lQaPL-BQxg7owug5g-1 Received: by mail-qt1-f199.google.com with SMTP id t35-20020a05622a1823b02902647b518455so1315468qtc.3 for ; Wed, 28 Jul 2021 09:28:00 -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=oVx/5yrmyZbbRVeN3LD+d66Q2FozCvKMMwaCU5JpwKA=; b=Wg1dOxVmOc4u78jP1dWaf5aALuFaLsVxGYgDgsoMo9aa23ct1TYLZA6+y7y82aa3Qw EZmh1JDD9SPRZwi/h/igL6O/paWB/Hg9ln32u+DmZjcWG8S6jP96czJPGEmriPYdD2YE V8dBQibUWvJwZU8nAjdHCBUSftgmgHL3doSGDhHm23MDZYC99WXyVm4Nm0fCKHAPlxit bmglhlACaopFTLlHjqHnuKDX5pG2GdBvbrnWAIaaZ2fR4Z22M2UqzBY1HYX19aitl+k+ IQ/fALceLhWD1ixVBsVIdrK2Ypphi0fItJmrMlRYr6LDu9No6G/eve9YF4hTD3J0ygNK TYHg== X-Gm-Message-State: AOAM531W6m+5GV+Xcn2vVc4r4OaDHmFIZat1zOPusIhvS3FHvlp78usd So8sAMsxpm3iSUcSaHUrpIaeZxa6ZJ44P3MYJgqK4MerhhQTgk+0CIvSRJpIQuCRdSe22V1swm3 XaM0wPPfF0VMlqKxqucbUlNdF X-Received: by 2002:a37:9244:: with SMTP id u65mr520013qkd.46.1627489680044; Wed, 28 Jul 2021 09:28:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZRqP37sqJcrPzK/iLTHBFFo1TykeaKOBzeN4NCV6nY6od2hic7g0uzGrV0SdRcBpcBj9h2w== X-Received: by 2002:a37:9244:: with SMTP id u65mr519993qkd.46.1627489679827; Wed, 28 Jul 2021 09:27:59 -0700 (PDT) Received: from llong.remote.csb ([2601:191:8500:76c0::cdbc]) by smtp.gmail.com with ESMTPSA id p13sm236018qkk.87.2021.07.28.09.27.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Jul 2021 09:27:59 -0700 (PDT) From: Waiman Long X-Google-Original-From: Waiman Long Subject: Re: [PATCH v3 6/9] cgroup/cpuset: Add a new isolated cpus.partition type To: =?UTF-8?Q?Michal_Koutn=c3=bd?= Cc: Tejun Heo , 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 , Frederic Weisbecker , Marcelo Tosatti References: <20210720141834.10624-1-longman@redhat.com> <20210720141834.10624-7-longman@redhat.com> <20210728160900.GA8905@blackbody.suse.cz> Message-ID: Date: Wed, 28 Jul 2021 12:27:58 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210728160900.GA8905@blackbody.suse.cz> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/28/21 12:09 PM, Michal Koutný wrote: > Hello Waiman. > > On Tue, Jul 20, 2021 at 10:18:31AM -0400, Waiman Long wrote: >> @@ -2026,6 +2036,22 @@ static int update_prstate(struct cpuset *cs, int new_prs) >> [...] >> + } else if (old_prs && new_prs) { > If an isolated root partition becomes invalid (new_prs == PRS_ERROR)... > >> + /* >> + * A change in load balance state only, no change in cpumasks. >> + */ >> + update_flag(CS_SCHED_LOAD_BALANCE, cs, (new_prs != PRS_ISOLATED)); > ...this seems to erase information about CS_SCHED_LOAD_BALANCE zeroness. > > IOW, if there's an isolated partition that becomes invalid and later > valid again (a cpu is (re)added), it will be a normal root partition > without the requested isolation, which is IMO undesired. > > I may have overlooked something in broader context but it seems to me > the invalidity should be saved independently of the root/isolated type. PRS_ERROR cannot be passed to update_prstate(). For this patchset, PRS_ERROR can only be set by changes in hotplug. The current design will maintain the set flag (CS_SCHED_LOAD_BALANCE) and use it to decide to switch back to PRS_ENABLED or PRS_ISOLATED when the cpus are available again. Cheers, Longman