|
|
Subscribe / Log in / New account

Collect memory utilization of a driver

Collect memory utilization of a driver

Posted Apr 14, 2025 8:31 UTC (Mon) by taladar (subscriber, #68407)
In reply to: Collect memory utilization of a driver by yanjun.zhu
Parent article: Preparing DAMON for future memory-management problems

Shouldn't that just be the code size of that module?

Isn't the actually interesting bit how much the driver allocates for data over its lifetime that wouldn't be allocated if the driver was not in use?


to post comments

Collect memory utilization of a driver

Posted Apr 14, 2025 8:36 UTC (Mon) by yanjun.zhu (guest, #173290) [Link] (2 responses)

Not at all. Actually, I am interested in how much memory will be used when a driver is loaded into kernel. You know sometimes a lot of memory will be allocated at initialization phase when a driver is loaded into kernel.
I wonder if there is a method to check how much memory will be used when a driver is loaded into kernel directly and conviently.

Collect memory utilization of a driver

Posted Apr 14, 2025 8:48 UTC (Mon) by adobriyan (subscriber, #30858) [Link] (1 responses)

There is no such method. You load the driver and recalculate slab/vmalloc/percpu stats.

Collect memory utilization of a driver

Posted Apr 14, 2025 9:12 UTC (Mon) by yanjun.zhu (guest, #173290) [Link]

Exactly. It is the only way that we can do currently.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds