)]}'
{
  "commit": "742f2319cbd61d9a051f532ad8c83bb33b48f442",
  "tree": "0a8443adaeafb981d070a77c743a8c8629a593c2",
  "parents": [
    "b73b5eedddfac178e4db917183b49d0ab7f63210"
  ],
  "author": {
    "name": "Xuewei Zhang",
    "email": "xueweiz@google.com",
    "time": "Thu Oct 03 17:12:43 2019 -0700"
  },
  "committer": {
    "name": "Greg Kroah-Hartman",
    "email": "gregkh@linuxfoundation.org",
    "time": "Fri Dec 13 08:52:35 2019 +0100"
  },
  "message": "sched/fair: Scale bandwidth quota and period without losing quota/period ratio precision\n\ncommit 4929a4e6faa0f13289a67cae98139e727f0d4a97 upstream.\n\nThe quota/period ratio is used to ensure a child task group won\u0027t get\nmore bandwidth than the parent task group, and is calculated as:\n\n  normalized_cfs_quota() \u003d [(quota_us \u003c\u003c 20) / period_us]\n\nIf the quota/period ratio was changed during this scaling due to\nprecision loss, it will cause inconsistency between parent and child\ntask groups.\n\nSee below example:\n\nA userspace container manager (kubelet) does three operations:\n\n 1) Create a parent cgroup, set quota to 1,000us and period to 10,000us.\n 2) Create a few children cgroups.\n 3) Set quota to 1,000us and period to 10,000us on a child cgroup.\n\nThese operations are expected to succeed. However, if the scaling of\n147/128 happens before step 3, quota and period of the parent cgroup\nwill be changed:\n\n  new_quota: 1148437ns,   1148us\n new_period: 11484375ns, 11484us\n\nAnd when step 3 comes in, the ratio of the child cgroup will be\n104857, which will be larger than the parent cgroup ratio (104821),\nand will fail.\n\nScaling them by a factor of 2 will fix the problem.\n\nTested-by: Phil Auld \u003cpauld@redhat.com\u003e\nSigned-off-by: Xuewei Zhang \u003cxueweiz@google.com\u003e\nSigned-off-by: Peter Zijlstra (Intel) \u003cpeterz@infradead.org\u003e\nAcked-by: Phil Auld \u003cpauld@redhat.com\u003e\nCc: Anton Blanchard \u003canton@ozlabs.org\u003e\nCc: Ben Segall \u003cbsegall@google.com\u003e\nCc: Dietmar Eggemann \u003cdietmar.eggemann@arm.com\u003e\nCc: Juri Lelli \u003cjuri.lelli@redhat.com\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Steven Rostedt \u003crostedt@goodmis.org\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: Vincent Guittot \u003cvincent.guittot@linaro.org\u003e\nFixes: 2e8e19226398 (\"sched/fair: Limit sched_cfs_period_timer() loop to avoid hard lockup\")\nLink: https://lkml.kernel.org/r/20191004001243.140897-1-xueweiz@google.com\nSigned-off-by: Ingo Molnar \u003cmingo@kernel.org\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@linuxfoundation.org\u003e\n\n\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f77fcd37b226f1de59c45063b45124be1cee42cb",
      "old_mode": 33188,
      "old_path": "kernel/sched/fair.c",
      "new_id": "f0abb8fe0ae967ebd10e02beeed04cb153132bf9",
      "new_mode": 33188,
      "new_path": "kernel/sched/fair.c"
    }
  ]
}
