* [openeuler:OLK-6.6 1369/14216] mm/share_pool.c:3305:12: warning: 'proc_usage_show' defined but not used
@ 2024-09-27 19:43 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-09-27 19:43 UTC (permalink / raw)
To: kernel, Wang Wensheng; +Cc: oe-kbuild-all
Hi Wang,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: c9fe32fed709da98069e8215f6ecf39ea63f5355
commit: df165ba49e6e4ce8b4f6076aded3b92e19918b03 [1369/14216] mm/sharepool: Add proc interfaces to show sp info
config: arm64-randconfig-002-20240928 (https://download.01.org/0day-ci/archive/20240928/202409280347.fIsKo3PM-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409280347.fIsKo3PM-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409280347.fIsKo3PM-lkp@intel.com/
All warnings (new ones prefixed by >>):
mm/share_pool.c: In function 'sp_unshare_kva':
mm/share_pool.c:2796:14: warning: variable 'is_hugepage' set but not used [-Wunused-but-set-variable]
2796 | bool is_hugepage = true;
| ^~~~~~~~~~~
mm/share_pool.c: At top level:
>> mm/share_pool.c:3305:12: warning: 'proc_usage_show' defined but not used [-Wunused-function]
3305 | static int proc_usage_show(struct seq_file *seq, void *offset)
| ^~~~~~~~~~~~~~~
>> mm/share_pool.c:3285:12: warning: 'proc_group_usage_show' defined but not used [-Wunused-function]
3285 | static int proc_group_usage_show(struct seq_file *seq, void *offset)
| ^~~~~~~~~~~~~~~~~~~~~
mm/share_pool.c:3234:12: warning: 'spa_stat_show' defined but not used [-Wunused-function]
3234 | static int spa_stat_show(struct seq_file *seq, void *offset)
| ^~~~~~~~~~~~~
vim +/proc_usage_show +3305 mm/share_pool.c
3284
> 3285 static int proc_group_usage_show(struct seq_file *seq, void *offset)
3286 {
3287 if (!should_show_statistics())
3288 return -EPERM;
3289
3290 spg_overview_show(seq);
3291 spa_overview_show(seq);
3292
3293 /* print the file header */
3294 seq_printf(seq, "%-8s %-8s %-9s %-9s %-9s %-8s %-7s %-7s %-4s\n",
3295 "PID", "Group_ID", "SP_ALLOC", "SP_K2U", "SP_RES",
3296 "VIRT", "RES", "Shm", "PROT");
3297
3298 down_read(&sp_global_sem);
3299 idr_for_each(&sp_group_idr, proc_usage_by_group, seq);
3300 up_read(&sp_global_sem);
3301
3302 return 0;
3303 }
3304
> 3305 static int proc_usage_show(struct seq_file *seq, void *offset)
3306 {
3307 struct sp_group_master *master = NULL;
3308 unsigned long anon, file, shmem, total_rss;
3309 long sp_res, sp_res_nsize, non_sp_res, non_sp_shm;
3310 struct sp_meminfo *meminfo;
3311
3312 if (!should_show_statistics())
3313 return -EPERM;
3314
3315 seq_printf(seq, "%-8s %-16s %-9s %-9s %-9s %-10s %-10s %-8s\n",
3316 "PID", "COMM", "SP_ALLOC", "SP_K2U", "SP_RES", "Non-SP_RES",
3317 "Non-SP_Shm", "VIRT");
3318
3319 down_read(&sp_global_sem);
3320 mutex_lock(&master_list_lock);
3321 list_for_each_entry(master, &master_list, list_node) {
3322 meminfo = &master->meminfo;
3323 get_mm_rss_info(master->mm, &anon, &file, &shmem, &total_rss);
3324 get_process_sp_res(master, &sp_res, &sp_res_nsize);
3325 get_process_non_sp_res(total_rss, shmem, sp_res_nsize,
3326 &non_sp_res, &non_sp_shm);
3327 seq_printf(seq, "%-8d %-16s %-9ld %-9ld %-9ld %-10ld %-10ld %-8ld\n",
3328 master->tgid, master->comm,
3329 meminfo_alloc_sum_byKB(meminfo),
3330 meminfo_k2u_size(meminfo),
3331 sp_res, non_sp_res, non_sp_shm,
3332 page2kb(master->mm->total_vm));
3333 }
3334 mutex_unlock(&master_list_lock);
3335 up_read(&sp_global_sem);
3336
3337 return 0;
3338 }
3339
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-27 19:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-27 19:43 [openeuler:OLK-6.6 1369/14216] mm/share_pool.c:3305:12: warning: 'proc_usage_show' defined but not used kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.