From: Rik van Riel <riel@redhat.com>
To: Johannes Weiner <hannes@cmpxchg.org>, Minchan Kim <minchan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Dave Hansen <dave.hansen@intel.com>,
John Stultz <john.stultz@linaro.org>,
Zhang Yanfei <zhangyanfei@cn.fujitsu.com>,
Hugh Dickins <hughd@google.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Mel Gorman <mgorman@suse.de>, Jason Evans <je@fb.com>
Subject: Re: [PATCH v6] mm: support madvise(MADV_FREE)
Date: Thu, 15 May 2014 12:07:13 -0400 [thread overview]
Message-ID: <5374E631.30208@redhat.com> (raw)
In-Reply-To: <20140515154657.GA2720@cmpxchg.org>
On 05/15/2014 11:46 AM, Johannes Weiner wrote:
>> diff --git a/include/linux/mm.h b/include/linux/mm.h
>> index bf9811e1321a..c69594c141a9 100644
>> --- a/include/linux/mm.h
>> +++ b/include/linux/mm.h
>> @@ -1082,6 +1082,8 @@ int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address,
>> unsigned long size);
>> void zap_page_range(struct vm_area_struct *vma, unsigned long address,
>> unsigned long size, struct zap_details *);
>> +int lazyfree_single_vma(struct vm_area_struct *vma, unsigned long start_addr,
>> + unsigned long end_addr);
>
> madvise_free_single_vma?
Or just madvise_free_vma ?
>> @@ -251,6 +252,14 @@ static long madvise_willneed(struct vm_area_struct *vma,
>> return 0;
>> }
>>
>> +static long madvise_lazyfree(struct vm_area_struct *vma,
>
> madvise_free?
Agreed.
It is encouraging that the review has reached nit picking
level :)
>> diff --git a/mm/memory.c b/mm/memory.c
>> index 037b812a9531..0516c94da1a4 100644
>> --- a/mm/memory.c
>> +++ b/mm/memory.c
>> @@ -1284,6 +1284,112 @@ static inline unsigned long zap_pud_range(struct mmu_gather *tlb,
>> return addr;
>> }
>>
>> +static unsigned long lazyfree_pte_range(struct mmu_gather *tlb,
>
> I'd prefer to have all this code directly where it's used, which is in
> madvise.c, and also be named accordingly. We can always rename and
> move it later on should other code want to reuse it.
Agreed.
I like your other suggestions too, Johannes.
--
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>
next prev parent reply other threads:[~2014-05-15 16:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-12 1:26 [PATCH v6] mm: support madvise(MADV_FREE) Minchan Kim
2014-05-15 15:46 ` Johannes Weiner
2014-05-15 16:07 ` Rik van Riel [this message]
2014-05-16 6:34 ` Minchan Kim
2014-05-16 19:38 ` Kirill A. Shutemov
2014-05-19 3:24 ` Minchan Kim
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=5374E631.30208@redhat.com \
--to=riel@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@intel.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=je@fb.com \
--cc=john.stultz@linaro.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=minchan@kernel.org \
--cc=zhangyanfei@cn.fujitsu.com \
/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 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).