Sven Barth wrote:
Am 09.02.2012 11:45, schrieb Lukasz Sokol:
On 09/02/2012 10:01, Sven Barth wrote:

The memory that is used by CPU caches is the fastest (but also the
most expensive that's why it's only used for the relatively small
caches).

Regards, Sven

Is there a way for a non-kernel-developer or plain FPC/Laz user to
control what is stored in cpu cache ? I thought cache management
is done transparently to userspace...?

Yes, it's transparent. But my answer wasn't related to whether the memory can be controlled by the user or not, but whether it's the fastest or not.

Btw: In FPC you can use "Prefetch(SomeVariable)" to prefetch the data of the variable into the cache (if the platform supports something like that). See also: http://www.freepascal.org/docs-html/rtl/system/prefetch.html

But you're still likely to be screwed if the OS preempts between prefetch and use. Not only will the data have been flushed, but you've wasted the time executing the procedure.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to