Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3666070ybi; Fri, 19 Jul 2019 07:03:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNyqtej4CPQqxyjtoRekpwowW9KoLRkhAkc11LCEVSqULFjKQKMLpn/beprZAQq6DPQrCR X-Received: by 2002:a17:90a:9505:: with SMTP id t5mr57653047pjo.96.1563544991644; Fri, 19 Jul 2019 07:03:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563544991; cv=none; d=google.com; s=arc-20160816; b=qJlMackhUgoD/IUpW+fAF4AHRCfGh7+n93tJf9rx1IvETJ5dCPqHrVEMFArtQmGY9q uoXrufx7FTD9iD2f3K709DMQXuISHLLWKp/g/G4i8JElSqCtpeCiCRo5uFyzO9eubwqb 0GV8z2wlOr56S7b+mZGph+cHjRYxE/QC7It47O6BbGWZcbX9cNIQjMrLxQZHk+1BqS5K Cw1LK4oXcI8h4NO3dZRZzqkgrlDMZLpsHYdHrlcpev9HMq7jNaz9kgacZq9RXdl3Xo7d wV1CMI1pgBaBiohyiuEq4+rcLIIn8hXzgpV0s/BZ879yIccc9WbDtwFXNowEgCG48Qut 7eGA== 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; bh=fURSZsES8/FFy7omO0nwJ/wZ8WE0Q3uyMY9LgzNs6zc=; b=GQTxyK+4UN2jxUh5NdzqeAp4KIvw9Lk1g1ugmQKZrAHm+yGaXS8H5iRH43URauCJDL 10wE2+b0BGsIV75EqNn0iKCJpwVUm0f8BzYhYmols/2wcnIGI+pwvTOv5H4Jz9Hh7SEF LjguniZ/3W3+rfnOFzZOfc6DP9amlwp2VPmQM+0M0db+QcKCcaMyiLAqQIRkhj4RGprg b+sfOcwIbaOgGXCql11HNXKYmWHtkTnlHz9cxgSs8urF52+z5KOOzKCSspe2H7qrBiGO TAQ7VjFrY0tvKYEIBphdCFfNJJNT5B1ZTIEiCh18PhYvUzD0Yt1rAjKn5U8hK7Jmlw7d /r0Q== 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 b41si1062861pla.409.2019.07.19.07.02.56; Fri, 19 Jul 2019 07:03: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; 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 S1729431AbfGSOA2 (ORCPT + 99 others); Fri, 19 Jul 2019 10:00:28 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:35648 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729240AbfGSOA2 (ORCPT ); Fri, 19 Jul 2019 10:00:28 -0400 Received: by mail-wm1-f68.google.com with SMTP id l2so29142040wmg.0 for ; Fri, 19 Jul 2019 07:00:26 -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:to:cc:subject:date:message-id; bh=fURSZsES8/FFy7omO0nwJ/wZ8WE0Q3uyMY9LgzNs6zc=; b=afyNTB/bulBhQhF22vlWr4pbvIoH1EBZocqjwVAd88onBDZYa1qTzdXa0xDT5/4Hv5 9OMREslKRslUb5XEA4iII2VdO2SnhxcbGSEwujbTteOM1TxCa2DCqYzrfpAQmiBqQnB7 hZcFwoobz5oBC2U44vguBDXpVGqTDw8kLqWidyZpU64SOIuDXjzMxrkH67BolxHB67AW eiMpbqlDRlH1zdT20hEDgPr09faWC+Q+GzOnSNapE5ffSJTfmGW4NlVhzqE5Hvj2SEPV UM8ZSeib9gk8+7laMr6yExD10eQZAKIA2Ho3Ck2optEvT9+5aQ5XymY74cYo+oFzAeJp tzYQ== X-Gm-Message-State: APjAAAXiZMVKRrzSOBi5eBR0fsmLtIDCX+8rl9VPhbM28brSL+KI9oTh EwTM9VpIkQtZe8+hrd4/Zuxy7g== X-Received: by 2002:a1c:7304:: with SMTP id d4mr47784756wmb.39.1563544825550; Fri, 19 Jul 2019 07:00:25 -0700 (PDT) Received: from localhost.localdomain.com ([151.15.230.231]) by smtp.gmail.com with ESMTPSA id f10sm21276926wrs.22.2019.07.19.07.00.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Jul 2019 07:00:24 -0700 (PDT) From: Juri Lelli To: peterz@infradead.org, mingo@redhat.com, rostedt@goodmis.org, tj@kernel.org Cc: linux-kernel@vger.kernel.org, luca.abeni@santannapisa.it, claudio@evidence.eu.com, tommaso.cucinotta@santannapisa.it, bristot@redhat.com, mathieu.poirier@linaro.org, lizefan@huawei.com, longman@redhat.com, dietmar.eggemann@arm.com, cgroups@vger.kernel.org, Juri Lelli Subject: [PATCH v9 0/8] sched/deadline: fix cpusets bandwidth accounting Date: Fri, 19 Jul 2019 15:59:52 +0200 Message-Id: <20190719140000.31694-1-juri.lelli@redhat.com> X-Mailer: git-send-email 2.17.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, v9 of a series of patches, originally authored by Mathieu, with the intent of fixing a long standing issue of SCHED_DEADLINE bandwidth accounting. As originally reported by Steve [1], when hotplug and/or (certain) cpuset reconfiguration operations take place, DEADLINE bandwidth accounting information is lost since root domains are destroyed and recreated. Mathieu's approach is based on restoring bandwidth accounting info on the newly created root domains by iterating through the (DEADLINE) tasks belonging to the configured cpuset(s). Apart from the usual rebase on top of cgroup/for-next, this version - make cpuset_{can,cancel}_attach grab cpuset_rwsem for write (5/8 - Peter) - moves v8 8/8 to 7/8 for bisectability (Peter) - adds comment in changelog regarding normalize_rt_tasks() (8/8 - Peter) Set also available at https://github.com/jlelli/linux.git fixes/deadline/root-domain-accounting-v9 Thanks, - Juri [1] https://lkml.org/lkml/2016/2/3/966 Juri Lelli (6): cpuset: Rebuild root domain deadline accounting information sched/deadline: Fix bandwidth accounting at all levels after offline migration cgroup/cpuset: convert cpuset_mutex to percpu_rwsem cgroup/cpuset: Change cpuset_rwsem and hotplug lock order rcu/tree: Setschedule gp ktread to SCHED_FIFO outside of atomic region sched/core: Prevent race condition between cpuset and __sched_setscheduler() Mathieu Poirier (2): sched/topology: Adding function partition_sched_domains_locked() sched/core: Streamlining calls to task_rq_unlock() include/linux/cgroup.h | 1 + include/linux/cpuset.h | 13 ++- include/linux/sched.h | 5 + include/linux/sched/deadline.h | 8 ++ include/linux/sched/topology.h | 10 ++ kernel/cgroup/cgroup.c | 2 +- kernel/cgroup/cpuset.c | 163 +++++++++++++++++++++++++-------- kernel/rcu/tree.c | 6 +- kernel/sched/core.c | 57 ++++++++---- kernel/sched/deadline.c | 63 +++++++++++++ kernel/sched/sched.h | 3 - kernel/sched/topology.c | 30 +++++- 12 files changed, 290 insertions(+), 71 deletions(-) -- 2.17.2