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: <238f23ab72d99c3d2737a1ef0b68aebe60de8f8a.camel@redhat.com>
Date:   Fri, 01 Jul 2022 13:35:15 +0200
From:   Nicolas Saenz Julienne <nsaenzju@...hat.com>
To:     Valentin Schneider <vschneid@...hat.com>,
        linux-kernel@...r.kernel.org, fweisbec@...il.com
Cc:     bristot@...hat.com, cmetcalf@...hip.com, mgorman@...e.de,
        bsegall@...gle.com, rostedt@...dmis.org, dietmar.eggemann@....com,
        vincent.guittot@...aro.org, juri.lelli@...hat.com,
        peterz@...radead.org, mingo@...hat.com, mtosatti@...hat.com
Subject: Re: [PATCH] nohz/full, sched/rt: Fix missed tick-reenabling bug in
 dequeue_task_rt

On Fri, 2022-07-01 at 12:25 +0100, Valentin Schneider wrote:
> On 28/06/22 11:22, Nicolas Saenz Julienne wrote:
> > dequeue_task_rt() only decrements 'rt_rq->rt_nr_running' after having
> > called sched_update_tick_dependency() preventing it from re-enabling the
> > tick on systems that no longer have pending SCHED_RT tasks but have
> > multiple runnable SCHED_OTHER tasks:
> > 
> >   dequeue_task_rt()
> >     dequeue_rt_entity()
> >       dequeue_rt_stack()
> >         dequeue_top_rt_rq()
> >         sub_nr_running()	// decrements rq->nr_running
> >           sched_update_tick_dependency()
> >             sched_can_stop_tick()	// checks rq->rt.rt_nr_running,
> >             ...
> >         __dequeue_rt_entity()
> >           dec_rt_tasks()	// decrements rq->rt.rt_nr_running
> >         ...
> > 
> > Every other scheduler class performs the operation in the opposite
> > order, and sched_update_tick_dependency() expects the values to be
> > updated as such. So avoid the misbehaviour by inverting the order in
> > which the above operations are performed in the RT scheduler.
> > 
> 
> I can't see anything wrong with your approach, though I did have to spend
> some time re-learning RT_GROUP_SCHED. The designated Fixes: commit looks
> about right too.
> 
> > Fixes: 76d92ac305f2 ("sched: Migrate sched to use new tick dependency mask model")
> > Signed-off-by: Nicolas Saenz Julienne <nsaenzju@...hat.com>
> 
> Reviewed-by: Valentin Schneider <vschneid@...hat.com>

Thanks!

-- 
Nicolás Sáenz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ