Bug 1275151 - tick_stop scheduler doesn't work for 3.10.0-325.rt56.202.el7.x86_64
tick_stop scheduler doesn't work for 3.10.0-325.rt56.202.el7.x86_64
Status: CLOSED DUPLICATE of bug 1273920
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: kernel-rt (Show other bugs)
7.2
x86_64 Linux
medium Severity medium
: rc
: 7.3
Assigned To: Clark Williams
Jiri Kastner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-26 02:48 EDT by FuXiangChun
Modified: 2015-11-11 22:56 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-27 08:04:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description FuXiangChun 2015-10-26 02:48:56 EDT
Description of problem:
When I verified bug 1193629. I found tick_stop scheduler doesn't work for 3.10.0-316.rt56.191.el7.x86_64. But for stock kernel-3.10.0-325.el7.x86_64 works well. and 3.10.0-316.rt56.191.el7.x86_64 works well. 


Version-Release number of selected component (if applicable):
3.10.0-325.rt56.202.el7.x86_64

How reproducible:
100%

Steps to Reproduce:

1. Add the following kernel command-line to isolate a core in my machine and reboot:

   isolcpus=2

2. Disable RT throttling:

# echo -1 > /proc/sys/kernel/sched_rt_runtime_us

3. Start tracing:

# trace-cmd start -e tick_stop

4. Run two stress processes pinned to the isolated core:

# taskset -c 2 stress --cpu 1 &
# taskset -c 2 stress --cpu 1 &

5. Check /sys/kernel/debug/tracing/per_cpu/cpu2/trace

Actual results:
# cat /sys/kernel/debug/tracing/per_cpu/cpu2/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 0/0   #P:8
#
#                              _-------=> irqs-off          
#                            /  _------=> need-resched      
#                            |/  _-----=> need-resched_lazy 
#                            ||/  _----=> hardirq/softirq   
#                            |||/  _---=> preempt-depth     
#                            ||||/  _--=> preempt-lazy-depth
#                            ||||| / _-=> migrate-disable   
#                            |||||| /     delay
#           TASK-PID   CPU#  ||||||  TIMESTAMP  FUNCTION
#              | |       |   ||||||     |         |


Expected results:
# cat /sys/kernel/debug/tracing/per_cpu/cpu2/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 14831/14831   #P:8
#
#                              _-------=> irqs-off          
#                            /  _------=> need-resched      
#                            |/  _-----=> need-resched_lazy 
#                            ||/  _----=> hardirq/softirq   
#                            |||/  _---=> preempt-depth     
#                            ||||/  _--=> preempt-lazy-depth
#                            ||||| / _-=> migrate-disable   
#                            |||||| /     delay
#           TASK-PID   CPU#  ||||||  TIMESTAMP  FUNCTION
#              | |       |   ||||||     |         |

......
stress-3705  [002] d...1..  3942.801535: tick_stop: success=no msg=more than 1 task in runqueue

stress-3705  [002] d...1..  3942.802536: tick_stop: success=no msg=more than 1 task in runqueue

stress-3705  [002] d...1..  3942.803537: tick_stop: success=no msg=more than 1 task in runqueue

Additional info:
Comment 1 FuXiangChun 2015-10-26 02:58:24 EDT
correct an input error in comment 0:

s/I found tick_stop scheduler doesn't work for 3.10.0-316.rt56.191.el7.x86_64/I found tick_stop scheduler doesn't work for kernel-3.10.0-325.el7.x86_64
Comment 3 FuXiangChun 2015-10-26 04:09:01 EDT
(In reply to FuXiangChun from comment #1)
> correct an input error in comment 0:
> 
> s/I found tick_stop scheduler doesn't work for
> 3.10.0-316.rt56.191.el7.x86_64/I found tick_stop scheduler doesn't work for
> kernel-3.10.0-325.el7.x86_64

s/I found tick_stop scheduler doesn't work for 3.10.0-316.rt56.191.el7.x86_64/I found tick_stop scheduler doesn't work for RT kerne 3.10.0-325.rt56.202.el7.x86_64
Comment 4 Luiz Capitulino 2015-10-26 09:09:39 EDT
You're missing running a real-time task from procedure in bug 1193629. But you're right it doesn't work in the RT kernel, and that's because it's been disabled by default. Please, add the following to the kernel command-line (right after isolcpus=):

nohz=on

Reboot and try again.
Comment 5 FuXiangChun 2015-10-27 01:33:06 EDT
(In reply to Luiz Capitulino from comment #4)
> You're missing running a real-time task from procedure in bug 1193629. But
> you're right it doesn't work in the RT kernel, and that's because it's been
> disabled by default. Please, add the following to the kernel command-line
> (right after isolcpus=):
> 
> nohz=on
> 
> Reboot and try again.

You are right.  I got expect result with this option "nohz=on". 

host kernel command-line:

isolcpus=2 nohz=on nohz_full=2

result:

............
stress-3568  [002] dN..1..   329.734449: tick_stop: success=no msg=more than 1 task in runqueue

<...>-3579  [002] d...1..   329.735271: tick_stop: success=yes msg=

It should be enabled by default, right?
Comment 6 Luiz Capitulino 2015-10-27 08:04:44 EDT
In KVM-RT yes. There's an on-going discussion about how to best solve it. But there's another BZ open for this issue, so I'm closing as a dupe.

*** This bug has been marked as a duplicate of bug 1273920 ***

Note You need to log in before you can comment on or make changes to this bug.