Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3052240imm; Mon, 28 May 2018 23:27:50 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrTBO0HKU+BnXtPpV81w3cdK994gR7PpIDFhxs7itY5MbaovyX99KgUqrnry/FPfF4Jifak X-Received: by 2002:a17:902:264:: with SMTP id 91-v6mr16186496plc.341.1527575270147; Mon, 28 May 2018 23:27:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527575270; cv=none; d=google.com; s=arc-20160816; b=j0Os4T4/YQ7Vkl/EyBbd+gCEkErB5E5P1/j4LvqzRUAxDa5Vy6c7fezdz7XMii125z GqDTmJTI6CRLREvbpVivruRGtH0q9dEj+HjncrpZnJyNzkxhumRIfu7hdSEg6jB1cSE7 1WQBQIvy3Zx8Tf6c+BjOxFYDwmf6Un3Zx65kQ1DHzkkFEBxIC7cTB4hcOdeeKtFIUbD9 tSbIFEm8u9HnrVeb4lj5mu3o0jYPY4HRYf5G7MRfUPPvtuQFlH5jzGPBpk9T6okQujlM rq4e6LGbXIC8KWiz0CaU2MarxMbVmAyiFoUVuy5JobSPDmnHfgQ429QMS8uYPpsfBHGD qrgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=pKQ0hWI53KrPZTdEO/GXkZdpZrlhv7u5lX8uymEeEZQ=; b=xI/BJHDFC/w0BrMjW1S340n19l8Plgvuh8MlrUahTmmaAcBm5YU7T1iIgHjMOwIdwT ZBgILpzV7Xbcy+lFGQVogDn4F/aGWJErZnqqXVytnfrSI6viPo95REOqbXsV1RsDzQKZ SH0ZhwjvabEIJY6SJTv5wfW2zCiPboPAKlaeTmzMRF0KspJyQLAqd/la4On/KWjsjcOm EUXP1tdMbCrUK+lPkEyyMqyGJAX4biel69qtLVukBL0rpJQ1j1cSAZGb7CqFFulrTIcY KjEaF3yjOwXIozzqfgRl2tylU/+xsZWKWdLg96lX/7st2qyITE+gUYgANjGK7o95QRiF wnYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5-v6si5025769pgs.303.2018.05.28.23.27.36; Mon, 28 May 2018 23:27:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754594AbeE2G1K (ORCPT + 99 others); Tue, 29 May 2018 02:27:10 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:40643 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754440AbeE2G1I (ORCPT ); Tue, 29 May 2018 02:27:08 -0400 Received: by mail-wr0-f196.google.com with SMTP id l41-v6so23435763wre.7 for ; Mon, 28 May 2018 23:27:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=pKQ0hWI53KrPZTdEO/GXkZdpZrlhv7u5lX8uymEeEZQ=; b=MZXv0sbgpPHONdx5GUHRQ6ZqbnH1HatihVIjA0OfnvXIJivvnvEIowXI/4NiZxPc1Y kfoBcUYlPL4BhGP7ojskf2JA05MVHVAShwfb5t8c1NSl3GtDSvAIRjBCuSnDT3mq/jFE O4U9q7/ySx/kqQjZ+0k45dhfP9uO6ixXVRKhXAWyLfVqQsYkoIqjI7JmjS98k9NrL/U7 ye1vUaogpV60q/aj9UetbTqqLOp4OQv65xnz7WotXcABLGjmXXIQmxNgZrZwB+ldStrp 8yVtRMRZpEnIK3IQa8Y6ane/fLugObNEoAI06Xv+hi3cmmz2rLkT5oNcFvItgaQF5Np7 5rZA== X-Gm-Message-State: ALKqPwdSM5T86GVKLkwRCcZsc/Ev+iIwPFSgoz28Bzoyy3RHIxLDTwb1 IUmqGYs78kPjG8eOxbdFeNRGQA== X-Received: by 2002:adf:c08a:: with SMTP id d10-v6mr11251296wrf.268.1527575226983; Mon, 28 May 2018 23:27:06 -0700 (PDT) Received: from localhost.localdomain ([151.15.207.242]) by smtp.gmail.com with ESMTPSA id 12-v6sm19457318wmn.27.2018.05.28.23.27.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 May 2018 23:27:06 -0700 (PDT) Date: Tue, 29 May 2018 08:27:03 +0200 From: Juri Lelli To: Waiman Long Cc: Tejun Heo , Li Zefan , Johannes Weiner , Peter Zijlstra , Ingo Molnar , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kernel-team@fb.com, pjt@google.com, luto@amacapital.net, Mike Galbraith , torvalds@linux-foundation.org, Roman Gushchin Subject: Re: [PATCH v8 4/6] cpuset: Make generate_sched_domains() recognize isolated_cpus Message-ID: <20180529062703.GA8985@localhost.localdomain> References: <1526590545-3350-1-git-send-email-longman@redhat.com> <1526590545-3350-5-git-send-email-longman@redhat.com> <20180524102837.GA3948@localhost.localdomain> <45d70c88-e9f5-716a-ee9a-33dc111159cc@redhat.com> <8e610b98-970c-a309-5821-fc8e6aca892f@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8e610b98-970c-a309-5821-fc8e6aca892f@redhat.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28/05/18 21:24, Waiman Long wrote: > On 05/28/2018 09:12 PM, Waiman Long wrote: > > On 05/24/2018 06:28 AM, Juri Lelli wrote: > >> On 17/05/18 16:55, Waiman Long wrote: > >> > >> [...] > >> > >>> @@ -849,7 +860,12 @@ static void rebuild_sched_domains_locked(void) > >>> * passing doms with offlined cpu to partition_sched_domains(). > >>> * Anyways, hotplug work item will rebuild sched domains. > >>> */ > >>> - if (!cpumask_equal(top_cpuset.effective_cpus, cpu_active_mask)) > >>> + if (!top_cpuset.isolation_count && > >>> + !cpumask_equal(top_cpuset.effective_cpus, cpu_active_mask)) > >>> + goto out; > >>> + > >>> + if (top_cpuset.isolation_count && > >>> + !cpumask_subset(top_cpuset.effective_cpus, cpu_active_mask)) > >>> goto out; > >> Do we cover the case in which hotplug removed one of the isolated cpus > >> from cpu_active_mask? > > Yes, you are right. That is the remnant of my original patch that allows > > only one isolated_cpus at root. Thanks for spotting that. > > I am sorry. I would like to take it back my previous comment. The code > above looks for inconsistency in the state of the effective_cpus mask to > find out if it is racing with a hotplug event. If it is, we can skip the > domain generation as the hotplug event will do that too. The checks are > still valid with the current patchset. So I don't think we need to make > any change here. Yes, these checks are valid, but don't we also need to check for hotplug races w.r.t. isolated CPUs (of some other sub domain)?