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: <20231026071413.4ed47b0e@gandalf.local.home>
Date:   Thu, 26 Oct 2023 07:14:13 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     LKML <linux-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, akpm@...ux-foundation.org,
        luto@...nel.org, bp@...en8.de, dave.hansen@...ux.intel.com,
        hpa@...or.com, mingo@...hat.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@...cle.com, konrad.wilk@...cle.com,
        jgross@...e.com, andrew.cooper3@...rix.com,
        Joel Fernandes <joel@...lfernandes.org>,
        Youssef Esmat <youssefesmat@...omium.org>,
        Vineeth Pillai <vineethrp@...gle.com>,
        Suleiman Souhlal <suleiman@...gle.com>,
        Ingo Molnar <mingo@...nel.org>,
        Daniel Bristot de Oliveira <bristot@...nel.org>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [POC][RFC][PATCH v2] sched: Extended Scheduler Time Slice

On Thu, 26 Oct 2023 12:59:44 +0200
Peter Zijlstra <peterz@...radead.org> wrote:

> On Wed, Oct 25, 2023 at 11:54:13PM -0400, Steven Rostedt wrote:
> 
> >  static void extend(void)
> >  {
> > 	rseq_map.cr_flags = 1;
> >  }
> > 
> >  static void unextend(void)
> >  {
> > 	unsigned long prev;
> > 
> > 	prev = xchg(&rseq_map.cr_flags, 0);  
> 
> So you complain about overhead and then you add one of the most
> expensive ops possible here? xchg has an implicit LOCK prefix and you
> really don't need LOCK prefix here.

Peter, this is the user space side, where I cut and pasted the code from
the file I attached.

That has:

static inline unsigned long
xchg(volatile unsigned *ptr, unsigned new)
{
        unsigned ret = new;

	asm volatile("xchg %b0,%1"
		     : "+r"(ret), "+m"(*(ptr))
		     : : "memory");
        return ret;
}

-- Steve


> 
> > 	if (prev & 2) {
> > 		tracefs_printf(NULL, "Yield!\n");
> > 		sched_yield();
> > 	}
> >  }  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ