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: <20090228163811.48b1de72@infradead.org>
Date:	Sat, 28 Feb 2009 16:38:11 -0800
From:	Arjan van de Ven <arjan@...radead.org>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Andi Kleen <andi@...stfloor.org>,
	David Miller <davem@...emloft.net>,
	torvalds@...ux-foundation.org, mingo@...e.hu,
	nickpiggin@...oo.com.au, sqazi@...gle.com,
	linux-kernel@...r.kernel.org, tglx@...utronix.de
Subject: Re: [patch] x86, mm: pass in 'total' to __copy_from_user_*nocache()

On Sat, 28 Feb 2009 16:28:58 -0800
"H. Peter Anvin" <hpa@...or.com> wrote:

> Andi Kleen wrote:
> >> I think this is an accurate analysis as well, it's really
> >> unfortunate the non-temporal stuff on x86 doesn't preserve
> >> existing cache lines when present.
> >>
> >> I thought that was the whole point.  Don't pollute the caches, but
> >> if cache lines are already loaded there, use them and don't purge!
> > 
> > x86 actually supports that, it's just not done through movnt.
> > 
> > You can do that on x86 by using PREFETCHNTA (or T0/T1/T2 for
> > specific cache levels). Typically this is implemented by forcing
> > the cache line to only a single way of the cache (so only using max
> > 1/8 or so of your last level cache) 
> > 
> > I'm not sure how it interacts with REP MOVS* though, this internally
> > tends to do additional magic for larger copies.
> 
> The PREFETCHNTA stuff is really for reads rather than writes, however.
> Yes, you can prefetch the cache line you're about to overwrite, but I
> suspect (I haven't verified) that you lose out on whole-line
> optimizations that way.

the entire point of using movntq and friends was to save half the
memory bandwidth to not pull it into the cache before writing...
.... so bad idea to do prefetch<anything>

> 
> 	-hpa
> 


-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
--
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