public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1 0/3] cachestat testing suite
Date: Mon, 15 Jul 2024 18:00:30 +0200	[thread overview]
Message-ID: <ZpVHnkY5mptj6ETA@yuki> (raw)
In-Reply-To: <ZpUWaGR0BmgT1j8E@yuki>

Hi!
> > I had to go through the cachestat code and maybe i found the solution. I 
> > will send the tests soon.
> 
> I had a look as well and it looks that cachestat should work fine for
> all file descriptors that can be mmaped(). So as long as you get success
> for a file descriptor that returns EBADF for mmap() it shouldn't
> probably work with cachestat() either.

And after more staring at the kernel sources I've found that:

- anonymous inodes have the page cache mappings initialized to zeros and
  empty list
- this is not used for anything for most types of file descriptors (e.g.
  sockets)

So if you call cacestat() on a socket fd it will try to loop over empty
list of vmas and the end result would be statistics that are full of
zeroes. Maybe that is worth of a special test just for this case.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2024-07-15 16:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-16 10:42 [LTP] [PATCH v1 0/3] cachestat testing suite Andrea Cervesato
2024-05-16 10:42 ` [LTP] [PATCH v1 1/3] Add cachestat fallback definitions Andrea Cervesato
2024-05-16 10:42 ` [LTP] [PATCH v1 2/3] Add cachestat01 and cachestat01A tests Andrea Cervesato
2024-07-08 14:29   ` Cyril Hrubis
2024-05-16 10:42 ` [LTP] [PATCH v1 3/3] Add cachestat02 test Andrea Cervesato
2024-07-08 14:38 ` [LTP] [PATCH v1 0/3] cachestat testing suite Cyril Hrubis
2024-07-08 14:41   ` Cyril Hrubis
2024-07-15 10:58   ` Andrea Cervesato via ltp
2024-07-15 11:03   ` Andrea Cervesato via ltp
2024-07-15 12:08     ` Cyril Hrubis
2024-07-15 12:14       ` Andrea Cervesato via ltp
2024-07-15 12:30         ` Cyril Hrubis
2024-07-15 16:00           ` Cyril Hrubis [this message]
2024-07-16  8:16             ` Cyril Hrubis

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=ZpVHnkY5mptj6ETA@yuki \
    --to=chrubis@suse.cz \
    --cc=andrea.cervesato@suse.com \
    --cc=ltp@lists.linux.it \
    /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