From patchwork Tue Feb 13 20:32:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 128291 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp32223ljc; Tue, 13 Feb 2018 12:32:57 -0800 (PST) X-Google-Smtp-Source: AH8x226UvAu2ydKbUf2NGosGnZKUU989xnbVnVMB4pIdXjgJjaK20DAKuNGqUUnYCgCHmuDlnt92 X-Received: by 10.101.80.69 with SMTP id k5mr1911116pgo.449.1518553977356; Tue, 13 Feb 2018 12:32:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518553977; cv=none; d=google.com; s=arc-20160816; b=FTAxXDAJEGBiLLdMCdalGhLakB6tVHylXH4EeRYVjZUYzZtVWQiLLPSMX5KzffJUWq bSwjoz7s8ck3TvCAGs3qt9HslAGjHvVrV39O78ZLDoLr6AJ4+ea1W/cD9IQBN6tLphnd HE+s72DOEcvTyNGqnB4fxjdKW+tqrkGIfkDP43L5GVR7ldZn8g5KEvGzTKjglwonB5gO Eb5ofo0i2r8trf7CMsFimakM04ynoGsE5Nm9nmXPD/HFl4WXyBqFV5l9mCFeI8M8Byhd HX4zPcT6KY4If+31EtsEFH82O1UD394zUZFmvfJNNIiSzUrlOh1CcxFdU3XLl+EpoUnv vUbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=z57Hit3+H8UV09ka/J4Dq70UG1UnZPsYR/dswzp0wLI=; b=BkK5t953iPdckLkaCorhnc3+sJALbpWLcom+MkzpL5wKeAb6YhFX3YlnIdzl+EhoMc psLt4vlMSAuzW1ZBbJOF0MfivUGR1RfeNh6oFYz2uRcBZNoUF4IEJZZP2F3M0yGpGLcu /IPjTmKvISVNLB+eAHOOe5/j21oFHr99cej7fIFCgPlbg53H77FqKUNqiD3Vb6he7tRq 0DJf/1yNE6xUSHmNhV9P9xDpojTDWxciFyYC5nwzSsJAJ30mmf12M8IvwPVOHEh/tSxk /bOE73Km2VyLzGjECgHoV9djBbWaiWx4g5/KqfCgqUH9nLxL2Sdetw/xwSlV+A2B1s9f xNbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iz0JoY5S; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n10-v6si1710282plk.255.2018.02.13.12.32.57; Tue, 13 Feb 2018 12:32:57 -0800 (PST) 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=@linaro.org header.s=google header.b=iz0JoY5S; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965787AbeBMUcx (ORCPT + 28 others); Tue, 13 Feb 2018 15:32:53 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36065 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965689AbeBMUcv (ORCPT ); Tue, 13 Feb 2018 15:32:51 -0500 Received: by mail-pg0-f65.google.com with SMTP id j9so680856pgv.3 for ; Tue, 13 Feb 2018 12:32:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=z57Hit3+H8UV09ka/J4Dq70UG1UnZPsYR/dswzp0wLI=; b=iz0JoY5S5m6Ko+1krZzw4au/Ujjbsj9tEK35TWUe+Tv3tBdZkC6v4mEeS+fNmc33y0 3dBLNYAAeD4JeFa86Z7t79dnJ8l4+IuEQz/N5qb52yDx0lsQHX5I9ZVPDmju/tRNmAm2 mJBcZicIQYImK19PrkpGTlNNEuw5NRCchqaaA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=z57Hit3+H8UV09ka/J4Dq70UG1UnZPsYR/dswzp0wLI=; b=O1b8dQla10eMC+tBwuMfJbTl3E5J741i4J8YDdfnswxTAT6V7I/hPr+/6aQC+o+vvk coe9Wul+riS+Mf4SNW4lGPICXkRiuqC0H2CAwxRn/19HkvRwe9vhKmJ/TzfEGprbgzBs pF3S0TPXLw4uEwQ63t9rwB6aHx6JgSTS7+EKDxH76IhHA4FZVMpuasfw9H7R6mmgjPDI jbcEFS+dAlz8ydbDqwTzvfsu8cguAywGnOQIjTtbqLOI5Hg+x6afwMpWW19LXS2ntMFB mx8usJ4B6/AJOxONXxW1UfINPQI+QvgVgPqj0ajcdFCI6aDAMs5z+5MCC+i4/K4F798Z FX+w== X-Gm-Message-State: APf1xPCQ7Ip1psFFtYnpP/4CasVPbXt0AB38FRbf0dZjYFUN40PUnRG2 SyG0vqIcWvFELLrd4N3ECkQD/Q== X-Received: by 10.99.130.72 with SMTP id w69mr1926974pgd.368.1518553970221; Tue, 13 Feb 2018 12:32:50 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id o135sm35540873pfg.45.2018.02.13.12.32.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Feb 2018 12:32:49 -0800 (PST) From: Mathieu Poirier To: peterz@infradead.org Cc: lizefan@huawei.com, mingo@redhat.com, rostedt@goodmis.org, claudio@evidence.eu.com, bristot@redhat.com, tommaso.cucinotta@santannapisa.it, juri.lelli@redhat.com, luca.abeni@santannapisa.it, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V3 00/10] sched/deadline: fix cpusets bandwidth accounting Date: Tue, 13 Feb 2018 13:32:37 -0700 Message-Id: <1518553967-20656-1-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is the third installment of a patchset that attempt to fix a problem reported by Steve Rostedt [1] where DL bandwidth accounting is not recomputed after CPUset and CPU hotplug operations took place. When CPU hotplug and some CUPset manipulation take place root domains are destroyed and new ones created, loosing at the same time DL accounting information pertaining to utilisation. Please see [2] for a full description of the approach. The most notable change in this revision is the resolution of synchronisation issues between function __sched_setscheduler() and the the CPUset subsystem as pointed out by Juri Lelli. As with the second revision this set is available here [3] with the instrumentattion for patch 10/10 in this commit [4]. This set applies cleanly on top of v4.16-rc1. Best regards, Mathieu ------ Changes for V3: . Addressed potential race conditions between the CPUset subsystem and function __sched_setscheduler(). . Added a lockdep asset to function partition_sched_domains(). Change for V2: . Addressing a problem found by Luca Abeni where the mask of a DL task isn't modified when cpuset are collapsed. [1]. https://lkml.org/lkml/2016/2/3/966 [2]. https://groups.google.com/forum/#!topic/linux.kernel/uakbvOQE6rc [3]. https://git.linaro.org/people/mathieu.poirier/linux.git/log/?h=v4.16-rc1-bandwidth-accounting-v3 [4]. 4a95e8ab0881 sched/debug: Add 'rq_debug' proc entry Mathieu Poirier (10): sched/topology: Add check to backup comment about hotplug lock sched/topology: Adding function partition_sched_domains_locked() sched/core: Streamlining calls to task_rq_unlock() sched/core: Prevent race condition between cpuset and __sched_setscheduler() cpuset: Rebuild root domain deadline accounting information sched/deadline: Keep new DL task within root domain's boundary cgroup: Constrain 'sched_load_balance' flag when DL tasks are present cgroup: Constrain the addition of CPUs to a new CPUset sched/core: Don't change the affinity of DL tasks sched/deadline: Prevent CPU hotplug operation if DL task on CPU include/linux/cpuset.h | 12 ++ include/linux/sched.h | 5 + include/linux/sched/deadline.h | 8 ++ include/linux/sched/topology.h | 10 ++ kernel/cgroup/cpuset.c | 246 ++++++++++++++++++++++++++++++++++++++++- kernel/sched/core.c | 63 ++++++++--- kernel/sched/deadline.c | 36 ++++++ kernel/sched/sched.h | 3 - kernel/sched/topology.c | 33 +++++- 9 files changed, 392 insertions(+), 24 deletions(-) -- 2.7.4