summaryrefslogtreecommitdiffstats
path: root/mm/userfaultfd.c
diff options
context:
space:
mode:
authorOleg Drokin <green@linuxhacker.ru>2016-06-09 00:33:59 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2016-06-09 23:23:11 +0200
commit18aba41cbfbcd138e9f6d8d446427d8b7691c194 (patch)
treec75be3a413a4fca8c2e0058d75df06a2c22610fa /mm/userfaultfd.c
parentmm: introduce dedicated WQ_MEM_RECLAIM workqueue to do lru_add_drain_all (diff)
downloadlinux-18aba41cbfbcd138e9f6d8d446427d8b7691c194.tar.xz
linux-18aba41cbfbcd138e9f6d8d446427d8b7691c194.zip
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>
Diffstat (limited to 'mm/userfaultfd.c')
0 files changed, 0 insertions, 0 deletions