lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c46a03ef-89f5-b0c1-5886-e77266dc9a40@bristot.me>
Date:   Mon, 7 Nov 2016 21:33:02 +0100
From:   Daniel Bristot de Oliveira <daniel@...stot.me>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Christoph Lameter <cl@...ux.com>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        linux-rt-users <linux-rt-users@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sched/rt: RT_RUNTIME_GREED sched feature



On 11/07/2016 09:16 PM, Steven Rostedt wrote:
> I'm confused? Are you saying that RR tasks don't get throttled in the
> current code? That sounds like a bug to me.

If the RT_RUNTIME_SHARING is enabled, the CPU in which the RR tasks are
running (and pinned) will borrow RT runtime from another CPU, allowing
the RR tasks to run forever. For example:

[root@...on debug]# cat /proc/sched_debug | grep rt_runtime
  .rt_runtime                    : 950.000000
  .rt_runtime                    : 950.000000
  .rt_runtime                    : 950.000000
  .rt_runtime                    : 950.000000
[root@...on debug]# echo RT_RUNTIME_SHARE > sched_features
[root@...on debug]# taskset -c 2 chrt -r 5 /home/bristot/f &
[1] 23908
[root@...on debug]# taskset -c 2 chrt -r 5 /home/bristot/f &
[2] 23915
[root@...on debug]# cat /proc/sched_debug | grep rt_runtime
  .rt_runtime                    : 900.000000
  .rt_runtime                    : 950.000000
  .rt_runtime                    : 1000.000000
  .rt_runtime                    : 950.000000

You see? the rt_runtime of the CPU 2 was borrowed time from CPU 0.

It is not a BUG but a feature (no jokes haha). With RT_RUNTIME_SHARE,
the rt_runtime is such a global runtime. It works fine for tasks that
can migrate... but that is not the case for per-cpu kworkers.

-- Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ