All of lore.kernel.org
 help / color / mirror / Atom feed
* [folded-merged] mm-mmap_lock-remove-dead-code-for-config_tracing-configurations-fix.patch removed from -mm tree
@ 2021-07-01  0:59 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2021-07-01  0:59 UTC (permalink / raw)
  To: cuibixuan, david, ddstreet, mgorman, mhocko, mm-commits,
	shy828301, vbabka, willy


The patch titled
     Subject: mm/mmap_lock: fix warning when CONFIG_TRACING is not defined
has been removed from the -mm tree.  Its filename was
     mm-mmap_lock-remove-dead-code-for-config_tracing-configurations-fix.patch

This patch was dropped because it was folded into mm-mmap_lock-remove-dead-code-for-config_tracing-configurations.patch

------------------------------------------------------
From: Bixuan Cui <cuibixuan@huawei.com>
Subject: mm/mmap_lock: fix warning when CONFIG_TRACING is not defined

Fix the warning: [-Wunused-function]
mm/mmap_lock.c:157:20: warning: `get_mm_memcg_path' defined but not used
 static const char *get_mm_memcg_path(struct mm_struct *mm)
                    ^~~~~~~~~~~~~~~~~

Move get_mm_memcg_path() into #ifdef CONFIG_TRACING.

Link: https://lkml.kernel.org/r/20210531033426.74031-1-cuibixuan@huawei.com
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
Acked-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Dan Streetman <ddstreet@ieee.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/mmap_lock.c |   59 ++++++++++++++++++++++++-----------------------
 1 file changed, 31 insertions(+), 28 deletions(-)

--- a/mm/mmap_lock.c~mm-mmap_lock-remove-dead-code-for-config_tracing-configurations-fix
+++ a/mm/mmap_lock.c
@@ -153,6 +153,37 @@ static inline void put_memcg_path_buf(vo
 	rcu_read_unlock();
 }
 
+#define TRACE_MMAP_LOCK_EVENT(type, mm, ...)                                   \
+	do {                                                                   \
+		const char *memcg_path;                                        \
+		preempt_disable();                                             \
+		memcg_path = get_mm_memcg_path(mm);                            \
+		trace_mmap_lock_##type(mm,                                     \
+				       memcg_path != NULL ? memcg_path : "",   \
+				       ##__VA_ARGS__);                         \
+		if (likely(memcg_path != NULL))                                \
+			put_memcg_path_buf();                                  \
+		preempt_enable();                                              \
+	} while (0)
+
+#else /* !CONFIG_MEMCG */
+
+int trace_mmap_lock_reg(void)
+{
+	return 0;
+}
+
+void trace_mmap_lock_unreg(void)
+{
+}
+
+#define TRACE_MMAP_LOCK_EVENT(type, mm, ...)                                   \
+	trace_mmap_lock_##type(mm, "", ##__VA_ARGS__)
+
+#endif /* CONFIG_MEMCG */
+
+#ifdef CONFIG_TRACING
+#ifdef CONFIG_MEMCG
 /*
  * Write the given mm_struct's memcg path to a percpu buffer, and return a
  * pointer to it. If the path cannot be determined, or no buffer was available
@@ -187,36 +218,8 @@ out:
 	return buf;
 }
 
-#define TRACE_MMAP_LOCK_EVENT(type, mm, ...)                                   \
-	do {                                                                   \
-		const char *memcg_path;                                        \
-		local_lock(&memcg_paths.lock);				       \
-		memcg_path = get_mm_memcg_path(mm);                            \
-		trace_mmap_lock_##type(mm,                                     \
-				       memcg_path != NULL ? memcg_path : "",   \
-				       ##__VA_ARGS__);                         \
-		if (likely(memcg_path != NULL))                                \
-			put_memcg_path_buf();                                  \
-		local_unlock(&memcg_paths.lock);			       \
-	} while (0)
-
-#else /* !CONFIG_MEMCG */
-
-int trace_mmap_lock_reg(void)
-{
-	return 0;
-}
-
-void trace_mmap_lock_unreg(void)
-{
-}
-
-#define TRACE_MMAP_LOCK_EVENT(type, mm, ...)                                   \
-	trace_mmap_lock_##type(mm, "", ##__VA_ARGS__)
-
 #endif /* CONFIG_MEMCG */
 
-#ifdef CONFIG_TRACING
 /*
  * Trace calls must be in a separate file, as otherwise there's a circular
  * dependency between linux/mmap_lock.h and trace/events/mmap_lock.h.
_

Patches currently in -mm which might be from cuibixuan@huawei.com are

mm-mmap_lock-remove-dead-code-for-config_tracing-configurations.patch
module-add-printk-formats-to-add-module-build-id-to-stacktraces-fix-fix-fix.patch


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

only message in thread, other threads:[~2021-07-01  0:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01  0:59 [folded-merged] mm-mmap_lock-remove-dead-code-for-config_tracing-configurations-fix.patch removed from -mm tree akpm

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.