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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180716010457.GA28744@gmail.com>
Date:   Mon, 16 Jul 2018 03:04:57 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     Rik van Riel <riel@...riel.com>
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org, luto@...nel.org,
        dave.hansen@...el.com, kernel-team@...com, efault@....de,
        tglx@...utronix.de, songliubraving@...com, hpa@...or.com
Subject: Re: [PATCH 7/7] x86,switch_mm: skip atomic operations for init_mm


* Rik van Riel <riel@...riel.com> wrote:

> On Mon, 2018-07-16 at 01:04 +0200, Ingo Molnar wrote:
> > * Rik van Riel <riel@...riel.com> wrote:
> > 
> > > +		/*
> > > +		 * Stop remote flushes for the previous mm.
> > > +		 * Skip the idle task; we never send init_mm TLB
> > > flushing IPIs,
> > > +		 * but the bitmap manipulation can cause cache
> > > line contention.
> > > +		 */
> > > +		if (real_prev != &init_mm) {
> > > +			VM_WARN_ON_ONCE(!cpumask_test_cpu(cpu,
> > > +						mm_cpumask(real_pr
> > > ev)));
> > > +			cpumask_clear_cpu(cpu,
> > > mm_cpumask(real_prev));
> > 
> > BTW., could this optimization be (safely) extended to all (or most)
> > !task->mm 
> > kernel threads?
> > 
> > In particular softirq and threaded irq handlers could benefit greatly
> > I suspect in 
> > certain networking intense workloads that happen to active them.
> 
> Yes, it could.
> 
> Are there kernel threads that use something other than
> init_mm today?

Yeah, I think that's the typical case - so at minimum the comment should be fixed:

 > > > +	 * Skip the idle task; we never send init_mm TLB flushing IPIs,

and it should say 'skip kernel threads', right?

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ