Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp2312873pja; Thu, 26 Mar 2020 13:06:10 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsJxtuNwd9E6guZM6nBPR42A61SH8vrNPRKdj3bjowm8h9bZT4VNMnDDi7drJt+lcu9j1qa X-Received: by 2002:a9d:2215:: with SMTP id o21mr7481523ota.113.1585253169938; Thu, 26 Mar 2020 13:06:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585253169; cv=none; d=google.com; s=arc-20160816; b=uXM0/0xN6X6nC7F/t5AmvMARmFB5XFMNhgy/iMTCH5UrtnkAWlbVCvLvXRCwwRgx8F cDZG+oGk4u9/kudRKskNhFiOthK9Xy7hXJ59T8Sw2bpwiHF26vmewneyUz+SZGvPdhnd a2SJuiRoZ+l0jUKcdJSbS2uho2I+80jP5p33AkM3o7+YLNobYb2opgRh3FOyMj+CZC1n smFy8Cs1nc+rE9TqVvJcWORgTp7LYU97zMdHyfGpDIeYPgkZSLQSTI7T5u6l1cqaYU4w clzwqkO+3g6riBECQzqD8ywDPnbxrbbZ4H1r1TnCbFmdgXmaCyW0lBYWVqC2vCpSJnG6 LZMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=qfpdmD90qfG4APoootzAo2/56jymRHsiOC00dP4g/fg=; b=a9wfWVYBobqaV78yx78mdvU1nrMpb/sM/9/8OdksZmi/GIaM1VSqE8EDOLl1xGPxO9 S/cOJXWn46mDzrA0+HUq/1HU/esJO2BxD0x9Ik1kSgClAAEBDK+4KSm1gEr//gz6/Xi2 KhuGYCKioRfmgQvGR5NEvQ+UaEe7iFdMx5+OPD3XpcqPDhaznUv8ExEH45CHruWHGz4O IdQ28eqROL1MOENIQ4zBYe47ruKucC9V79v7E3/oJJxw7K3PB4ZWtbzizhphhu7gv3wU n7Ls8+TWeKDUBj7Kbqr4UwS2+poF9pmodBMkBIG98VJZ9VdS9BI9Nsnfpqq8qRzO2ozT 6emw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=B8luIsXt; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u1si1402982otg.231.2020.03.26.13.05.56; Thu, 26 Mar 2020 13:06:09 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=B8luIsXt; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728638AbgCZUFW (ORCPT + 99 others); Thu, 26 Mar 2020 16:05:22 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:53177 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727943AbgCZUFW (ORCPT ); Thu, 26 Mar 2020 16:05:22 -0400 Received: by mail-wm1-f66.google.com with SMTP id z18so8245494wmk.2 for ; Thu, 26 Mar 2020 13:05:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qfpdmD90qfG4APoootzAo2/56jymRHsiOC00dP4g/fg=; b=B8luIsXtML5nPUmmER8cy/dMcB25Mm+18STwz7qhe3LIg5oodvflcMC6OCHR1gLICT N8yFdxR4jDyxjIcSflwl86YyKxOX/oUYtpSLJALHbJdvSgg/PObAmPqlFK1dH0xbkUlb pFaKp3kabNKrodxQRf4bBD2G0e/8iJ9AVuQvRoGWLlg2mSGrencs1H1/kY+Y6GgpGJ1r 5rMTvNhLkVYdQfBgefau6Vpj1FYkJx6MTjN3czU8XBIC2eq/HLsL6vKjezqHuVXkkCg3 MzJkfZIqvUGDSWEV4O9N6YdpF4H2ykDkStRRZ+oWBuFb54n06C01AnX7RLj9kph9dXhG b4Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qfpdmD90qfG4APoootzAo2/56jymRHsiOC00dP4g/fg=; b=nqXo+XFwHI2SeiJjxcmOzjaKgiMKEB3mdrkj6z+yJyGNp7taO19zYny1i4CXpd7uqg zUFdctNqf/H9DsJSXLysKKOQ0wC5snxnVvZcqbYaU/m6zzuBpBK0TWucrIwLx61BZ7Hi YyBqGPQ4SDz8/Ik03OPey0f3yTa7U3TnPAUK/LhYsDV4daFwgwESL2x78BwMxZYuHu6c YNhnKYBuBXMiV85nA7EVHuPTZKxisrXLEXTxUxSrg/UA7egCEgMmySRCyW26BMGnfEQy Hqt48dSfryr1zUwp9qQ1j0GddP9LDQQFsn4XQ9MWsJ8vuVoEpsL79L/SkRHBunsLWrDW oxBQ== X-Gm-Message-State: ANhLgQ2+vIt67FRPLIjK2HUC+6FutyH4E36PjTTDsr7apX0LIBVTtKGv k14jvZQXk0P5LpAM4Iw2pRFRGtAnsI+cIfyrqd+YWA== X-Received: by 2002:a5d:4085:: with SMTP id o5mr10529294wrp.327.1585253118583; Thu, 26 Mar 2020 13:05:18 -0700 (PDT) MIME-Version: 1.0 References: <20200326191623.129285-1-joel@joelfernandes.org> <20200326192035.GO162390@mtj.duckdns.org> <20200326194448.GA133524@google.com> <972a5c1b-6721-ac20-cec5-617af67e617d@redhat.com> In-Reply-To: <972a5c1b-6721-ac20-cec5-617af67e617d@redhat.com> From: Sonny Rao Date: Thu, 26 Mar 2020 13:05:04 -0700 Message-ID: Subject: Re: [PATCH RFC] cpuset: Make cpusets get restored on hotplug To: Waiman Long Cc: Joel Fernandes , Tejun Heo , linux-kernel@vger.kernel.org, Dmitry Shmidt , Amit Pundir , kernel-team@android.com, Jesse Barnes , vpillai@digitalocean.com, Peter Zijlstra , Guenter Roeck , Greg Kerr , cgroups@vger.kernel.org, Johannes Weiner , Li Zefan Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 26, 2020 at 12:57 PM Waiman Long wrote: > > On 3/26/20 3:44 PM, Joel Fernandes wrote: > > Hi Tejun, > > > > On Thu, Mar 26, 2020 at 03:20:35PM -0400, Tejun Heo wrote: > >> On Thu, Mar 26, 2020 at 03:16:23PM -0400, Joel Fernandes (Google) wrote: > >>> This deliberately changes the behavior of the per-cpuset > >>> cpus file to not be effected by hotplug. When a cpu is offlined, > >>> it will be removed from the cpuset/cpus file. When a cpu is onlined, > >>> if the cpuset originally requested that that cpu was part of the cpuset, > >>> that cpu will be restored to the cpuset. The cpus files still > >>> have to be hierachical, but the ranges no longer have to be out of > >>> the currently online cpus, just the physically present cpus. > >> This is already the behavior on cgroup2 and I don't think we want to > >> introduce this big a behavior change to cgroup1 cpuset at this point. > > It is not really that big a change. Please go over the patch, we are not > > changing anything with how ->cpus_allowed works and interacts with the rest > > of the system and the scheduler. We have just introduced a new mask to keep > > track of which CPUs were requested without them being affected by hotplug. On > > CPU onlining, we restore the state of ->cpus_allowed as not be affected by > > hotplug. > > > > There's 3 companies that have this issue so that should tell you something. > > We don't want to carry this patch forever. Many people consider the hotplug > > behavior to be completely broken. > > > I think Tejun is concerned about a change in the default behavior of > cpuset v1. > > There is a special v2 mode for cpuset that is enabled by the mount > option "cpuset_v2_mode". This causes the cpuset v1 to adopt some of the > v2 behavior. I introduced this v2 mode a while back to address, I think, > a similar concern. Could you try that to see if it is able to address > your problem? If not, you can make some code adjustment within the > framework of the v2 mode. As long as it is an opt-in, I think we are > open to further change. I am surprised if anyone actually wants this behavior, we (Chrome OS) found out about it accidentally, and then found that Android had been carrying a patch to fix it. And if it were a desirable behavior then why isn't it an option in v2? > > Cheers, > Longman >