Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5942070ybi; Wed, 12 Jun 2019 11:06:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyB7teJHq91goKGmwcTCAzP78eQUB3GEUQfJz/h1nRd5wkaghP4arWClBsjvO8rLIvbMRCw X-Received: by 2002:a63:c203:: with SMTP id b3mr25511628pgd.398.1560362771331; Wed, 12 Jun 2019 11:06:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560362771; cv=none; d=google.com; s=arc-20160816; b=y4UlJD4d+/oAkidbo00pAfsHl0cWhkZDOJMsmmSdmphjzZb0n+6KyOksh+hNXuDS/u I6mrHJ/OKYvph6cQqvAPWopnialq0I+5J1Fj2nAr433CXh812/P8mnD9B1n9V3GFkGS2 v9M4Izxjk09MmfRMvb6zyDhu4eui1usQxZDmRhqb+iN2EzTuhTcnnOAxgCIfsjYTqflM ZiAC6bjR5NkrkGA9k+fQ6Kwb5jlTzkpL/DEx3OQoDG1aTxb1NoHuyqMUtixrgaJQqnk1 RrmkO7/TMU4bOTjjmmj7yG4EM8k5jag4X7Lu20TKS9MQOAgQtRgZLKc9Ea+NtZSZdaie 9RUw== 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:dkim-signature; bh=Q/SueBbtj7C5fFQ+1HnrwXXVgHlOaQMtNQZKJDih2vk=; b=UGJD1smArUnGuXn4jUe5MgWktKl0OUqX2U7pAY7dcOzLgHnohmJke2XoxtLiASYGfg NKCSj6qa2kM2JQpDcdmgDlLulcYBdylzR11p/DhwHP/HUqb7T9D2o6LQjYv2bqHaln87 xaaomvKRcbp4kbFF6IXmYScIqTJSE5kBZrRmkbfz0B3X12kJyZtF7417K9QCr0vRaajH 7RA3tg81GAZblKTYVtMubLZKkobaBQOmXXHaKygJi+ccrLkOGcX+k/BMfSB5V1xt5D3W SZHGoP/l8eNJ4GVCDFThSLkbXZjeoWfr9//w6n037HdX13blHTAVImnAAI5LoHDx2xY0 tmKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=O2IfSoEd; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b24si402340pgw.262.2019.06.12.11.05.55; Wed, 12 Jun 2019 11:06:11 -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=fail header.i=@gmail.com header.s=20161025 header.b=O2IfSoEd; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440199AbfFLQCs (ORCPT + 99 others); Wed, 12 Jun 2019 12:02:48 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:40860 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406604AbfFLQCr (ORCPT ); Wed, 12 Jun 2019 12:02:47 -0400 Received: by mail-pf1-f196.google.com with SMTP id p184so6634906pfp.7; Wed, 12 Jun 2019 09:02:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Q/SueBbtj7C5fFQ+1HnrwXXVgHlOaQMtNQZKJDih2vk=; b=O2IfSoEdPeOtqvYc61BZ6k3//eUBsMkInNpkQAdhysvx5DQ3SdYRIa4kcfKFNZZiUf gnZiXeSVkjhFpwuXlNh0ekQU9A13LIBL1boBvvOujQQdHY6GA0eSL5Gnqvg6nq8Nfeuc 3fp+jTtqUacUT5N2RJ51BAY8KHD3RLw3T0WANZ7Fdcv8ap6gs4icNXGB8NJwKRnjHgbx 5lD/T9jSf8m6NvX1y/agOfMFhQMjhe9A0JGL45PHag1/zVPKZOOpYu8c3TGhLn+7hxSO UoCiIyN+Kca/fLHpXlP7m4CqcwCd5anviByK0K7OR9KQ3wgNCj125XtlSdLups1CYqYK GJSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=Q/SueBbtj7C5fFQ+1HnrwXXVgHlOaQMtNQZKJDih2vk=; b=QkZKCTJgO+CRCncQ+ZB0St41hMjdD9sz251zs0EQUzh5kXC8B/ntA3HOmjeNkoZACJ HnmiDHOUuA4VyMexl+O9vUkCUGJcS9hbzCuZMJN5+UmGkpjLgQXGGJeC5MVeY02VFFYe IcO1A1/QfT1zOD7zmcXGj1Ah5Qo74PyKYaEXmujEoF5rqrJ6XGwvTHqE0rwFHeRrd0SS XwFPpNejsvqM+CqcVYlFnaJzttvm2ZPnBNoQk35qqxCWlKghdAlwSGMQ5FBm6YkuFmLU U2Fyl4E9AJYn1wBWPcMuLQTfqOP0A37oaun5y2AXuXNgFueOPvvMio6qcHq7YTBTd7nw mjqQ== X-Gm-Message-State: APjAAAWxjq5umXq+CbN6NO6YbCqSzin2dkEAKcC79EnPL+SJ9J5VxGbL OtvJZGAXYQ8g8oKrzo3xY7o= X-Received: by 2002:a65:484d:: with SMTP id i13mr25259329pgs.27.1560355366687; Wed, 12 Jun 2019 09:02:46 -0700 (PDT) Received: from localhost ([2620:10d:c091:500::c431]) by smtp.gmail.com with ESMTPSA id d187sm14370pfa.38.2019.06.12.09.02.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Jun 2019 09:02:45 -0700 (PDT) Date: Wed, 12 Jun 2019 09:02:44 -0700 From: Tejun Heo To: Joel Savitz Cc: linux-kernel@vger.kernel.org, Li Zefan , Phil Auld , Waiman Long , Michal =?iso-8859-1?Q?Koutn=FD?= , Ingo Molnar , Peter Zijlstra , cgroups@vger.kernel.org Subject: Re: [RESEND PATCH v3] cpuset: restore sanity to cpuset_cpus_allowed_fallback() Message-ID: <20190612160244.GP3341036@devbig004.ftw2.facebook.com> References: <1560354648-23632-1-git-send-email-jsavitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1560354648-23632-1-git-send-email-jsavitz@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 12, 2019 at 11:50:48AM -0400, Joel Savitz wrote: > In the case that a process is constrained by taskset(1) (i.e. > sched_setaffinity(2)) to a subset of available cpus, and all of those are > subsequently offlined, the scheduler will set tsk->cpus_allowed to > the current value of task_cs(tsk)->effective_cpus. > > This is done via a call to do_set_cpus_allowed() in the context of > cpuset_cpus_allowed_fallback() made by the scheduler when this case is > detected. This is the only call made to cpuset_cpus_allowed_fallback() > in the latest mainline kernel. > > However, this is not sane behavior. While not perfect (we'll need to stop updating task's cpumask from cpuset to make), this is still a signifcant improvement. Acked-by: Tejun Heo If there's no objection, I'll route it through the cgroup tree. Thanks. -- tejun