* [PATCH] madvise.2: madvise(, , MADV_REMOVE) supports ext4, ocfs2 and xfs as well
@ 2014-10-18 15:22 Jan Chaloupka
[not found] ` <20141018152240.14951.14405.stgit-/v0jm+aXwyk2pP1PFFXgSPXAX3CI6PSWQQ4Iyu8u01E@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Jan Chaloupka @ 2014-10-18 15:22 UTC (permalink / raw)
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, jchaloup-H+wXaHxf7aLQT0dZR+AlfA,
hughd-hpIqsD4AKlfQT0dZR+AlfA
As from upstream commit:
commit 3f31d07571eeea18a7d34db9af21d2285b807a17
Author: Hugh Dickins <hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Date: Tue May 29 15:06:40 2012 -0700
mm/fs: route MADV_REMOVE to FALLOC_FL_PUNCH_HOLE
Now tmpfs supports hole-punching via fallocate(), switch madvise_remove()
to use do_fallocate() instead of vmtruncate_range(): which extends
madvise(,,MADV_REMOVE) support from tmpfs to ext4, ocfs2 and xfs.
madvise(,,MADV_REMOVE) support was extended by ext4, ocfs2 and xfs.
bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1120294
Justification from Rafael Aquini:
Well, that code is committed in kernel since v3.5 (2012) and it surely is
the expected behaviour since. It seems to me that madvise(2) man page text
for MADV_REMOVE just got out-of-date in that regard.
This patch mentions this support in madvise.2 man page.
Reworded and corrected by Michael Kerrisk and Hugh Dickins. Thank you.
Signed-off-by: Jan Chaloupka <jchaloup-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
man2/madvise.2 | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/man2/madvise.2 b/man2/madvise.2
index 032ead7..b955864 100644
--- a/man2/madvise.2
+++ b/man2/madvise.2
@@ -101,11 +101,18 @@ without an underlying file.
.BR MADV_REMOVE " (since Linux 2.6.16)"
Free up a given range of pages
and its associated backing store.
-Currently,
-.\" 2.6.18-rc5
-only shmfs/tmpfs supports this; other filesystems return with the
-error
-.BR ENOSYS .
+Originally, only shmfs/tmpfs supported this; but since Linux 3.5,
+any filesystem which supports the
+.BR fallocate(2)
+mode
+.BR FALLOC_FL_PUNCH_HOLE
+also supports the
+.BR madvise(2)
+advice
+.BR MADV_REMOVE .
+Other filesystems return with the
+.BR EOPNOTSUPP
+error.
.\" Databases want to use this feature to drop a section of their
.\" bufferpool (shared memory segments) - without writing back to
.\" disk/swap space. This feature is also useful for supporting
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 10+ messages in thread[parent not found: <20141018152240.14951.14405.stgit-/v0jm+aXwyk2pP1PFFXgSPXAX3CI6PSWQQ4Iyu8u01E@public.gmane.org>]
* Re: [PATCH] madvise.2: madvise(, , MADV_REMOVE) supports ext4, ocfs2 and xfs as well [not found] ` <20141018152240.14951.14405.stgit-/v0jm+aXwyk2pP1PFFXgSPXAX3CI6PSWQQ4Iyu8u01E@public.gmane.org> @ 2014-10-22 8:41 ` Jan Chaloupka 2015-02-04 9:28 ` Michael Kerrisk (man-pages) 1 sibling, 0 replies; 10+ messages in thread From: Jan Chaloupka @ 2014-10-22 8:41 UTC (permalink / raw) To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, hughd-hpIqsD4AKlfQT0dZR+AlfA ping On 10/18/2014 05:22 PM, Jan Chaloupka wrote: > As from upstream commit: > > commit 3f31d07571eeea18a7d34db9af21d2285b807a17 > Author: Hugh Dickins <hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> > Date: Tue May 29 15:06:40 2012 -0700 > > mm/fs: route MADV_REMOVE to FALLOC_FL_PUNCH_HOLE > > Now tmpfs supports hole-punching via fallocate(), switch madvise_remove() > to use do_fallocate() instead of vmtruncate_range(): which extends > madvise(,,MADV_REMOVE) support from tmpfs to ext4, ocfs2 and xfs. > > madvise(,,MADV_REMOVE) support was extended by ext4, ocfs2 and xfs. > > bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1120294 > > Justification from Rafael Aquini: > Well, that code is committed in kernel since v3.5 (2012) and it surely is > the expected behaviour since. It seems to me that madvise(2) man page text > for MADV_REMOVE just got out-of-date in that regard. > > This patch mentions this support in madvise.2 man page. > > Reworded and corrected by Michael Kerrisk and Hugh Dickins. Thank you. > > Signed-off-by: Jan Chaloupka <jchaloup-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > --- > man2/madvise.2 | 17 ++++++++++++----- > 1 file changed, 12 insertions(+), 5 deletions(-) > > diff --git a/man2/madvise.2 b/man2/madvise.2 > index 032ead7..b955864 100644 > --- a/man2/madvise.2 > +++ b/man2/madvise.2 > @@ -101,11 +101,18 @@ without an underlying file. > .BR MADV_REMOVE " (since Linux 2.6.16)" > Free up a given range of pages > and its associated backing store. > -Currently, > -.\" 2.6.18-rc5 > -only shmfs/tmpfs supports this; other filesystems return with the > -error > -.BR ENOSYS . > +Originally, only shmfs/tmpfs supported this; but since Linux 3.5, > +any filesystem which supports the > +.BR fallocate(2) > +mode > +.BR FALLOC_FL_PUNCH_HOLE > +also supports the > +.BR madvise(2) > +advice > +.BR MADV_REMOVE . > +Other filesystems return with the > +.BR EOPNOTSUPP > +error. > .\" Databases want to use this feature to drop a section of their > .\" bufferpool (shared memory segments) - without writing back to > .\" disk/swap space. This feature is also useful for supporting > -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] madvise.2: madvise(, , MADV_REMOVE) supports ext4, ocfs2 and xfs as well [not found] ` <20141018152240.14951.14405.stgit-/v0jm+aXwyk2pP1PFFXgSPXAX3CI6PSWQQ4Iyu8u01E@public.gmane.org> 2014-10-22 8:41 ` Jan Chaloupka @ 2015-02-04 9:28 ` Michael Kerrisk (man-pages) [not found] ` <CAKgNAkg_cOKFC_Mjmn+EjLr4PDnb2GKRq7BhKaEpdks9tgSa9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 1 sibling, 1 reply; 10+ messages in thread From: Michael Kerrisk (man-pages) @ 2015-02-04 9:28 UTC (permalink / raw) To: Jan Chaloupka; +Cc: linux-man, Hugh Dickins Hello Jan, On 18 October 2014 at 17:22, Jan Chaloupka <jchaloup-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote: > As from upstream commit: > > commit 3f31d07571eeea18a7d34db9af21d2285b807a17 > Author: Hugh Dickins <hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> > Date: Tue May 29 15:06:40 2012 -0700 > > mm/fs: route MADV_REMOVE to FALLOC_FL_PUNCH_HOLE > > Now tmpfs supports hole-punching via fallocate(), switch madvise_remove() > to use do_fallocate() instead of vmtruncate_range(): which extends > madvise(,,MADV_REMOVE) support from tmpfs to ext4, ocfs2 and xfs. > > madvise(,,MADV_REMOVE) support was extended by ext4, ocfs2 and xfs. > > bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1120294 > > Justification from Rafael Aquini: > Well, that code is committed in kernel since v3.5 (2012) and it surely is > the expected behaviour since. It seems to me that madvise(2) man page text > for MADV_REMOVE just got out-of-date in that regard. > > This patch mentions this support in madvise.2 man page. > > Reworded and corrected by Michael Kerrisk and Hugh Dickins. Thank you. Sorry for the delay. I've applied this patch (and tweaked it a little, but not in essential details). Not yet pushed to kernel.,org yet. Cheers, Michael > Signed-off-by: Jan Chaloupka <jchaloup-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > --- > man2/madvise.2 | 17 ++++++++++++----- > 1 file changed, 12 insertions(+), 5 deletions(-) > > diff --git a/man2/madvise.2 b/man2/madvise.2 > index 032ead7..b955864 100644 > --- a/man2/madvise.2 > +++ b/man2/madvise.2 > @@ -101,11 +101,18 @@ without an underlying file. > .BR MADV_REMOVE " (since Linux 2.6.16)" > Free up a given range of pages > and its associated backing store. > -Currently, > -.\" 2.6.18-rc5 > -only shmfs/tmpfs supports this; other filesystems return with the > -error > -.BR ENOSYS . > +Originally, only shmfs/tmpfs supported this; but since Linux 3.5, > +any filesystem which supports the > +.BR fallocate(2) > +mode > +.BR FALLOC_FL_PUNCH_HOLE > +also supports the > +.BR madvise(2) > +advice > +.BR MADV_REMOVE . > +Other filesystems return with the > +.BR EOPNOTSUPP > +error. > .\" Databases want to use this feature to drop a section of their > .\" bufferpool (shared memory segments) - without writing back to > .\" disk/swap space. This feature is also useful for supporting > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <CAKgNAkg_cOKFC_Mjmn+EjLr4PDnb2GKRq7BhKaEpdks9tgSa9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] madvise.2: madvise(, , MADV_REMOVE) supports ext4, ocfs2 and xfs as well [not found] ` <CAKgNAkg_cOKFC_Mjmn+EjLr4PDnb2GKRq7BhKaEpdks9tgSa9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2015-02-04 9:39 ` Jan Chaloupka 0 siblings, 0 replies; 10+ messages in thread From: Jan Chaloupka @ 2015-02-04 9:39 UTC (permalink / raw) To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man, Hugh Dickins Hi Michael, On 02/04/2015 10:28 AM, Michael Kerrisk (man-pages) wrote: > Hello Jan, > > On 18 October 2014 at 17:22, Jan Chaloupka <jchaloup-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote: >> As from upstream commit: >> >> commit 3f31d07571eeea18a7d34db9af21d2285b807a17 >> Author: Hugh Dickins <hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> >> Date: Tue May 29 15:06:40 2012 -0700 >> >> mm/fs: route MADV_REMOVE to FALLOC_FL_PUNCH_HOLE >> >> Now tmpfs supports hole-punching via fallocate(), switch madvise_remove() >> to use do_fallocate() instead of vmtruncate_range(): which extends >> madvise(,,MADV_REMOVE) support from tmpfs to ext4, ocfs2 and xfs. >> >> madvise(,,MADV_REMOVE) support was extended by ext4, ocfs2 and xfs. >> >> bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1120294 >> >> Justification from Rafael Aquini: >> Well, that code is committed in kernel since v3.5 (2012) and it surely is >> the expected behaviour since. It seems to me that madvise(2) man page text >> for MADV_REMOVE just got out-of-date in that regard. >> >> This patch mentions this support in madvise.2 man page. >> >> Reworded and corrected by Michael Kerrisk and Hugh Dickins. Thank you. > Sorry for the delay. I've applied this patch (and tweaked it a little, but > not in essential details). Not yet pushed to kernel.,org yet. Thanks :) > Cheers, > > Michael > > >> Signed-off-by: Jan Chaloupka <jchaloup-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> >> --- >> man2/madvise.2 | 17 ++++++++++++----- >> 1 file changed, 12 insertions(+), 5 deletions(-) >> >> diff --git a/man2/madvise.2 b/man2/madvise.2 >> index 032ead7..b955864 100644 >> --- a/man2/madvise.2 >> +++ b/man2/madvise.2 >> @@ -101,11 +101,18 @@ without an underlying file. >> .BR MADV_REMOVE " (since Linux 2.6.16)" >> Free up a given range of pages >> and its associated backing store. >> -Currently, >> -.\" 2.6.18-rc5 >> -only shmfs/tmpfs supports this; other filesystems return with the >> -error >> -.BR ENOSYS . >> +Originally, only shmfs/tmpfs supported this; but since Linux 3.5, >> +any filesystem which supports the >> +.BR fallocate(2) >> +mode >> +.BR FALLOC_FL_PUNCH_HOLE >> +also supports the >> +.BR madvise(2) >> +advice >> +.BR MADV_REMOVE . >> +Other filesystems return with the >> +.BR EOPNOTSUPP >> +error. >> .\" Databases want to use this feature to drop a section of their >> .\" bufferpool (shared memory segments) - without writing back to >> .\" disk/swap space. This feature is also useful for supporting >> > > -- Jan Chaloupka ------------------------------ * Software Engineer * * ENG Base Operating Systems * * Red Hat Czech, s. r. o. * * UTC+1 (CET), jchaloup * -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] madvise.2: madvise(, , MADV_REMOVE) supports ext4, ocfs2 and xfs as well
@ 2014-10-07 14:03 Jan Chaloupka
[not found] ` <20141007140337.10571.62743.stgit-/v0jm+aXwyk2pP1PFFXgSPXAX3CI6PSWQQ4Iyu8u01E@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Jan Chaloupka @ 2014-10-07 14:03 UTC (permalink / raw)
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, jchaloup-H+wXaHxf7aLQT0dZR+AlfA,
hughd-hpIqsD4AKlfQT0dZR+AlfA
As from upstream commit:
commit 3f31d07571eeea18a7d34db9af21d2285b807a17
Author: Hugh Dickins <hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Date: Tue May 29 15:06:40 2012 -0700
mm/fs: route MADV_REMOVE to FALLOC_FL_PUNCH_HOLE
Now tmpfs supports hole-punching via fallocate(), switch madvise_remove()
to use do_fallocate() instead of vmtruncate_range(): which extends
madvise(,,MADV_REMOVE) support from tmpfs to ext4, ocfs2 and xfs.
madvise(,,MADV_REMOVE) support was extended by ext4, ocfs2 and xfs.
bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1120294
Justification from Rafael Aquini:
Well, that code is committed in kernel since v3.5 (2012) and it surely is
the expected behaviour since. It seems to me that madvise(2) man page text
for MADV_REMOVE just got out-of-date in that regard.
This patch mentions this support in madvise.2 man page.
Signed-off-by: Jan Chaloupka <jchaloup-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
man2/madvise.2 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/man2/madvise.2 b/man2/madvise.2
index 032ead7..44698ec 100644
--- a/man2/madvise.2
+++ b/man2/madvise.2
@@ -98,12 +98,12 @@ either in reloading of the memory contents from the underlying mapped file
or zero-fill-on-demand pages for mappings
without an underlying file.
.TP
-.BR MADV_REMOVE " (since Linux 2.6.16)"
+.BR MADV_REMOVE " (since Linux 3.5)"
Free up a given range of pages
and its associated backing store.
Currently,
.\" 2.6.18-rc5
-only shmfs/tmpfs supports this; other filesystems return with the
+only shmfs/tmpfs, ext4, ocfs2 and xfs supports this; other filesystems return with the
error
.BR ENOSYS .
.\" Databases want to use this feature to drop a section of their
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 10+ messages in thread[parent not found: <20141007140337.10571.62743.stgit-/v0jm+aXwyk2pP1PFFXgSPXAX3CI6PSWQQ4Iyu8u01E@public.gmane.org>]
* Re: [PATCH] madvise.2: madvise(, , MADV_REMOVE) supports ext4, ocfs2 and xfs as well [not found] ` <20141007140337.10571.62743.stgit-/v0jm+aXwyk2pP1PFFXgSPXAX3CI6PSWQQ4Iyu8u01E@public.gmane.org> @ 2014-10-13 8:24 ` Jan Chaloupka 2014-10-16 10:50 ` Jan Chaloupka 2014-10-17 14:35 ` Michael Kerrisk (man-pages) 2 siblings, 0 replies; 10+ messages in thread From: Jan Chaloupka @ 2014-10-13 8:24 UTC (permalink / raw) To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, hughd-hpIqsD4AKlfQT0dZR+AlfA ping On 10/07/2014 04:03 PM, Jan Chaloupka wrote: > As from upstream commit: > > commit 3f31d07571eeea18a7d34db9af21d2285b807a17 > Author: Hugh Dickins <hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> > Date: Tue May 29 15:06:40 2012 -0700 > > mm/fs: route MADV_REMOVE to FALLOC_FL_PUNCH_HOLE > > Now tmpfs supports hole-punching via fallocate(), switch madvise_remove() > to use do_fallocate() instead of vmtruncate_range(): which extends > madvise(,,MADV_REMOVE) support from tmpfs to ext4, ocfs2 and xfs. > > madvise(,,MADV_REMOVE) support was extended by ext4, ocfs2 and xfs. > > bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1120294 > > Justification from Rafael Aquini: > Well, that code is committed in kernel since v3.5 (2012) and it surely is > the expected behaviour since. It seems to me that madvise(2) man page text > for MADV_REMOVE just got out-of-date in that regard. > > This patch mentions this support in madvise.2 man page. > > Signed-off-by: Jan Chaloupka <jchaloup-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > --- > man2/madvise.2 | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/man2/madvise.2 b/man2/madvise.2 > index 032ead7..44698ec 100644 > --- a/man2/madvise.2 > +++ b/man2/madvise.2 > @@ -98,12 +98,12 @@ either in reloading of the memory contents from the underlying mapped file > or zero-fill-on-demand pages for mappings > without an underlying file. > .TP > -.BR MADV_REMOVE " (since Linux 2.6.16)" > +.BR MADV_REMOVE " (since Linux 3.5)" > Free up a given range of pages > and its associated backing store. > Currently, > .\" 2.6.18-rc5 > -only shmfs/tmpfs supports this; other filesystems return with the > +only shmfs/tmpfs, ext4, ocfs2 and xfs supports this; other filesystems return with the > error > .BR ENOSYS . > .\" Databases want to use this feature to drop a section of their > -- Jan Chaloupka ------------------------------ * Software Engineer * * ENG Base Operating Systems * * Red Hat Czech, s. r. o. * * UTC+1 (CET), jchaloup * -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] madvise.2: madvise(, , MADV_REMOVE) supports ext4, ocfs2 and xfs as well [not found] ` <20141007140337.10571.62743.stgit-/v0jm+aXwyk2pP1PFFXgSPXAX3CI6PSWQQ4Iyu8u01E@public.gmane.org> 2014-10-13 8:24 ` Jan Chaloupka @ 2014-10-16 10:50 ` Jan Chaloupka 2014-10-17 14:35 ` Michael Kerrisk (man-pages) 2 siblings, 0 replies; 10+ messages in thread From: Jan Chaloupka @ 2014-10-16 10:50 UTC (permalink / raw) To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, hughd-hpIqsD4AKlfQT0dZR+AlfA ping On 10/07/2014 04:03 PM, Jan Chaloupka wrote: > As from upstream commit: > > commit 3f31d07571eeea18a7d34db9af21d2285b807a17 > Author: Hugh Dickins <hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> > Date: Tue May 29 15:06:40 2012 -0700 > > mm/fs: route MADV_REMOVE to FALLOC_FL_PUNCH_HOLE > > Now tmpfs supports hole-punching via fallocate(), switch madvise_remove() > to use do_fallocate() instead of vmtruncate_range(): which extends > madvise(,,MADV_REMOVE) support from tmpfs to ext4, ocfs2 and xfs. > > madvise(,,MADV_REMOVE) support was extended by ext4, ocfs2 and xfs. > > bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1120294 > > Justification from Rafael Aquini: > Well, that code is committed in kernel since v3.5 (2012) and it surely is > the expected behaviour since. It seems to me that madvise(2) man page text > for MADV_REMOVE just got out-of-date in that regard. > > This patch mentions this support in madvise.2 man page. > > Signed-off-by: Jan Chaloupka <jchaloup-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > --- > man2/madvise.2 | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/man2/madvise.2 b/man2/madvise.2 > index 032ead7..44698ec 100644 > --- a/man2/madvise.2 > +++ b/man2/madvise.2 > @@ -98,12 +98,12 @@ either in reloading of the memory contents from the underlying mapped file > or zero-fill-on-demand pages for mappings > without an underlying file. > .TP > -.BR MADV_REMOVE " (since Linux 2.6.16)" > +.BR MADV_REMOVE " (since Linux 3.5)" > Free up a given range of pages > and its associated backing store. > Currently, > .\" 2.6.18-rc5 > -only shmfs/tmpfs supports this; other filesystems return with the > +only shmfs/tmpfs, ext4, ocfs2 and xfs supports this; other filesystems return with the > error > .BR ENOSYS . > .\" Databases want to use this feature to drop a section of their > -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] madvise.2: madvise(, , MADV_REMOVE) supports ext4, ocfs2 and xfs as well [not found] ` <20141007140337.10571.62743.stgit-/v0jm+aXwyk2pP1PFFXgSPXAX3CI6PSWQQ4Iyu8u01E@public.gmane.org> 2014-10-13 8:24 ` Jan Chaloupka 2014-10-16 10:50 ` Jan Chaloupka @ 2014-10-17 14:35 ` Michael Kerrisk (man-pages) [not found] ` <5441292E.5000008-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2 siblings, 1 reply; 10+ messages in thread From: Michael Kerrisk (man-pages) @ 2014-10-17 14:35 UTC (permalink / raw) To: Jan Chaloupka Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, linux-man-u79uwXL29TY76Z2rM5mHXA, hughd-hpIqsD4AKlfQT0dZR+AlfA Hello Jan, On 10/07/2014 04:03 PM, Jan Chaloupka wrote: > As from upstream commit: > > commit 3f31d07571eeea18a7d34db9af21d2285b807a17 > Author: Hugh Dickins <hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> > Date: Tue May 29 15:06:40 2012 -0700 > > mm/fs: route MADV_REMOVE to FALLOC_FL_PUNCH_HOLE > > Now tmpfs supports hole-punching via fallocate(), switch madvise_remove() > to use do_fallocate() instead of vmtruncate_range(): which extends > madvise(,,MADV_REMOVE) support from tmpfs to ext4, ocfs2 and xfs. > > madvise(,,MADV_REMOVE) support was extended by ext4, ocfs2 and xfs. > > bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1120294 > > Justification from Rafael Aquini: > Well, that code is committed in kernel since v3.5 (2012) and it surely is > the expected behaviour since. It seems to me that madvise(2) man page text > for MADV_REMOVE just got out-of-date in that regard. > > This patch mentions this support in madvise.2 man page. The intent of this patch seems correct, but I think the details need fixing. See below. > Signed-off-by: Jan Chaloupka <jchaloup-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > --- > man2/madvise.2 | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/man2/madvise.2 b/man2/madvise.2 > index 032ead7..44698ec 100644 > --- a/man2/madvise.2 > +++ b/man2/madvise.2 > @@ -98,12 +98,12 @@ either in reloading of the memory contents from the underlying mapped file > or zero-fill-on-demand pages for mappings > without an underlying file. > .TP > -.BR MADV_REMOVE " (since Linux 2.6.16)" > +.BR MADV_REMOVE " (since Linux 3.5)" I think the above should not change. > Free up a given range of pages > and its associated backing store. > Currently, > .\" 2.6.18-rc5 > -only shmfs/tmpfs supports this; other filesystems return with the > +only shmfs/tmpfs, ext4, ocfs2 and xfs supports this; other filesystems return with the I think the above line should be: only shmfs/tmpfs and (since Linux 3.5) ext4, ocfs2 and xfs supports this; other filesystems return with the See what I mean? Could you fix and resubmit please? Cheers, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <5441292E.5000008-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] madvise.2: madvise(, , MADV_REMOVE) supports ext4, ocfs2 and xfs as well [not found] ` <5441292E.5000008-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2014-10-17 21:52 ` Hugh Dickins [not found] ` <alpine.LSU.2.11.1410171408260.11102-fupSdm12i1nKWymIFiNcPA@public.gmane.org> 0 siblings, 1 reply; 10+ messages in thread From: Hugh Dickins @ 2014-10-17 21:52 UTC (permalink / raw) To: Michael Kerrisk (man-pages) Cc: Jan Chaloupka, linux-man-u79uwXL29TY76Z2rM5mHXA, hughd-hpIqsD4AKlfQT0dZR+AlfA On Fri, 17 Oct 2014, Michael Kerrisk (man-pages) wrote: > On 10/07/2014 04:03 PM, Jan Chaloupka wrote: > > As from upstream commit: > > > > commit 3f31d07571eeea18a7d34db9af21d2285b807a17 > > Author: Hugh Dickins <hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> > > Date: Tue May 29 15:06:40 2012 -0700 > > > > mm/fs: route MADV_REMOVE to FALLOC_FL_PUNCH_HOLE > > > > Now tmpfs supports hole-punching via fallocate(), switch madvise_remove() > > to use do_fallocate() instead of vmtruncate_range(): which extends > > madvise(,,MADV_REMOVE) support from tmpfs to ext4, ocfs2 and xfs. > > > > madvise(,,MADV_REMOVE) support was extended by ext4, ocfs2 and xfs. > > > > bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1120294 > > > > Justification from Rafael Aquini: > > Well, that code is committed in kernel since v3.5 (2012) and it surely is > > the expected behaviour since. It seems to me that madvise(2) man page text > > for MADV_REMOVE just got out-of-date in that regard. > > > > This patch mentions this support in madvise.2 man page. > > The intent of this patch seems correct, but I think the details > need fixing. See below. Yes, I should have sent you a man page update long ago: sorry about that, and thank you to Jan for doing so. > > > > Signed-off-by: Jan Chaloupka <jchaloup-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > > --- > > man2/madvise.2 | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/man2/madvise.2 b/man2/madvise.2 > > index 032ead7..44698ec 100644 > > --- a/man2/madvise.2 > > +++ b/man2/madvise.2 > > @@ -98,12 +98,12 @@ either in reloading of the memory contents from the underlying mapped file > > or zero-fill-on-demand pages for mappings > > without an underlying file. > > .TP > > -.BR MADV_REMOVE " (since Linux 2.6.16)" > > +.BR MADV_REMOVE " (since Linux 3.5)" > > I think the above should not change. Agreed, > > > Free up a given range of pages > > and its associated backing store. > > Currently, > > .\" 2.6.18-rc5 > > -only shmfs/tmpfs supports this; other filesystems return with the > > +only shmfs/tmpfs, ext4, ocfs2 and xfs supports this; other filesystems return with the > > I think the above line should be: > > only shmfs/tmpfs and (since Linux 3.5) ext4, ocfs2 and xfs supports this; > other filesystems return with the > > See what I mean? Could you fix and resubmit please? Good suggestion in itself, but checking current kernel git indicates that btrfs, ceph, cifs, f2fs and perhaps fuse now also support FALLOC_FL_PUNCH_HOLE, and hence MADV_REMOVE. You may have better things to do than update the madvise man page every time another filesystem adds support for that fallocate mode! Looking at the fallocate(2) page installed on my system, I see "Not all file systems support FALLOC_FL_PUNCH_HOLE; if a file system doesn't support the operation, an error is returned." That looks like a less time-wasting wording; though I'm surprised it says "an error", rather than specifying EOPNOTSUPP. Jan, Michael, how about something like: Originally, only shmfs/tmpfs supported this; but since Linux 3.5, any file system which supports the fallocate(2) mode FALLOC_FL_PUNCH_HOLE also supports the madvise(2) advice MADV_REMOVE. Other file systems return with the error EOPNOTSUPP. Hugh -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <alpine.LSU.2.11.1410171408260.11102-fupSdm12i1nKWymIFiNcPA@public.gmane.org>]
* Re: [PATCH] madvise.2: madvise(, , MADV_REMOVE) supports ext4, ocfs2 and xfs as well [not found] ` <alpine.LSU.2.11.1410171408260.11102-fupSdm12i1nKWymIFiNcPA@public.gmane.org> @ 2014-10-18 15:11 ` Jan Chaloupka 0 siblings, 0 replies; 10+ messages in thread From: Jan Chaloupka @ 2014-10-18 15:11 UTC (permalink / raw) To: Hugh Dickins, Michael Kerrisk (man-pages) Cc: linux-man-u79uwXL29TY76Z2rM5mHXA On 10/17/2014 11:52 PM, Hugh Dickins wrote: > On Fri, 17 Oct 2014, Michael Kerrisk (man-pages) wrote: >> On 10/07/2014 04:03 PM, Jan Chaloupka wrote: >>> As from upstream commit: >>> >>> commit 3f31d07571eeea18a7d34db9af21d2285b807a17 >>> Author: Hugh Dickins <hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> >>> Date: Tue May 29 15:06:40 2012 -0700 >>> >>> mm/fs: route MADV_REMOVE to FALLOC_FL_PUNCH_HOLE >>> >>> Now tmpfs supports hole-punching via fallocate(), switch madvise_remove() >>> to use do_fallocate() instead of vmtruncate_range(): which extends >>> madvise(,,MADV_REMOVE) support from tmpfs to ext4, ocfs2 and xfs. >>> >>> madvise(,,MADV_REMOVE) support was extended by ext4, ocfs2 and xfs. >>> >>> bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1120294 >>> >>> Justification from Rafael Aquini: >>> Well, that code is committed in kernel since v3.5 (2012) and it surely is >>> the expected behaviour since. It seems to me that madvise(2) man page text >>> for MADV_REMOVE just got out-of-date in that regard. >>> >>> This patch mentions this support in madvise.2 man page. >> The intent of this patch seems correct, but I think the details >> need fixing. See below. > Yes, I should have sent you a man page update long ago: > sorry about that, and thank you to Jan for doing so. > >> >>> Signed-off-by: Jan Chaloupka <jchaloup-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> >>> --- >>> man2/madvise.2 | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/man2/madvise.2 b/man2/madvise.2 >>> index 032ead7..44698ec 100644 >>> --- a/man2/madvise.2 >>> +++ b/man2/madvise.2 >>> @@ -98,12 +98,12 @@ either in reloading of the memory contents from the underlying mapped file >>> or zero-fill-on-demand pages for mappings >>> without an underlying file. >>> .TP >>> -.BR MADV_REMOVE " (since Linux 2.6.16)" >>> +.BR MADV_REMOVE " (since Linux 3.5)" >> I think the above should not change. > Agreed, Yeah, you are right. It refers to MADV_REMOVE itself, not to a particular filesystem. >>> Free up a given range of pages >>> and its associated backing store. >>> Currently, >>> .\" 2.6.18-rc5 >>> -only shmfs/tmpfs supports this; other filesystems return with the >>> +only shmfs/tmpfs, ext4, ocfs2 and xfs supports this; other filesystems return with the >> I think the above line should be: >> >> only shmfs/tmpfs and (since Linux 3.5) ext4, ocfs2 and xfs supports this; >> other filesystems return with the >> >> See what I mean? Could you fix and resubmit please? > Good suggestion in itself, but checking current kernel git indicates > that btrfs, ceph, cifs, f2fs and perhaps fuse now also support > FALLOC_FL_PUNCH_HOLE, and hence MADV_REMOVE. > > You may have better things to do than update the madvise man page > every time another filesystem adds support for that fallocate mode! > > Looking at the fallocate(2) page installed on my system, I see > "Not all file systems support FALLOC_FL_PUNCH_HOLE; if a file system > doesn't support the operation, an error is returned." > > That looks like a less time-wasting wording; though I'm surprised > it says "an error", rather than specifying EOPNOTSUPP. > > Jan, Michael, how about something like: > > Originally, only shmfs/tmpfs supported this; but since Linux 3.5, any > file system which supports the fallocate(2) mode FALLOC_FL_PUNCH_HOLE > also supports the madvise(2) advice MADV_REMOVE. Other file systems > return with the error EOPNOTSUPP. I like this reformulation. fallocate(2) contains a list of some filesystems supporting FALLOC_FL_PUNCH_HOLE mode (ext4 among others). Will prepare the patch. Thanks Michael, Hugh. > Hugh -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-02-04 9:39 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-18 15:22 [PATCH] madvise.2: madvise(, , MADV_REMOVE) supports ext4, ocfs2 and xfs as well Jan Chaloupka
[not found] ` <20141018152240.14951.14405.stgit-/v0jm+aXwyk2pP1PFFXgSPXAX3CI6PSWQQ4Iyu8u01E@public.gmane.org>
2014-10-22 8:41 ` Jan Chaloupka
2015-02-04 9:28 ` Michael Kerrisk (man-pages)
[not found] ` <CAKgNAkg_cOKFC_Mjmn+EjLr4PDnb2GKRq7BhKaEpdks9tgSa9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-04 9:39 ` Jan Chaloupka
-- strict thread matches above, loose matches on Subject: below --
2014-10-07 14:03 Jan Chaloupka
[not found] ` <20141007140337.10571.62743.stgit-/v0jm+aXwyk2pP1PFFXgSPXAX3CI6PSWQQ4Iyu8u01E@public.gmane.org>
2014-10-13 8:24 ` Jan Chaloupka
2014-10-16 10:50 ` Jan Chaloupka
2014-10-17 14:35 ` Michael Kerrisk (man-pages)
[not found] ` <5441292E.5000008-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-17 21:52 ` Hugh Dickins
[not found] ` <alpine.LSU.2.11.1410171408260.11102-fupSdm12i1nKWymIFiNcPA@public.gmane.org>
2014-10-18 15:11 ` Jan Chaloupka
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).