Re: [PATCH] xfs: dump cache size with sysfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Christoph,

> On May 7, 2025, at 10:54 PM, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> 
> This is an awful lot of code.  Why can't this be done in eBPF
> using the existing tracepoints?
> 

Thanks for the idea of eBPF.
As I understand it, tracepoints are fired only when code got run say when xfs_buf is 
allocated and released. With eBPF, we are able to track the allocation/release, but
I have some things to consider: 

1. We have to keep the script running all the time since system boot up to get the
    counting? If the eBPF script gets killed somehow, we can no longer can get correct
    info again until next kernel rebooting? 
2. eBPF script is not guaranteed to be ready before changes in buffer cache? So the
  eBPF output might not be what it really is in kernel?
3. to run ePBF, it requires extra packages to be installed. But those packages could
    be not available on customer’s production systems, right?
3. Also, it looks much complex than a single ‘cat /sys/fs/xfs/<dev>/cache/size’.


What’s the concern to add the syses code? Though the patch looks big
(but not really very big), It’s simple and direct.

Thanks,
Wengang

> Btw, it would be nice to collect such scripts in say xfsprogs.
> 





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux