lkml.org 
[lkml]   [2019]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjecttmpfs - what portion of a tmpfs partition is swapped out
Date
Hi,

I have an embedded platform running Linux 3.12.x with rootfs
uncompressed to RAM and using a tmpfs partition. I also use ZRAM on this
platform, so I expect parts of the root filesystem to get swapped out
over time. I'm struggling with poor performance which I believe is
somehow related to swapping. I'm able to measure the number of pages
swapped in and out, I'm also able to measure the amount of swapped
memory for user-space processes (thanks to Android's procrank tool).

Now in order to fully understand what happens within the system I'd like
to measure what portion of the root filesystem is swapped to ZRAM.

I found that include/linux/shmem_fs.h contains 'struct shmem_inode_info'
which on the other hand contains 'swapped' field. If I'm correct then
iterating over all inodes from the root filesystem and summing up the
values of this field should provide me with the result. Is that correct?

I'm not a regular Linux kernel developer so any help on implementing
this would be appreciated.

Best regards,
Adam Romanek

\
 
 \ /
  Last update: 2019-03-15 07:31    [W:0.290 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site