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] [day] [month] [year] [list]
Message-ID: <20250212151859.pHAFF1Xj@linutronix.de>
Date: Wed, 12 Feb 2025 16:18:59 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Joel Fernandes <joel@...lfernandes.org>,
	Prakash Sangappa <prakash.sangappa@...cle.com>,
	Peter Zijlstra <peterz@...radead.org>, linux-kernel@...r.kernel.org,
	linux-trace-kernel@...r.kernel.org,
	Thomas Gleixner <tglx@...utronix.de>,
	Ankur Arora <ankur.a.arora@...cle.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>, linux-mm@...ck.org,
	x86@...nel.org, Andrew Morton <akpm@...ux-foundation.org>,
	luto@...nel.org, bp@...en8.de, dave.hansen@...ux.intel.com,
	hpa@...or.com, juri.lelli@...hat.com, vincent.guittot@...aro.org,
	willy@...radead.org, mgorman@...e.de, jon.grimm@....com,
	bharata@....com, raghavendra.kt@....com,
	Boris Ostrovsky <boris.ostrovsky@...cle.com>,
	Konrad Wilk <konrad.wilk@...cle.com>, jgross@...e.com,
	Andrew.Cooper3@...rix.com, Vineeth Pillai <vineethrp@...gle.com>,
	Suleiman Souhlal <suleiman@...gle.com>,
	Ingo Molnar <mingo@...nel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Clark Williams <clark.williams@...il.com>, daniel.wagner@...e.com,
	Joseph Salisbury <joseph.salisbury@...cle.com>, broonie@...il.com
Subject: Re: [RFC][PATCH 1/2] sched: Extended scheduler time slice

On 2025-02-12 10:00:01 [-0500], Steven Rostedt wrote:
> On Wed, 12 Feb 2025 13:11:13 +0100
> Sebastian Andrzej Siewior <bigeasy@...utronix.de> wrote:
> > > IIUC, today, LAZY causes all SCHED_OTHER tasks to act more like
> > > PREEMPT_NONE. Is that correct?  
> > 
> > Well. First sched-tick will set the LAZY bit, the second sched-tick
> > forces a resched.
> > On PREEMPT_NONE the sched-tick would be set NEED_RESCHED while nothing
> > will force a resched until the task decides to do schedule() on its own.
> > So it is slightly different for kernel threads.
> 
> Except that it should schedule on a cond_resched() and the point of adding
> LAZY was to get rid of all the cond_resched() which in turn gets rid of the
> need for PREEMPT_NONE. Which was what I was getting at. That PREEMPT_LAZY
> is really just NONE without the need to sprinkle cond_resched() all over
> the kernel. Instead of having cond_resched(), we just wait for the next
> tick.

I would argue that we want to get out of the kernel asap and not
schedule() if we stumble upon cond_resched().

> > Unless we talk about userland, here we would have a resched on the
> > return to userland after the sched-tick LAZY or NONE does not matter.
> > 
> > > Now that the PREEMPT_RT is not one of the preemption selections, when you
> > > select PREEMPT_RT, you can pick between CONFIG_PREEMPT and
> > > CONFIG_PREEMPT_LAZY. Where CONFIG_PREEMPT will preempt the kernel at the
> > > scheduler tick if preemption is enabled and CONFIG_PREEMPT_LAZY will
> > > not preempt the kernel on a scheduler tick and wait for exit to user space.  
> > 
> > This is not specific to RT but FULL vs LAZY. But yes. However the second
> 
> Not true. PREEMPT_RT use to enable PREEMPT_FULL as well (it would preempt
> everywhere). The issue we found was that spin_locks which would not have
> been preempted by just FULL alone were being preempted when RT was enabled.
> That caused a lot more contention with spin locks in the kernel.
> 
> That is PREEMPT_RT with PREEMPT_FULL will have a noticeable performance
> degradation compared to just PREEMPT_FULL alone.

okay.

> > sched-tick will force preemption point even without the
> > exit-to-userland.
> > 
> 
> My question still stands. Have you compared PREEMPT_FULL with and without
> PREEMPT_RT?

No I have not.

> -- Steve

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ