linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: linux-mm@kvack.org, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH 0/5] get_user_pages() cleanup
Date: Fri, 18 Apr 2014 15:22:45 -0700	[thread overview]
Message-ID: <20140418152245.b6d41e544ff5467ec8c3df67@linux-foundation.org> (raw)
In-Reply-To: <1396535722-31108-1-git-send-email-kirill.shutemov@linux.intel.com>

On Thu,  3 Apr 2014 17:35:17 +0300 "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> wrote:

> Here's my attempt to cleanup of get_user_pages() code in order to make it
> more maintainable.
> 
> Tested on my laptop for few hours. No crashes so far ;)
> 
> Let me know if it makes sense. Any suggestions are welcome.
> 
> Kirill A. Shutemov (5):
>   mm: move get_user_pages()-related code to separate file
>   mm: extract in_gate_area() case from __get_user_pages()
>   mm: cleanup follow_page_mask()
>   mm: extract code to fault in a page from __get_user_pages()
>   mm: cleanup __get_user_pages()
> 
>  mm/Makefile |   2 +-
>  mm/gup.c    | 638 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  mm/memory.c | 611 ---------------------------------------------------------

Fair enough.

We don't have anything like enough #includes in the new gup.c so
there's a risk of Kconfig-dependent breakage.  I plugged in a few
obvious ones, but many more are surely missing.


From: Andrew Morton <akpm@linux-foundation.org>
Subject: mm/gup.c: tweaks

- include some more header files, but many are still missed
- fix some 80-col overflows by removing unneeded `inline'

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/gup.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff -puN mm/gup.c~a mm/gup.c
--- a/mm/gup.c~a
+++ a/mm/gup.c
@@ -1,3 +1,8 @@
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/err.h>
+#include <linux/spinlock.h>
+
 #include <linux/hugetlb.h>
 #include <linux/mm.h>
 #include <linux/rmap.h>
@@ -6,8 +11,8 @@
 
 #include "internal.h"
 
-static inline struct page *no_page_table(struct vm_area_struct *vma,
-		unsigned int flags)
+static struct page *no_page_table(struct vm_area_struct *vma,
+				  unsigned int flags)
 {
 	/*
 	 * When core dumping an enormous anonymous area that nobody
@@ -208,7 +213,7 @@ struct page *follow_page_mask(struct vm_
 	return follow_page_pte(vma, address, pmd, flags);
 }
 
-static inline int stack_guard_page(struct vm_area_struct *vma, unsigned long addr)
+static int stack_guard_page(struct vm_area_struct *vma, unsigned long addr)
 {
 	return stack_guard_page_start(vma, addr) ||
 	       stack_guard_page_end(vma, addr+PAGE_SIZE);
_

--
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-04-18 22:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-03 14:35 Kirill A. Shutemov
2014-04-03 14:35 ` [PATCH 1/5] mm: move get_user_pages()-related code to separate file Kirill A. Shutemov
2014-04-03 14:35 ` [PATCH 2/5] mm: extract in_gate_area() case from __get_user_pages() Kirill A. Shutemov
2014-04-03 14:35 ` [PATCH 3/5] mm: cleanup follow_page_mask() Kirill A. Shutemov
2014-04-03 14:35 ` [PATCH 4/5] mm: extract code to fault in a page from __get_user_pages() Kirill A. Shutemov
2014-04-21 23:35   ` Andrew Morton
     [not found]     ` <20140422005036.GA27749@node.dhcp.inet.fi>
2014-04-22  1:02       ` Andrew Morton
     [not found]         ` <20140422012022.GA28319@node.dhcp.inet.fi>
2014-04-22  1:26           ` Andrew Morton
2014-04-03 14:35 ` [PATCH 5/5] mm: cleanup __get_user_pages() Kirill A. Shutemov
2014-04-18 22:22 ` Andrew Morton [this message]

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=20140418152245.b6d41e544ff5467ec8c3df67@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=jack@suse.cz \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox