From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Dmitry Rokosov <ddrokosov@sberdevices.ru>
Cc: Herve Codina <herve.codina@bootlin.com>,
sdfw_system_team@sberdevices.ru,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
buildroot@buildroot.org, kernel@sberdevices.ru,
rockosov@gmail.com
Subject: Re: [Buildroot] [PATCH v1] package/linux-tools: introduce linux mm tools
Date: Mon, 26 Jun 2023 17:47:19 +0200 [thread overview]
Message-ID: <20230626154719.GC646621@scaer> (raw)
In-Reply-To: <20230626121237.4z7alvantlkjc7ha@CAB-WSD-L081021>
Dmitry, All,
On 2023-06-26 15:12 +0300, Dmitry Rokosov spake thusly:
> Please take a look into this patchset. I appreciate any feedback.
Don't be impatient. Your patch has been pending for about two seeks now.
We have 495 pending patches: https://patchwork.ozlabs.org/project/buildroot/list/
some of witch are so much older...
Yes, I know it can be frustrating. For various reasons, we've been a bit
less active than usual the past few months, but we'll eventually get to
it...
Regards,
Yann E. MORIN.
> On Thu, Jun 22, 2023 at 08:18:06PM +0300, Dmitry Rokosov wrote:
> > Hello,
> >
> > Add Peter Korsgaard and move "buildroot" mailing list from Cc.
> >
> > Could you please take a look at this patchset? I believe that linux-mm
> > tools are helpful for investigating kernel memory distribution in
> > embedded systems.
> >
> > On Fri, Jun 09, 2023 at 02:34:15PM +0300, Dmitry Rokosov wrote:
> > > This toolset was designed to facilitate the testing, monitoring, and
> > > tracing of various things with virtual memory, pages, and slab objects.
> > > It is an invaluable resource for identifying and analyzing
> > > memory-related issues, such as leaks and bottlenecks, and can greatly
> > > enhance one's understanding of memory utilization within a system.
> > >
> > > The mm toolset includes:
> > > - page_owner_sort: userspace helper to sort the output of
> > > /sys/kernel/debug/page_owner, which helps to know who allocates
> > > the page from kernel context
> > > - slabinfo: the tool which gets reports about slabs, for example
> > > show empty slabs, modify of slab debug options at runtime, display
> > > all information about a slabcache
> > > - page-types: a handy tool for querying page flags
> > >
> > > Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
> > > ---
> > > package/linux-tools/Config.in | 18 ++++++++
> > > package/linux-tools/linux-tool-mm.mk.in | 59 +++++++++++++++++++++++++
> > > 2 files changed, 77 insertions(+)
> > > create mode 100644 package/linux-tools/linux-tool-mm.mk.in
> > >
> > > diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in
> > > index 880ad08f0f1c..3ecc45574b82 100644
> > > --- a/package/linux-tools/Config.in
> > > +++ b/package/linux-tools/Config.in
> > > @@ -171,4 +171,22 @@ config BR2_PACKAGE_LINUX_TOOLS_HV_VSS_DAEMON
> > >
> > > endif # BR2_PACKAGE_LINUX_TOOLS_HV
> > >
> > > +config BR2_PACKAGE_LINUX_TOOLS_MM
> > > + bool "mm"
> > > + select BR2_PACKAGE_LINUX_TOOLS
> > > + help
> > > + mm is a toolset for testing/monitoring/tracing vm/pages/slabs objects.
> > > +
> > > + - page_owner_sort: userspace helper to sort the output of
> > > + /sys/kernel/debug/page_owner, which helps to know who allocates
> > > + the page from kernel context
> > > +
> > > + - slabinfo: the tool which gets reports about slabs, for example
> > > + show empty slabs, modify of slab debug options at runtime, display
> > > + all information about a slabcache
> > > +
> > > + - page-types: a handy tool for querying page flags
> > > +
> > > + These tools are available only from kernel version 3.4.
> > > +
> > > endmenu
> > > diff --git a/package/linux-tools/linux-tool-mm.mk.in b/package/linux-tools/linux-tool-mm.mk.in
> > > new file mode 100644
> > > index 000000000000..a59f1c46ff97
> > > --- /dev/null
> > > +++ b/package/linux-tools/linux-tool-mm.mk.in
> > > @@ -0,0 +1,59 @@
> > > +################################################################################
> > > +#
> > > +# mm
> > > +#
> > > +################################################################################
> > > +
> > > +LINUX_TOOLS += mm
> > > +
> > > +MM_MAKE_OPTS = $(LINUX_MAKE_FLAGS) CC="$(TARGET_CC)"
> > > +
> > > +KVER = $(shell echo $(LINUX_VERSION_PROBED))
> > > +KVER_MAJOR = $(word 1,$(subst ., ,$(KVER)))
> > > +KVER_MINOR = $(word 2,$(subst ., ,$(KVER)))
> > > +
> > > +# For the first time tools/vm was introduced in the 3.4 kernel version
> > > +KVER_MAJOR_MIN = 3
> > > +KVER_MINOR_MIN = 4
> > > +
> > > +# Starting from 6.3 kernel version mm tools are located at tools/mm folder
> > > +# instead of tools/vm
> > > +KVER_MAJOR_MM = 6
> > > +KVER_MINOR_MM = 3
> > > +
> > > +define MM_BUILD_CMDS
> > > + $(Q)if [ $(KVER_MAJOR) -lt $(KVER_MAJOR_MIN) ] || \
> > > + [ $(KVER_MAJOR) -eq $(KVER_MAJOR_MIN) -a \
> > > + $(KVER_MINOR) -lt $(KVER_MINOR_MIN) ]; then \
> > > + echo -n "Your kernel version $(KVER_MAJOR).$(KVER_MINOR) is "; \
> > > + echo "too old and doesn't have the mm tools." ; \
> > > + echo -n "At least $(KVER_MAJOR_MIN).$(KVER_MINOR_MIN) "; \
> > > + echo "kernel must be used." ; \
> > > + exit 1 ; \
> > > + fi
> > > +
> > > + $(Q)if [ $(KVER_MAJOR) -gt $(KVER_MAJOR_MM) ] || \
> > > + [ $(KVER_MAJOR) -eq $(KVER_MAJOR_MM) -a \
> > > + $(KVER_MINOR) -ge $(KVER_MINOR_MM) ]; then \
> > > + MM=mm; \
> > > + else \
> > > + MM=vm; \
> > > + fi; \
> > > + $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools \
> > > + $(MM_MAKE_OPTS) $${MM}
> > > +endef
> > > +
> > > +define MM_INSTALL_TARGET_CMDS
> > > + $(Q)if [ $(KVER_MAJOR) -gt $(KVER_MAJOR_MM) ] || \
> > > + [ $(KVER_MAJOR) -eq $(KVER_MAJOR_MM) -a \
> > > + $(KVER_MINOR) -ge $(KVER_MINOR_MM) ]; then \
> > > + MM=mm; \
> > > + else \
> > > + MM=vm; \
> > > + fi; \
> > > + $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools \
> > > + $(MM_MAKE_OPTS) \
> > > + INSTALL_ROOT=$(TARGET_DIR) \
> > > + DESTDIR=$(TARGET_DIR) \
> > > + $${MM}_install
> > > +endef
> > > --
> > > 2.36.0
> > >
> >
> > --
> > Thank you,
> > Dmitry
>
> --
> Thank you,
> Dmitry
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-06-26 15:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 11:34 [Buildroot] [PATCH v1] package/linux-tools: introduce linux mm tools Dmitry Rokosov via buildroot
2023-06-22 17:18 ` Dmitry Rokosov via buildroot
2023-06-26 12:12 ` Dmitry Rokosov via buildroot
2023-06-26 15:47 ` Yann E. MORIN [this message]
2023-06-27 10:24 ` Dmitry Rokosov via buildroot
[not found] ` <m25xz16e14.fsf@ja.int.chopps.org>
[not found] ` <20240206115217.3r43du5b4wnt23a7@CAB-WSD-L081021>
2024-02-06 19:47 ` Dmitry Rokosov via buildroot
2023-07-23 9:14 ` Thomas Petazzoni via buildroot
2023-07-24 11:03 ` Dmitry Rokosov via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230626154719.GC646621@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=ddrokosov@sberdevices.ru \
--cc=herve.codina@bootlin.com \
--cc=kernel@sberdevices.ru \
--cc=rockosov@gmail.com \
--cc=sdfw_system_team@sberdevices.ru \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox