Skip to contentSkip to conversation

shift pages in mmap

QUESTION Konstantin G. Khlebnikov 2 participants 3 messages Aug 11, 2004 – Aug 12, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

how implement fast page alligned shift (cyclic rotate) pages in anonymous mmap ?

--
Konstantin

#1 lore raw
Quoted 2 lines · Konstantin G. Khlebnikov

how implement fast page alligned shift (cyclic rotate) pages in anonymous mmap ?

Do you mean mremap(2) ?

Signature · 3 lines
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
#2 lore raw
Quoted 3 lines
Quoted 3 lines

how implement fast page alligned shift (cyclic rotate) pages in anonymous mmap ?

RvR> Do you mean mremap(2) ?

not exactly, i found remap_file_pages(2) in 2.6

but i already wrote this (mmaped pipe) without any remaping by only mmaping same file twice.

+------------+------------+
|  MAP       |  MAP       |
+------------+------------+
       ^DATADATA^
       |        |
        read ->  write ->

like queue with continuously block for read/write.

--
Konstantin