mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* decrease L2 cache size used by Linux?
@ 2007-03-16 16:13 Guerreiro da Luz
  2007-03-16 17:28 ` Alan Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Guerreiro da Luz @ 2007-03-16 16:13 UTC (permalink / raw)
  To: linux-kernel

Am benchmarking dumb matrix multiplication in trying to perceive
performance drop in case when matrix cannot fit in L2 cache.  However,
on my machine L2 cache is large - 2MB, so 512x512 matrix of double
numbers is needed to fill the cache, and in that case multiplication
is taking rather long time.  So I'm wondering is there a way to
control (decrease) L2 cache size used by Linux?  Apologies if question
inappropriate for the list.

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: decrease L2 cache size used by Linux?
  2007-03-16 16:13 decrease L2 cache size used by Linux? Guerreiro da Luz
@ 2007-03-16 17:28 ` Alan Cox
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Cox @ 2007-03-16 17:28 UTC (permalink / raw)
  To: Guerreiro da Luz; +Cc: linux-kernel

> Am benchmarking dumb matrix multiplication in trying to perceive
> performance drop in case when matrix cannot fit in L2 cache.  However,
> on my machine L2 cache is large - 2MB, so 512x512 matrix of double
> numbers is needed to fill the cache, and in that case multiplication
> is taking rather long time.  So I'm wondering is there a way to
> control (decrease) L2 cache size used by Linux?  Apologies if question
> inappropriate for the list.

Not easily, but on the other hand if your process is taking a long time
you ought to get better and more reproducable results. Cache management
is mostly done by the processor not by the OS so you have little control
over pinning bits of it.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* decrease L2 cache size used by Linux?
@ 2007-03-16 21:55 Al Boldi
  0 siblings, 0 replies; 3+ messages in thread
From: Al Boldi @ 2007-03-16 21:55 UTC (permalink / raw)
  To: linux-kernel

Guerreiro da Luz wrote:
> Am benchmarking dumb matrix multiplication in trying to perceive
> performance drop in case when matrix cannot fit in L2 cache.  However,
> on my machine L2 cache is large - 2MB, so 512x512 matrix of double
> numbers is needed to fill the cache, and in that case multiplication
> is taking rather long time.  So I'm wondering is there a way to
> control (decrease) L2 cache size used by Linux?  Apologies if question
> inappropriate for the list.

You may want to turn off randomization,
 
echo 0 > /proc/sys/kernel/randomize_va_space
echo 1 > /proc/sys/vm/vdso_enabled

And see if that helps.


Thanks!

--
Al


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-03-16 21:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-16 16:13 decrease L2 cache size used by Linux? Guerreiro da Luz
2007-03-16 17:28 ` Alan Cox
2007-03-16 21:55 Al Boldi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®