From: Adam Romanek <romanek.adam@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: tmpfs - what portion of a tmpfs partition is swapped out
Date: Fri, 15 Mar 2019 07:30:16 +0100 [thread overview]
Message-ID: <621914d0-504c-aef8-895a-2dcaa10e5456@gmail.com> (raw)
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
reply other threads:[~2019-03-15 6:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=621914d0-504c-aef8-895a-2dcaa10e5456@gmail.com \
--to=romanek.adam@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®