Re: instruction cache footprint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At one place it was written about inline function
"it increases the code size which increases memory consumption and
instruction cache footprint"

what is instruction cache footprint?? Can anyone please explain this to me.

An instruction Cache keeps track of last accessed instructions,
in order to save future memory accesses to them.
memory accesses are expensive, they can take hundreds of clock cycles.
On the other hand, cache accesses are fast. they can take from very
few clock cycles to a few dozens, mainly depending on which cache it
is (L1 or L2).
anyway it is much more efficient than memory accesses.

Caches are very limited in size. in general, if you have the very same
instruction
in several different addresses, you may end up with the cache holding it
in several different blocks, which is a waste, because instead it could
hold some other instruction.

If you inline, you get to have the same instructions over and over in
many different memory addresses. caches differentiate between instructions
by their address, so as i said you may end up with this instruction(s) cached up
too many times.

I guess this is what the author meant.

HTH,
ohad.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux