id summary reporter owner description type status priority milestone component version severity resolution keywords cc mlocked 9458 [PATCH] posix_fadvice usage jiri.fojtasek@… danielk "Goal of this patch is fix issues introduced by latest changes to page cache management and to have page cache under our control much as posible. threadedfilewriter fixes: - We need toss only writen portion of the data from the pagecache, since the same file may be used by ringbuffer (live tv play). This bug marked any posix_fadvice optimisation changes to the ringuffer useless because it doing only unnecessarily disk io (see ringbuffer fixes). - Changed order of syncer and writer thread termination in order to correctly toss remaining portion of unused page cache. ringbuffer fixes: - POSIX_FADV_WILLNEED called after a seek with 1MB size is useless since read() may be called immediately, so this may cause only unnecessarily disk io. Linux OS have already its own readahead algorithm so lets tweak it by blockdev --setra - Marking whole portion of the file in pagecache as unused is useless since more frontends may read the file at same time and this will negate OS readahead effeciency (another unnecessarily disk io) - In main readahead loop mark as unused only portion of the pagecache we used in last read (more frontends may read the same file). - When the file is closed mark whole pagecache unused, since we do not have explicit control to what is filled by OS readahead. This may flush pagecace for other readers but this not happen often so this payoff is acceptable. Jiri" Patch - Bug Fix closed minor 0.25 MythTV - General Master Head medium Fixed 0