All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-munlock-mlock_page-munlock_page-batch-by-pagevec-fix-2.patch added to -mm tree
@ 2022-02-11 21:54 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-02-11 21:54 UTC (permalink / raw)
  To: mm-commits, hughd, sj, akpm


The patch titled
     Subject: mm/internal: Implement no-op mlock_page_drain() for !CONFIG_MMU
has been added to the -mm tree.  Its filename is
     mm-munlock-mlock_page-munlock_page-batch-by-pagevec-fix-2.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-munlock-mlock_page-munlock_page-batch-by-pagevec-fix-2.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-munlock-mlock_page-munlock_page-batch-by-pagevec-fix-2.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: SeongJae Park <sj@kernel.org>
Subject: mm/internal: Implement no-op mlock_page_drain() for !CONFIG_MMU

Commit 4b3b8bd6c8287 ("mm/munlock: mlock_page() munlock_page() batch by
pagevec") in -mm tree[1] implements 'mlock_page_drain()' under CONFIG_MMU
only, but the function is used by 'lru_add_drain_cpu()', which defined
outside of CONFIG_MMU.  As a result, below build error occurs.

    /linux/mm/swap.c: In function 'lru_add_drain_cpu':
    /linux/mm/swap.c:637:2: error: implicit declaration of function 'mlock_page_drain' [-Werror=implicit-function-declaration]
      637 |  mlock_page_drain(cpu);
          |  ^~~~~~~~~~~~~~~~
    cc1: some warnings being treated as errors
    /linux/scripts/Makefile.build:289: recipe for target 'mm/swap.o' failed

This commit fixes it by implementing no-op 'mlock_page_drain()' for
!CONFIG_MMU case, similar to 'mlock_new_page()'.

[1] https://www.ozlabs.org/~akpm/mmotm/broken-out/mm-munlock-mlock_page-munlock_page-batch-by-pagevec.patch

[hughd: add need_mlock_page_drain() stub too]
Link: https://lkml.kernel.org/r/8eae6026-098-befb-92d3-b9ad2ad57776@google.com
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---


--- a/mm/internal.h~mm-munlock-mlock_page-munlock_page-batch-by-pagevec-fix-2
+++ a/mm/internal.h
@@ -508,6 +508,8 @@ static inline void mlock_vma_page(struct
 static inline void munlock_vma_page(struct page *page,
 			struct vm_area_struct *vma, bool compound) { }
 static inline void mlock_new_page(struct page *page) { }
+static inline bool need_mlock_page_drain(int cpu) { return false; }
+static inline void mlock_page_drain(int cpu) { }
 static inline void vunmap_range_noflush(unsigned long start, unsigned long end)
 {
 }
_

Patches currently in -mm which might be from sj@kernel.org are

mm-munlock-mlock_page-munlock_page-batch-by-pagevec-fix-2.patch
mm-damon-dbgfs-init_regions-use-target-index-instead-of-target-id.patch
docs-admin-guide-mm-damon-usage-update-for-changed-initail_regions-file-input.patch
mm-damon-core-move-damon_set_targets-into-dbgfs.patch
mm-damon-remove-the-target-id-concept.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-11 21:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-11 21:54 + mm-munlock-mlock_page-munlock_page-batch-by-pagevec-fix-2.patch added to -mm tree Andrew Morton

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.