Commit 3054e4a3 authored by Kirill Smelkov's avatar Kirill Smelkov

X not touching neighbour block works via setting MADV_RANDOM in last 1/4 of every block

parent 8293025b
...@@ -459,10 +459,17 @@ class tFile: ...@@ -459,10 +459,17 @@ class tFile:
# works slow. # works slow.
# XXX -> make read(while-uploading) wait for uploading to complete # XXX -> make read(while-uploading) wait for uploading to complete
# and only then return? (maybe it will help performance even in normal case) # and only then return? (maybe it will help performance even in normal case)
mm.advise(blkmmap, (mm.MADV_NORMAL, mm.MADV_RANDOM)[blk%2]) #mm.advise(blkmmap, (mm.MADV_NORMAL, mm.MADV_RANDOM)[blk%2])
#mm.advise(blkmmap, (mm.MADV_RANDOM, mm.MADV_NORMAL)[blk%2])
#mm.advise(blkmmap, mm.MADV_NORMAL) #mm.advise(blkmmap, mm.MADV_NORMAL)
#mm.advise(blkmmap, mm.MADV_RANDOM) #mm.advise(blkmmap, mm.MADV_RANDOM)
# XXX vvv works - at the end of every block there is MAD_RANDOM
# range which is wider than RA window (XXX implicit) and so RA
# triggered before that, even if it overlaps with that last 1/4,
# don't trigger RA that overlaps with next block.
mm.advise(blkmmap[len(blkmmap)*3//4:], mm.MADV_RANDOM)
tdb._files.add(t) tdb._files.add(t)
def close(t): def close(t):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment