Re: Kernel code and processor's Cache



David Schwartz <davids@xxxxxxxxxxxxx> writes:
On Apr 11, 2:55 pm, Phil Carmody <thefatphil_demun...@xxxxxxxxxxx>
wrote:

David Schwartz <dav...@xxxxxxxxxxxxx> writes:

Sometimes, but not always. Consider a page fault for an mmap'ed file.

But that would be mapped into the user address space, and wouldn't
be cached in the kernel-specific cache?

That page would *also* be mapped into user address space (with one or
more additional mappings), but so what? How would the cache logic know
whether the next access was going to come from the kernel or user
space.

How does cache logic know if the next read from a page will be an
instruction fetch or a data read? There's nothing new about having
multiple different caches for different purposes on a system.

Phil
--
I find the easiest thing to do is to k/f myself and just troll away
-- David Melville on r.a.s.f1
.



Relevant Pages

  • Re: Kernel code and processors Cache
    ... David Schwartz writes: ... isn't cached in the dedicated kernel cache. ... the kernel code will have to predict whether data is going ...
    (comp.os.linux.development.system)
  • Re: Kernel code and processors Cache
    ... David Schwartz writes: ... What if that cache contained data that had been modified and was ... isn't cached in the dedicated kernel cache. ... have the separate kernel-only cache for security reasons. ...
    (comp.os.linux.development.system)
  • Re: Kernel code and processors Cache
    ... David Schwartz writes: ... SAME processor's caches used for user's applications? ... consider the entire cache dedicated for user's applications? ... if it turned out that putting kernel accesses in cache did more ...
    (comp.os.linux.development.system)
  • Re: Caching control
    ... That's why swapiness defaults to a high value. ... Clean mappings are as ... easy to discard as clean disk cache. ...
    (comp.os.linux.development.system)
  • Re: Move to unshared VMAs in NOMMU mode?
    ... Sharing through the page cache is a nice idea, but it has some limitations, ... Mappings must be made on contiguous regions of CPU physical memory space. ... With ramfs on NOMMU, using truncateto expand a zero length file ...
    (Linux-Kernel)