Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1715499
| From | Shakeel Butt <shakeelb@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH] mm: fadvise: avoid fadvise for fs without backing device |
| Date | 2017-08-19 01:20 +0200 |
| Message-ID | <ufYIx-1WC-7@gated-at.bofh.it> (permalink) |
| References | <ufEgO-4CU-7@gated-at.bofh.it> <ufEgO-4CU-5@gated-at.bofh.it> <ufX9N-Un-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Aug 18, 2017 at 2:34 PM, Andrew Morton <akpm@linux-foundation.org> wrote: > On Thu, 17 Aug 2017 18:20:17 -0700 Shakeel Butt <shakeelb@google.com> wrote: > >> +linux-mm, linux-kernel >> >> On Thu, Aug 17, 2017 at 6:10 PM, Shakeel Butt <shakeelb@google.com> wrote: >> > The fadvise() manpage is silent on fadvise()'s effect on >> > memory-based filesystems (shmem, hugetlbfs & ramfs) and pseudo >> > file systems (procfs, sysfs, kernfs). The current implementaion >> > of fadvise is mostly a noop for such filesystems except for >> > FADV_DONTNEED which will trigger expensive remote LRU cache >> > draining. This patch makes the noop of fadvise() on such file >> > systems very explicit. >> > >> > However this change has two side effects for ramfs and one for >> > tmpfs. First fadvise(FADV_DONTNEED) can remove the unmapped clean >> > zero'ed pages of ramfs (allocated through read, readahead & read >> > fault) and tmpfs (allocated through read fault). Also >> > fadvise(FADV_WILLNEED) on create such clean zero'ed pages for >> > ramfs. This change removes these two interfaces. >> > > > It doesn't sound like a risky change to me, although perhaps someone is > depending on the current behaviour for obscure reasons, who knows. > > What are the reasons for this change? Is the current behaviour causing > some sort of problem for someone? Yes, one of our generic library does fadvise(FADV_DONTNEED). Recently we observed high latency in fadvise() and notice that the users have started using tmpfs files and the latency was due to expensive remote LRU cache draining. For normal tmpfs files (have data written on them), fadvise(FADV_DONTNEED) will always trigger the un-needed remote cache draining. > >
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [RFC PATCH] mm: fadvise: avoid fadvise for fs without backing device Shakeel Butt <shakeelb@google.com> - 2017-08-18 03:30 +0200
Re: [RFC PATCH] mm: fadvise: avoid fadvise for fs without backing device Andrew Morton <akpm@linux-foundation.org> - 2017-08-18 23:40 +0200
Re: [RFC PATCH] mm: fadvise: avoid fadvise for fs without backing device Shakeel Butt <shakeelb@google.com> - 2017-08-19 01:20 +0200
Re: [RFC PATCH] mm: fadvise: avoid fadvise for fs without backing device Shakeel Butt <shakeelb@google.com> - 2017-08-23 02:30 +0200
csiph-web