diff mbox series

[v2,7/8] mm: Move lib/show_mem.c to mm/

Message ID 20220421234837.3629927-13-kent.overstreet@gmail.com (mailing list archive)
State New
Headers show
Series Printbufs & shrinker OOM reporting | expand

Commit Message

Kent Overstreet April 21, 2022, 11:48 p.m. UTC
show_mem.c is really mm specific, and the next patch in the series is
going to require mm/slab.h, so let's move it before doing more work on
it.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
---
 lib/Makefile           | 2 +-
 mm/Makefile            | 2 +-
 {lib => mm}/show_mem.c | 0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename {lib => mm}/show_mem.c (100%)

Comments

Michal Hocko April 22, 2022, 12:32 p.m. UTC | #1
On Thu 21-04-22 19:48:36, Kent Overstreet wrote:
> show_mem.c is really mm specific, and the next patch in the series is
> going to require mm/slab.h, so let's move it before doing more work on
> it.
> 
> Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>

No real objections on this. I do agree that this is an mm specific
thing. It depends on other things in mm/page_alloc.c so I wouldn't mind
those living close together.

Acked-by: Michal Hocko <mhocko@suse.com>

> ---
>  lib/Makefile           | 2 +-
>  mm/Makefile            | 2 +-
>  {lib => mm}/show_mem.c | 0
>  3 files changed, 2 insertions(+), 2 deletions(-)
>  rename {lib => mm}/show_mem.c (100%)
> 
> diff --git a/lib/Makefile b/lib/Makefile
> index 31a3904eda..c5041d33d0 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -30,7 +30,7 @@ endif
>  lib-y := ctype.o string.o vsprintf.o cmdline.o \
>  	 rbtree.o radix-tree.o timerqueue.o xarray.o \
>  	 idr.o extable.o sha1.o irq_regs.o argv_split.o \
> -	 flex_proportions.o ratelimit.o show_mem.o \
> +	 flex_proportions.o ratelimit.o \
>  	 is_single_threaded.o plist.o decompress.o kobject_uevent.o \
>  	 earlycpio.o seq_buf.o siphash.o dec_and_lock.o \
>  	 nmi_backtrace.o nodemask.o win_minmax.o memcat_p.o \
> diff --git a/mm/Makefile b/mm/Makefile
> index 70d4309c9c..97c0be12f3 100644
> --- a/mm/Makefile
> +++ b/mm/Makefile
> @@ -54,7 +54,7 @@ obj-y			:= filemap.o mempool.o oom_kill.o fadvise.o \
>  			   mm_init.o percpu.o slab_common.o \
>  			   compaction.o vmacache.o \
>  			   interval_tree.o list_lru.o workingset.o \
> -			   debug.o gup.o mmap_lock.o $(mmu-y)
> +			   debug.o gup.o mmap_lock.o show_mem.o $(mmu-y)
>  
>  # Give 'page_alloc' its own module-parameter namespace
>  page-alloc-y := page_alloc.o
> diff --git a/lib/show_mem.c b/mm/show_mem.c
> similarity index 100%
> rename from lib/show_mem.c
> rename to mm/show_mem.c
> -- 
> 2.35.2
diff mbox series

Patch

diff --git a/lib/Makefile b/lib/Makefile
index 31a3904eda..c5041d33d0 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -30,7 +30,7 @@  endif
 lib-y := ctype.o string.o vsprintf.o cmdline.o \
 	 rbtree.o radix-tree.o timerqueue.o xarray.o \
 	 idr.o extable.o sha1.o irq_regs.o argv_split.o \
-	 flex_proportions.o ratelimit.o show_mem.o \
+	 flex_proportions.o ratelimit.o \
 	 is_single_threaded.o plist.o decompress.o kobject_uevent.o \
 	 earlycpio.o seq_buf.o siphash.o dec_and_lock.o \
 	 nmi_backtrace.o nodemask.o win_minmax.o memcat_p.o \
diff --git a/mm/Makefile b/mm/Makefile
index 70d4309c9c..97c0be12f3 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -54,7 +54,7 @@  obj-y			:= filemap.o mempool.o oom_kill.o fadvise.o \
 			   mm_init.o percpu.o slab_common.o \
 			   compaction.o vmacache.o \
 			   interval_tree.o list_lru.o workingset.o \
-			   debug.o gup.o mmap_lock.o $(mmu-y)
+			   debug.o gup.o mmap_lock.o show_mem.o $(mmu-y)
 
 # Give 'page_alloc' its own module-parameter namespace
 page-alloc-y := page_alloc.o
diff --git a/lib/show_mem.c b/mm/show_mem.c
similarity index 100%
rename from lib/show_mem.c
rename to mm/show_mem.c