All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-gup-pack-has_pinned-in-mmf_has_pinned-checkpatch-fixes.patch added to -mm tree
@ 2021-05-09  0:40 akpm
  2021-05-11 14:34 ` Peter Xu
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2021-05-09  0:40 UTC (permalink / raw)
  To: akpm, mm-commits, peterx


The patch titled
     Subject: mm-gup-pack-has_pinned-in-mmf_has_pinned-checkpatch-fixes
has been added to the -mm tree.  Its filename is
     mm-gup-pack-has_pinned-in-mmf_has_pinned-checkpatch-fixes.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-gup-pack-has_pinned-in-mmf_has_pinned-checkpatch-fixes.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-gup-pack-has_pinned-in-mmf_has_pinned-checkpatch-fixes.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Andrew Morton <akpm@linux-foundation.org>
Subject: mm-gup-pack-has_pinned-in-mmf_has_pinned-checkpatch-fixes

WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#25: 
[peterx@redhat.com: fix build for task_mmu.c, introduce mm_set_has_pinned_flag, fix comments]

WARNING: please, no spaces at the start of a line
#130: FILE: mm/gup.c:1280:
+       if (!test_bit(MMF_HAS_PINNED, mm_flags))$

WARNING: suspect code indent for conditional statements (7, 15)
#130: FILE: mm/gup.c:1280:
+       if (!test_bit(MMF_HAS_PINNED, mm_flags))
+               set_bit(MMF_HAS_PINNED, mm_flags);

ERROR: code indent should use tabs where possible
#131: FILE: mm/gup.c:1281:
+               set_bit(MMF_HAS_PINNED, mm_flags);$

WARNING: please, no spaces at the start of a line
#131: FILE: mm/gup.c:1281:
+               set_bit(MMF_HAS_PINNED, mm_flags);$

total: 1 errors, 4 warnings, 90 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-gup-pack-has_pinned-in-mmf_has_pinned.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/gup.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/mm/gup.c~mm-gup-pack-has_pinned-in-mmf_has_pinned-checkpatch-fixes
+++ a/mm/gup.c
@@ -1277,8 +1277,8 @@ EXPORT_SYMBOL_GPL(fixup_user_fault);
  */
 static inline void mm_set_has_pinned_flag(unsigned long *mm_flags)
 {
-       if (!test_bit(MMF_HAS_PINNED, mm_flags))
-               set_bit(MMF_HAS_PINNED, mm_flags);
+	if (!test_bit(MMF_HAS_PINNED, mm_flags))
+		set_bit(MMF_HAS_PINNED, mm_flags);
 }
 
 /*
_

Patches currently in -mm which might be from akpm@linux-foundation.org are

mm.patch
mm-gup-pack-has_pinned-in-mmf_has_pinned-checkpatch-fixes.patch
linux-next-git-rejects.patch
kernel-forkc-export-kernel_thread-to-modules.patch


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: + mm-gup-pack-has_pinned-in-mmf_has_pinned-checkpatch-fixes.patch added to -mm tree
  2021-05-09  0:40 + mm-gup-pack-has_pinned-in-mmf_has_pinned-checkpatch-fixes.patch added to -mm tree akpm
@ 2021-05-11 14:34 ` Peter Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Xu @ 2021-05-11 14:34 UTC (permalink / raw)
  To: akpm; +Cc: mm-commits

[-- Attachment #1: Type: text/plain, Size: 2849 bytes --]

On Sat, May 08, 2021 at 05:40:01PM -0700, akpm@linux-foundation.org wrote:
> 
> The patch titled
>      Subject: mm-gup-pack-has_pinned-in-mmf_has_pinned-checkpatch-fixes
> has been added to the -mm tree.  Its filename is
>      mm-gup-pack-has_pinned-in-mmf_has_pinned-checkpatch-fixes.patch
> 
> This patch should soon appear at
>     https://ozlabs.org/~akpm/mmots/broken-out/mm-gup-pack-has_pinned-in-mmf_has_pinned-checkpatch-fixes.patch
> and later at
>     https://ozlabs.org/~akpm/mmotm/broken-out/mm-gup-pack-has_pinned-in-mmf_has_pinned-checkpatch-fixes.patch
> 
> Before you just go and hit "reply", please:
>    a) Consider who else should be cc'ed
>    b) Prefer to cc a suitable mailing list as well
>    c) Ideally: find the original patch on the mailing list and do a
>       reply-to-all to that, adding suitable additional cc's
> 
> *** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
> 
> The -mm tree is included into linux-next and is updated
> there every 3-4 working days
> 
> ------------------------------------------------------
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: mm-gup-pack-has_pinned-in-mmf_has_pinned-checkpatch-fixes
> 
> WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
> #25: 
> [peterx@redhat.com: fix build for task_mmu.c, introduce mm_set_has_pinned_flag, fix comments]
> 
> WARNING: please, no spaces at the start of a line
> #130: FILE: mm/gup.c:1280:
> +       if (!test_bit(MMF_HAS_PINNED, mm_flags))$
> 
> WARNING: suspect code indent for conditional statements (7, 15)
> #130: FILE: mm/gup.c:1280:
> +       if (!test_bit(MMF_HAS_PINNED, mm_flags))
> +               set_bit(MMF_HAS_PINNED, mm_flags);
> 
> ERROR: code indent should use tabs where possible
> #131: FILE: mm/gup.c:1281:
> +               set_bit(MMF_HAS_PINNED, mm_flags);$
> 
> WARNING: please, no spaces at the start of a line
> #131: FILE: mm/gup.c:1281:
> +               set_bit(MMF_HAS_PINNED, mm_flags);$
> 
> total: 1 errors, 4 warnings, 90 lines checked
> 
> NOTE: For some of the reported defects, checkpatch may be able to
>       mechanically convert to the typical style using --fix or --fix-inplace.
> 
> NOTE: Whitespace errors detected.
>       You may wish to use scripts/cleanpatch or scripts/cleanfile
> 
> ./patches/mm-gup-pack-has_pinned-in-mmf_has_pinned.patch has style problems, please review.
> 
> NOTE: If any of the errors are false positives, please report
>       them to the maintainer, see CHECKPATCH in MAINTAINERS.
> 
> Please run checkpatch prior to sending patches

Andrew,

We may also need to squash attached into this commit, as otherwise !CONFIG_MMU
breaks.  Sorry about both of the troublesome I introduced!

(Note: the attached patch should be cleanly applied upon this space fix patch)

-- 
Peter Xu

[-- Attachment #2: 0001-fixup-mm-gup-pack-has_pinned-in-MMF_HAS_PINNED.patch --]
[-- Type: text/plain, Size: 1763 bytes --]

From e5558461f9ae20ae4c0266726db52c6f707e083b Mon Sep 17 00:00:00 2001
From: Peter Xu <peterx@redhat.com>
Date: Tue, 11 May 2021 10:32:29 -0400
Subject: [PATCH] fixup! mm: gup: pack has_pinned in MMF_HAS_PINNED

This fixes build issue with !CONFIG_MMU.

Signed-off-by: Peter Xu <peterx@redhat.com>
---
 mm/gup.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/mm/gup.c b/mm/gup.c
index be80873b80a77..67ced252edc75 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -392,6 +392,17 @@ void unpin_user_pages(struct page **pages, unsigned long npages)
 }
 EXPORT_SYMBOL(unpin_user_pages);
 
+/*
+ * Set the MMF_HAS_PINNED if not set yet; after set it'll be there for the mm's
+ * lifecycle.  Avoid setting the bit unless necessary, or it might cause write
+ * cache bouncing on large SMP machines for concurrent pinned gups.
+ */
+static inline void mm_set_has_pinned_flag(unsigned long *mm_flags)
+{
+	if (!test_bit(MMF_HAS_PINNED, mm_flags))
+		set_bit(MMF_HAS_PINNED, mm_flags);
+}
+
 #ifdef CONFIG_MMU
 static struct page *no_page_table(struct vm_area_struct *vma,
 		unsigned int flags)
@@ -1270,17 +1281,6 @@ int fixup_user_fault(struct mm_struct *mm,
 }
 EXPORT_SYMBOL_GPL(fixup_user_fault);
 
-/*
- * Set the MMF_HAS_PINNED if not set yet; after set it'll be there for the mm's
- * lifecycle.  Avoid setting the bit unless necessary, or it might cause write
- * cache bouncing on large SMP machines for concurrent pinned gups.
- */
-static inline void mm_set_has_pinned_flag(unsigned long *mm_flags)
-{
-	if (!test_bit(MMF_HAS_PINNED, mm_flags))
-		set_bit(MMF_HAS_PINNED, mm_flags);
-}
-
 /*
  * Please note that this function, unlike __get_user_pages will not
  * return 0 for nr_pages > 0 without FOLL_NOWAIT
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-11 14:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-09  0:40 + mm-gup-pack-has_pinned-in-mmf_has_pinned-checkpatch-fixes.patch added to -mm tree akpm
2021-05-11 14:34 ` Peter Xu

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.