~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/admin-guide/mm/shrinker_debugfs.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/admin-guide/mm/shrinker_debugfs.rst (Version linux-6.12-rc7) and /Documentation/admin-guide/mm/shrinker_debugfs.rst (Version linux-5.10.229)


  1 ==========================                        
  2 Shrinker Debugfs Interface                        
  3 ==========================                        
  4                                                   
  5 Shrinker debugfs interface provides a visibili    
  6 shrinkers subsystem and allows to get informat    
  7 and interact with them.                           
  8                                                   
  9 For each shrinker registered in the system a d    
 10 is created. The directory's name is composed f    
 11 unique id: e.g. *kfree_rcu-0* or *sb-xfs:vda1-    
 12                                                   
 13 Each shrinker directory contains **count** and    
 14 trigger *count_objects()* and *scan_objects()*    
 15 numa node (if applicable).                        
 16                                                   
 17 Usage:                                            
 18 ------                                            
 19                                                   
 20 1. *List registered shrinkers*                    
 21                                                   
 22   ::                                              
 23                                                   
 24     $ cd /sys/kernel/debug/shrinker/              
 25     $ ls                                          
 26     dquota-cache-16     sb-devpts-28     sb-pr    
 27     mm-shadow-18        sb-devtmpfs-5    sb-pr    
 28     mm-zspool:zram0-34  sb-hugetlbfs-17  sb-ps    
 29     rcu-kfree-0         sb-hugetlbfs-33  sb-ro    
 30     sb-aio-20           sb-iomem-12      sb-se    
 31     sb-anon_inodefs-15  sb-mqueue-21     sb-se    
 32     sb-bdev-3           sb-nsfs-4        sb-so    
 33     sb-bpf-32           sb-pipefs-14     sb-sy    
 34     sb-btrfs:vda2-24    sb-proc-25       sb-tm    
 35     sb-cgroup2-30       sb-proc-39       sb-tm    
 36     sb-configfs-23      sb-proc-41       sb-tm    
 37     sb-dax-11           sb-proc-45       sb-tm    
 38     sb-debugfs-7        sb-proc-46       sb-tm    
 39                                                   
 40 2. *Get information about a specific shrinker*    
 41                                                   
 42   ::                                              
 43                                                   
 44     $ cd sb-btrfs\:vda2-24/                       
 45     $ ls                                          
 46     count            scan                         
 47                                                   
 48 3. *Count objects*                                
 49                                                   
 50   Each line in the output has the following fo    
 51                                                   
 52     <cgroup inode id> <nr of objects on node 0    
 53     <cgroup inode id> <nr of objects on node 0    
 54     ...                                           
 55                                                   
 56   If there are no objects on all numa nodes, a    
 57   are no objects at all, the output might be e    
 58                                                   
 59   If the shrinker is not memcg-aware or CONFIG    
 60   as cgroup inode id. If the shrinker is not n    
 61   for all nodes except the first one.             
 62   ::                                              
 63                                                   
 64     $ cat count                                   
 65     1 224 2                                       
 66     21 98 0                                       
 67     55 818 10                                     
 68     2367 2 0                                      
 69     2401 30 0                                     
 70     225 13 0                                      
 71     599 35 0                                      
 72     939 124 0                                     
 73     1041 3 0                                      
 74     1075 1 0                                      
 75     1109 1 0                                      
 76     1279 60 0                                     
 77     1313 7 0                                      
 78     1347 39 0                                     
 79     1381 3 0                                      
 80     1449 14 0                                     
 81     1483 63 0                                     
 82     1517 53 0                                     
 83     1551 6 0                                      
 84     1585 1 0                                      
 85     1619 6 0                                      
 86     1653 40 0                                     
 87     1687 11 0                                     
 88     1721 8 0                                      
 89     1755 4 0                                      
 90     1789 52 0                                     
 91     1823 888 0                                    
 92     1857 1 0                                      
 93     1925 2 0                                      
 94     1959 32 0                                     
 95     2027 22 0                                     
 96     2061 9 0                                      
 97     2469 799 0                                    
 98     2537 861 0                                    
 99     2639 1 0                                      
100     2707 70 0                                     
101     2775 4 0                                      
102     2877 84 0                                     
103     293 1 0                                       
104     735 8 0                                       
105                                                   
106 4. *Scan objects*                                 
107                                                   
108   The expected input format::                     
109                                                   
110     <cgroup inode id> <numa id> <number of obj    
111                                                   
112   For a non-memcg-aware shrinker or on a syste    
113   cgrups **0** should be passed as cgroup id.     
114   ::                                              
115                                                   
116     $ cd /sys/kernel/debug/shrinker/              
117     $ cd sb-btrfs\:vda2-24/                       
118                                                   
119     $ cat count | head -n 5                       
120     1 212 0                                       
121     21 97 0                                       
122     55 802 5                                      
123     2367 2 0                                      
124     225 13 0                                      
125                                                   
126     $ echo "55 0 200" > scan                      
127                                                   
128     $ cat count | head -n 5                       
129     1 212 0                                       
130     21 96 0                                       
131     55 752 5                                      
132     2367 2 0                                      
133     225 13 0                                      
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php