News for hackers. Stuff that matters.
Re:Using select(2) the right way by valarauca1 on Monday June 05, 2017 @10:45AM (#14487932)
systems calls on linux that deal with per-process state try very hard to not invalidate userland memory mappings.

The kernels real range and userland's virtual range won't overlap so for a lot of functions kernel memory just has to mapped/unmapped on call, not invalidate _all_ userland bindings.

Well okay they will overlap. So yeah your mappings may get invalidated but for synchronized higher performance systems calls they _shouldnt_.

This lets them be in the 10's to 100's of nano-seconds.

Normally the most _expensive_ part of a linux syscall is the TLB misses after one.

---

Your model of memory transfer size assumes data is being copied.

The Linux kernel has a lot of features to let userland, devices, and itself all share the same memory copy free.

Re:Using select(2) the right way by koverstreet on Tuesday June 06, 2017 @01:53AM (#14495071)
This is wrong.

Kernel address space and userspace address space don't overlap at all. There's zero mucking with memory mappings, TLB etc. on syscall.