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]
Date:	Fri, 9 Oct 2015 06:24:22 -0500 (CDT)
From:	Christoph Lameter <cl@...ux.com>
To:	Andy Lutomirski <luto@...capital.net>
cc:	Chris Metcalf <cmetcalf@...hip.com>,
	Luiz Capitulino <lcapitulino@...hat.com>,
	Gilad Ben Yossef <giladb@...hip.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Rik van Riel <riel@...hat.com>, Tejun Heo <tj@...nel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will.deacon@....com>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: crazy idea: big percpu lock (Re: task isolation)

On Thu, 8 Oct 2015, Andy Lutomirski wrote:

> Will this really end up working?  I can see two problems:
>
> 1. It's rather expensive.  For processes that still make syscalls but
> just not many, it means that you're forcibly quiescing every time.

A process that does a lot of syscalls to networking must usually tolerate
nose. Task isolation is for cases where there is no need of much support
by the OS.

> 2. It only really makes sense for work that results from local kernel
> actions, happens once, and won't recur.  I admit that I don't know how
> many of the offenders are like this, but I can imagine there being
> some periodic tasks that could be done locally or remotely with a big
> percpu lock.

The percpu data is used because critical code sections run faster with
data that is not contended. Touching the data remotely causes performance
regression. You do not want that unless the task will stay away for awhile
from OS actions.

> > Or simply ignore the situation until the cpu is entering the
> > kernel again?
>
> Maybe.  I wonder if, for things like vmstat, that would be better in
> general (not just NOHZ).  We have task_work nowadays...

vmstat uses per cpu data that should be local on a processor for
performance reasons. Doing remote write accessses  will cause cache
misses to occur and will result in performance issues.

> > Caches can be useful later again when the process wants to
> > allocate memory etc. We would have to repopulate them if we flush them.
>
> True.  But we don't need to flush them at all until there's memory
> pressure, and the big percpu lock solves this particular problem quite
> nicely -- a remote CPU can simply drain the cache itself instead of
> using an IPI.

You still did not answer me as to why you would want them flushed at all.
Memory reclaim can occur in a number of ways. No need to flush everything.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ