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: <20170406094209.j7zjwxbzgqzh5pt6@hirez.programming.kicks-ass.net>
Date:   Thu, 6 Apr 2017 11:42:09 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        Mike Galbraith <efault@....de>, Ingo Molnar <mingo@...e.hu>,
        "Rafael J . Wysocki" <rjw@...ysocki.net>
Subject: Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU
 mask

On Thu, Apr 06, 2017 at 11:35:45AM +0200, Peter Zijlstra wrote:
> On Thu, Apr 06, 2017 at 10:01:39AM +0200, Ingo Molnar wrote:
> > I.e. just have a counter and these two APIs:
> > 
> >         static inline void migrate_disable(void)
> >         {
> >                 current->migration_disabled++;
> >         }
> > 
> >         ...
> > 
> >         static inline void migrate_enable(void)
> >         {
> >                 current->migration_disabled--;
> >         }
> > 
> > ... and make sure the scheduler migration code plus the CPU hotplug code considers 
> > the counter.
> > 
> > Would this work, and would this be the simplest all around solution?
> 
> If you want to add expensive bits to hot paths like wakeups ... :/

Hmm, doesn't that get us back to exactly where we were: ?

tsk_cpus_allowed() 
{
	if (!tsk->migration_disabled)
		return tsk->cpus_allowed;
	else
		return cpumask_of(task_cpu(tsk));
}


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ