Archive for the ‘memory’ Category

HUGE memory copy

This is from mm/memory.c: copy_huge_page_from_user(), which is to copy memory from userspace to kernel, where the kernel is setup with HUGE page as the page table.

Look at the cond_resched() in the last few lines.

What does that mean? It means the the kernel has voluntarily schedule itself out, and if there are other more urgent process that need to be executed, it will take over the ownership of the CPU to continue execution.

In general, any long or large operation: always introduce cond_resched() to ensure the kernel will not be hijacked by these long running process.


A study in modern computer cache

Simulator / Statistical generator:

and from above many other hardware theories:

Cache coherent protocol:

and many other cache coherent stuff:

This is an entire book on Computer Science:

(or this:

MIT cache related course notes:

eg: (MIT Computer Architecture Group)

Berkeley University related cache resources:

These are cache related resources from CMU:

These are from Princeton:

And this one contains lots of advanced stuff:

%d bloggers like this: