2012-03-29 01:42:55 +04:00
|
|
|
# Makefile for vm tools
|
2013-02-20 19:32:33 +04:00
|
|
|
#
|
mm/page_owner: keep track of page owners
This is the page owner tracking code which is introduced so far ago. It
is resident on Andrew's tree, though, nobody tried to upstream so it
remain as is. Our company uses this feature actively to debug memory leak
or to find a memory hogger so I decide to upstream this feature.
This functionality help us to know who allocates the page. When
allocating a page, we store some information about allocation in extra
memory. Later, if we need to know status of all pages, we can get and
analyze it from this stored information.
In previous version of this feature, extra memory is statically defined in
struct page, but, in this version, extra memory is allocated outside of
struct page. It enables us to turn on/off this feature at boottime
without considerable memory waste.
Although we already have tracepoint for tracing page allocation/free,
using it to analyze page owner is rather complex. We need to enlarge the
trace buffer for preventing overlapping until userspace program launched.
And, launched program continually dump out the trace buffer for later
analysis and it would change system behaviour with more possibility rather
than just keeping it in memory, so bad for debug.
Moreover, we can use page_owner feature further for various purposes. For
example, we can use it for fragmentation statistics implemented in this
patch. And, I also plan to implement some CMA failure debugging feature
using this interface.
I'd like to give the credit for all developers contributed this feature,
but, it's not easy because I don't know exact history. Sorry about that.
Below is people who has "Signed-off-by" in the patches in Andrew's tree.
Contributor:
Alexander Nyberg <alexn@dsv.su.se>
Mel Gorman <mgorman@suse.de>
Dave Hansen <dave@linux.vnet.ibm.com>
Minchan Kim <minchan@kernel.org>
Michal Nazarewicz <mina86@mina86.com>
Andrew Morton <akpm@linux-foundation.org>
Jungsoo Son <jungsoo.son@lge.com>
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Dave Hansen <dave@sr71.net>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Jungsoo Son <jungsoo.son@lge.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-12-13 03:56:01 +03:00
|
|
|
TARGETS=page-types slabinfo page_owner_sort
|
2013-02-20 19:32:33 +04:00
|
|
|
|
2013-12-09 20:14:23 +04:00
|
|
|
LIB_DIR = ../lib/api
|
2015-05-15 01:16:53 +03:00
|
|
|
LIBS = $(LIB_DIR)/libapi.a
|
2012-03-29 01:42:55 +04:00
|
|
|
|
|
|
|
CC = $(CROSS_COMPILE)gcc
|
2013-02-20 19:32:33 +04:00
|
|
|
CFLAGS = -Wall -Wextra -I../lib/
|
2013-12-09 20:14:23 +04:00
|
|
|
LDFLAGS = $(LIBS)
|
2013-02-20 19:32:33 +04:00
|
|
|
|
2017-02-23 02:40:12 +03:00
|
|
|
all: $(TARGETS)
|
|
|
|
|
2013-12-09 20:14:23 +04:00
|
|
|
$(TARGETS): $(LIBS)
|
2013-02-20 19:32:33 +04:00
|
|
|
|
2013-12-09 20:14:23 +04:00
|
|
|
$(LIBS):
|
|
|
|
make -C $(LIB_DIR)
|
2012-03-29 01:42:55 +04:00
|
|
|
|
|
|
|
%: %.c
|
2013-02-20 19:32:33 +04:00
|
|
|
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
|
2012-03-29 01:42:55 +04:00
|
|
|
|
|
|
|
clean:
|
mm/page_owner: keep track of page owners
This is the page owner tracking code which is introduced so far ago. It
is resident on Andrew's tree, though, nobody tried to upstream so it
remain as is. Our company uses this feature actively to debug memory leak
or to find a memory hogger so I decide to upstream this feature.
This functionality help us to know who allocates the page. When
allocating a page, we store some information about allocation in extra
memory. Later, if we need to know status of all pages, we can get and
analyze it from this stored information.
In previous version of this feature, extra memory is statically defined in
struct page, but, in this version, extra memory is allocated outside of
struct page. It enables us to turn on/off this feature at boottime
without considerable memory waste.
Although we already have tracepoint for tracing page allocation/free,
using it to analyze page owner is rather complex. We need to enlarge the
trace buffer for preventing overlapping until userspace program launched.
And, launched program continually dump out the trace buffer for later
analysis and it would change system behaviour with more possibility rather
than just keeping it in memory, so bad for debug.
Moreover, we can use page_owner feature further for various purposes. For
example, we can use it for fragmentation statistics implemented in this
patch. And, I also plan to implement some CMA failure debugging feature
using this interface.
I'd like to give the credit for all developers contributed this feature,
but, it's not easy because I don't know exact history. Sorry about that.
Below is people who has "Signed-off-by" in the patches in Andrew's tree.
Contributor:
Alexander Nyberg <alexn@dsv.su.se>
Mel Gorman <mgorman@suse.de>
Dave Hansen <dave@linux.vnet.ibm.com>
Minchan Kim <minchan@kernel.org>
Michal Nazarewicz <mina86@mina86.com>
Andrew Morton <akpm@linux-foundation.org>
Jungsoo Son <jungsoo.son@lge.com>
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Dave Hansen <dave@sr71.net>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Jungsoo Son <jungsoo.son@lge.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-12-13 03:56:01 +03:00
|
|
|
$(RM) page-types slabinfo page_owner_sort
|
2013-12-09 20:14:23 +04:00
|
|
|
make -C $(LIB_DIR) clean
|
2017-02-23 02:40:12 +03:00
|
|
|
|
|
|
|
sbindir ?= /usr/sbin
|
|
|
|
|
|
|
|
install: all
|
|
|
|
install -d $(DESTDIR)$(sbindir)
|
|
|
|
install -m 755 -p $(TARGETS) $(DESTDIR)$(sbindir)
|