News for hackers. Stuff that matters.
Re:I/O Access Methods for Linux by the8472 on Thursday October 05, 2017 @03:58PM (#15412131)
> Maybe it's assuming a CPU cache and TLB miss on read which means going to the kernel.

My understanding is that those normally don't incur faults that would switch to the kernel context. They're just slow due to several memory lookups that have to be done to satisfy the primary memory access.

Re:I/O Access Methods for Linux by richardwhiuk on Thursday October 05, 2017 @04:59PM (#15412539)
Correct for x86/x64. TLB misses require the CPU to lookup the location in the current active page table which means another memory lookup. I'm not sure how the cache hierarchy works for page table lookups following a TLB miss, but worst case, it's equivalent to an additional L3 cache miss.
Re:I/O Access Methods for Linux by arielweisberg on Thursday October 05, 2017 @04:29PM (#15412354)
Oh interesting. TIL.
Re:I/O Access Methods for Linux by bonzini on Thursday October 05, 2017 @04:57PM (#15412524)
Actually it depends on the processor. Nowadays it's rare, but in the past there used to be software TLBs where a TLB miss did trap into the kernel, and there was no radix tree-like page table structure in the definition of the architecture.

SPARC and MIPS for example worked like this, and server POWER chips had a hashed page table that many OSes populated lazily, effectively treating it like a (more efficient) software TLB.

Re:I/O Access Methods for Linux by namibj on Thursday October 05, 2017 @06:01PM (#15412896)
Well, MIPS is still in widespread use in wifi hardware, and POWER is being resurrected for a scale-up way to deal with a growing database, considering the current generation scales higher at about a similar pricepoint than a 4-socket Intel machine. So I am not sure what the past tense is supposed to mean, if it denotes the architectures to no longer compromise a significant part of world-wide (say DRYSTONE) MIPS, or their lack of use where they are good at (false).
Re:I/O Access Methods for Linux by bonzini on Friday October 06, 2017 @01:27AM (#15414613)
I am not sure about MIPS, but other processors have moved away from either software TLBs or hashed page tables (POWER9 supports tree page tables). Hence the past tense.