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: <20231102160319.4rjz7ujq@linutronix.de>
Date:   Thu, 2 Nov 2023 17:03:19 +0100
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     Juri Lelli <juri.lelli@...hat.com>
Cc:     linux-kernel@...r.kernel.org, Ben Segall <bsegall@...gle.com>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Frederic Weisbecker <frederic@...nel.org>,
        Ingo Molnar <mingo@...hat.com>,
        John Stultz <jstultz@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Stephen Boyd <sboyd@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Valentin Schneider <vschneid@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>
Subject: Re: [RFC PATCH 1/3] sched/core: Provide a method to check if a task
 is PI-boosted.

On 2023-11-02 10:30:50 [+0100], Juri Lelli wrote:
> Hi,
Hi,

> Apologies for noticing only now, but I believe this is still part of the
> 6.6-rt patches and I've got the below question to ask.

I'm not sure if we want this. I do have an alternative solution in the
meantime.

> > --- a/kernel/sched/core.c
> > +++ b/kernel/sched/core.c
> > @@ -8886,6 +8886,21 @@ static inline void preempt_dynamic_init(void) { }
> >  
> >  #endif /* #ifdef CONFIG_PREEMPT_DYNAMIC */
> >  
> > +/*
> > + * task_is_pi_boosted - Check if task has been PI boosted.
> > + * @p:	Task to check.
> > + *
> > + * Return true if task is subject to priority inheritance.
> > + */
> > +bool task_is_pi_boosted(const struct task_struct *p)
> > +{
> > +	int prio = p->prio;
> > +
> > +	if (!rt_prio(prio))
> > +		return false;
> > +	return prio != p->normal_prio;
> 
> Does this need to also take DEADLINE tasks into consideration? We don't
> change priority when they are boosted, only pi_se changes (please check
> is_dl_boosted()).

If we want this, then probably yes.
Isn't task_struct::prio for the DL (boosted) task set to 0? While the RT
priority go from 1…MAX_RT_PRIO - 1.
 
> Thanks,
> Juri

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ