All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Sheng-Hui <shhuiw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: David Rientjes <rientjes-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Cc: Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	Naoya Horiguchi
	<n-horiguchi-PaJj6Psr51x8UrSeD/g0lQ@public.gmane.org>,
	Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>,
	Andi Kleen <ak-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	Vladimir Cernov
	<gg.kaspersky-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
	mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] mm: update the description for madvise_remove
Date: Wed, 25 Jun 2014 09:58:45 +0800	[thread overview]
Message-ID: <53AA2CD5.6060202@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1406241542040.29176-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>

Patch to man-page.

[PATCH] madvise.2: update the description for MADV_REMOVE

Currently we have more filesystems supporting fallcate, e.g ext4/btrfs,
which can response to MADV_REMOVE gracefully.

And if filesystems don't support fallocate, the return error would be
EOPNOTSUPP, instead of ENOSYS.

Signed-off-by: Wang Sheng-Hui <shhuiw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 man2/madvise.2 | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/man2/madvise.2 b/man2/madvise.2
index 032ead7..4ce869c 100644
--- a/man2/madvise.2
+++ b/man2/madvise.2
@@ -99,13 +99,9 @@ or zero-fill-on-demand pages for mappings
 without an underlying file.
 .TP
 .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 .
+Free up a given range of pages and its associated backing store.
+Filesystems that don't support fallocate will return error
+.BR EOPNOTSUPP.
 .\" 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
-- 
1.8.3.2



On 2014年06月25日 06:44, David Rientjes wrote:
> On Tue, 24 Jun 2014, Wang Sheng-Hui wrote:
> 
>>
>> Currently, we have more filesystems supporting fallocate, e.g
>> ext4/btrfs. Remove the outdated comment for madvise_remove.
>>
>> Signed-off-by: Wang Sheng-Hui <shhuiw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> ---
>>  mm/madvise.c | 3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/mm/madvise.c b/mm/madvise.c
>> index a402f8f..0938b30 100644
>> --- a/mm/madvise.c
>> +++ b/mm/madvise.c
>> @@ -292,9 +292,6 @@ static long madvise_dontneed(struct vm_area_struct *vma,
>>  /*
>>   * Application wants to free up the pages and associated backing store.
>>   * This is effectively punching a hole into the middle of a file.
>> - *
>> - * NOTE: Currently, only shmfs/tmpfs is supported for this operation.
>> - * Other filesystems return -ENOSYS.
>>   */
>>  static long madvise_remove(struct vm_area_struct *vma,
>>                                 struct vm_area_struct **prev,
> 
> [For those without context: this patch has been merged into the -mm tree.]
> 
> This reference also exists in the man-page for madvise(2), are you 
> planning on removing it as well?
> 

WARNING: multiple messages have this Message-ID (diff)
From: Wang Sheng-Hui <shhuiw@gmail.com>
To: David Rientjes <rientjes@google.com>,
	Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Andi Kleen <ak@linux.intel.com>,
	Vladimir Cernov <gg.kaspersky@gmail.com>,
	linux-mm@kvack.org, linux-api@vger.kernel.org,
	linux-man@vger.kernel.org
Subject: Re: [PATCH] mm: update the description for madvise_remove
Date: Wed, 25 Jun 2014 09:58:45 +0800	[thread overview]
Message-ID: <53AA2CD5.6060202@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1406241542040.29176@chino.kir.corp.google.com>

Patch to man-page.

[PATCH] madvise.2: update the description for MADV_REMOVE

Currently we have more filesystems supporting fallcate, e.g ext4/btrfs,
which can response to MADV_REMOVE gracefully.

And if filesystems don't support fallocate, the return error would be
EOPNOTSUPP, instead of ENOSYS.

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
 man2/madvise.2 | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/man2/madvise.2 b/man2/madvise.2
index 032ead7..4ce869c 100644
--- a/man2/madvise.2
+++ b/man2/madvise.2
@@ -99,13 +99,9 @@ or zero-fill-on-demand pages for mappings
 without an underlying file.
 .TP
 .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 .
+Free up a given range of pages and its associated backing store.
+Filesystems that don't support fallocate will return error
+.BR EOPNOTSUPP.
 .\" 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
-- 
1.8.3.2



On 2014a1'06ae??25ae?JPY 06:44, David Rientjes wrote:
> On Tue, 24 Jun 2014, Wang Sheng-Hui wrote:
> 
>>
>> Currently, we have more filesystems supporting fallocate, e.g
>> ext4/btrfs. Remove the outdated comment for madvise_remove.
>>
>> Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
>> ---
>>  mm/madvise.c | 3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/mm/madvise.c b/mm/madvise.c
>> index a402f8f..0938b30 100644
>> --- a/mm/madvise.c
>> +++ b/mm/madvise.c
>> @@ -292,9 +292,6 @@ static long madvise_dontneed(struct vm_area_struct *vma,
>>  /*
>>   * Application wants to free up the pages and associated backing store.
>>   * This is effectively punching a hole into the middle of a file.
>> - *
>> - * NOTE: Currently, only shmfs/tmpfs is supported for this operation.
>> - * Other filesystems return -ENOSYS.
>>   */
>>  static long madvise_remove(struct vm_area_struct *vma,
>>                                 struct vm_area_struct **prev,
> 
> [For those without context: this patch has been merged into the -mm tree.]
> 
> This reference also exists in the man-page for madvise(2), are you 
> planning on removing it as well?
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2014-06-25  1:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24  5:49 [PATCH] mm: update the description for madvise_remove Wang Sheng-Hui
2014-06-24  5:49 ` Wang Sheng-Hui
2014-06-24  5:59 ` Naoya Horiguchi
2014-06-24  5:59   ` Naoya Horiguchi
2014-06-24 22:44 ` David Rientjes
2014-06-24 22:44   ` David Rientjes
     [not found]   ` <alpine.DEB.2.02.1406241542040.29176-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2014-06-25  1:58     ` Wang Sheng-Hui [this message]
2014-06-25  1:58       ` Wang Sheng-Hui
2014-06-25 22:30       ` David Rientjes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53AA2CD5.6060202@gmail.com \
    --to=shhuiw-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=ak-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=gg.kaspersky-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=n-horiguchi-PaJj6Psr51x8UrSeD/g0lQ@public.gmane.org \
    --cc=rientjes-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.