linux/mm
Oleg Drokin 18aba41cbf mm/fadvise.c: do not discard partial pages with POSIX_FADV_DONTNEED
I noticed that the logic in the fadvise64_64 syscall is incorrect for
partial pages.  While first page of the region is correctly skipped if
it is partial, the last page of the region is mistakenly discarded.
This leads to problems for applications that read data in
non-page-aligned chunks discarding already processed data between the
reads.

A somewhat misguided application that does something like write(XX bytes
(non-page-alligned)); drop the data it just wrote; repeat gets a
significant penalty in performance as a result.

Link: http://lkml.kernel.org/r/1464917140-1506698-1-git-send-email-green@linuxhacker.ru
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-06-09 14:23:11 -07:00
..
kasan kasan: change memory hot-add error messages to info messages 2016-06-09 14:23:11 -07:00
backing-dev.c
balloon_compaction.c
bootmem.c
cleancache.c
cma.c mm/cma: silence warnings due to max() usage 2016-05-27 14:49:37 -07:00
cma.h
cma_debug.c
compaction.c
debug.c
debug_page_ref.c
dmapool.c
early_ioremap.c
fadvise.c mm/fadvise.c: do not discard partial pages with POSIX_FADV_DONTNEED 2016-06-09 14:23:11 -07:00
failslab.c
filemap.c Filesystem DAX locking for 4.7 2016-05-26 20:00:28 -07:00
frame_vector.c
frontswap.c
gup.c
highmem.c
huge_memory.c
hugetlb.c mm/hugetlb: fix huge page reserve accounting for private mappings 2016-06-09 14:23:11 -07:00
hugetlb_cgroup.c
hwpoison-inject.c
init-mm.c
internal.h
interval_tree.c
Kconfig mm: disable DEFERRED_STRUCT_PAGE_INIT on !NO_BOOTMEM 2016-05-27 14:49:37 -07:00
Kconfig.debug
kmemcheck.c
kmemleak-test.c
kmemleak.c
ksm.c
list_lru.c
maccess.c
madvise.c
Makefile
memblock.c
memcontrol.c revert "mm: memcontrol: fix possible css ref leak on oom" 2016-06-09 14:23:11 -07:00
memory-failure.c
memory.c Filesystem DAX locking for 4.7 2016-05-26 20:00:28 -07:00
memory_hotplug.c mm: fix section mismatch warning 2016-05-27 15:23:32 -07:00
mempolicy.c
mempool.c
memtest.c
migrate.c
mincore.c
mlock.c
mm_init.c
mmap.c mm: remove more IS_ERR_VALUE abuses 2016-05-27 15:57:31 -07:00
mmu_context.c
mmu_notifier.c
mmzone.c
mprotect.c
mremap.c
msync.c
nobootmem.c
nommu.c mm: remove more IS_ERR_VALUE abuses 2016-05-27 15:57:31 -07:00
oom_kill.c mm, oom_reaper: do not use siglock in try_oom_reaper() 2016-06-03 16:02:56 -07:00
page-writeback.c
page_alloc.c mm, page_alloc: recalculate the preferred zoneref if the context can ignore memory policies 2016-06-03 16:02:57 -07:00
page_counter.c
page_ext.c mm: use early_pfn_to_nid in page_ext_init 2016-05-27 14:49:37 -07:00
page_idle.c
page_io.c
page_isolation.c
page_owner.c mm: check the return value of lookup_page_ext for all call sites 2016-06-03 15:06:22 -07:00
page_poison.c mm: check the return value of lookup_page_ext for all call sites 2016-06-03 15:06:22 -07:00
pagewalk.c
percpu-km.c
percpu-vm.c
percpu.c
pgtable-generic.c
process_vm_access.c
quicklist.c
readahead.c
rmap.c mm: thp: avoid false positive VM_BUG_ON_PAGE in page_move_anon_rmap() 2016-05-27 14:49:37 -07:00
shmem.c switch xattr_handler->set() to passing dentry and inode separately 2016-05-27 15:39:43 -04:00
slab.c
slab.h
slab_common.c
slob.c
slub.c
sparse-vmemmap.c
sparse.c
swap.c mm: introduce dedicated WQ_MEM_RECLAIM workqueue to do lru_add_drain_all 2016-06-09 14:23:11 -07:00
swap_cgroup.c
swap_state.c mm: thp: broken page count after commit aa88b68c3b 2016-06-09 14:23:11 -07:00
swapfile.c
truncate.c
userfaultfd.c
util.c
vmacache.c
vmalloc.c mm: fix overflow in vm_map_ram() 2016-06-03 15:06:22 -07:00
vmpressure.c
vmscan.c
vmstat.c mm: check the return value of lookup_page_ext for all call sites 2016-06-03 15:06:22 -07:00
workingset.c
z3fold.c mm/z3fold.c: avoid modifying HEADLESS page and minor cleanup 2016-06-03 16:02:55 -07:00
zbud.c
zpool.c
zsmalloc.c update "mm/zsmalloc: don't fail if can't create debugfs info" 2016-05-26 15:35:44 -07:00
zswap.c