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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALm+0cUrwYAQ=frj+S=N8s8Q4KYV6JWoU0+2E-NvaqEoFcMC7g@mail.gmail.com>
Date:   Thu, 24 Aug 2023 10:30:37 +0800
From:   Z qiang <qiang.zhang1211@...il.com>
To:     paulmck@...nel.org
Cc:     Joel Fernandes <joel@...lfernandes.org>, rcu@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: rcutorture: Can not Disable RT throttling

>
> On Wed, Aug 23, 2023 at 09:50:37AM -0400, Joel Fernandes wrote:
> > On Tue, Aug 22, 2023 at 3:37 AM Z qiang <qiang.zhang1211@...il.com> wrote:
> > >
> > > When running build-in rcutorture tests in 6.5.0-rc4-rt, and found that,
> > > although the value of /proc/sys/kernel/sched_rt_runtime_us is -1,
> > >
> > > cat /sys/kernel/debug/sched/debug
> > > ....
> > > rt_rq[6]:
> > >   .rt_nr_running                 : 4
> > >   .rt_nr_migratory               : 0
> > >   .rt_throttled                  : 0
> > >   .rt_time                       : 0.000000
> > >   .rt_runtime                    : 950.000000
> > >
> > > but the rt_runtime still is 950.000000.
> > > set sysctl_sched_rt_runtime in rcu_torture_disable_rt_throttle()
> > > does not disable rt-throttling.
> >
> > I think you have hit a bug. I think the problem is
> > rcu_torture_disable_rt_throttle() modifies the sysctl knobs, but does
> > not change def_rt_bandwidth and reinitialize the rt_rq. I think we
> > need to call sched_rt_do_global() like the sysfs handler does, or
> > change the sysctl knobs to be earlier in the boot process before the
> > rt_rq are initialized.

I've thought about something like this before, call the sched_rt*() in
the sched_rt_handler(),
this requires exporting these functions.

> >
> > Or better yet (not sure if it is possible) trigger the sysctl change
> > via the sysctl layer and let it do the same logic.

This is good, but I haven't found it yet

>
> That would be difficult in built-in rcutorture testing due to the fact
> that there is not much in the way of userspace.  I suppose we could
> invoke the sysfs handler so as to mock up a userspace access, but that
> might not be the most robust approach.

Does it mean to use filp_open() to open sched_rt_runtime_us file and
write -1 through kernel_write() ?


>
> Another way is to disable preemption in the real-time kthreads.  Which
> might need careful implementation to avoid "scheduling while atomic"
> and friends.
>
>                                                         Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ