From: kernel test robot <lkp@intel.com>
To: kernel@openeuler.org, Wang Wensheng <wangwensheng4@huawei.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [openeuler:OLK-6.6 1369/14216] mm/share_pool.c:3305:12: warning: 'proc_usage_show' defined but not used
Date: Sat, 28 Sep 2024 03:43:40 +0800 [thread overview]
Message-ID: <202409280347.fIsKo3PM-lkp@intel.com> (raw)
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
reply other threads:[~2024-09-27 19:44 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=202409280347.fIsKo3PM-lkp@intel.com \
--to=lkp@intel.com \
--cc=kernel@openeuler.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=wangwensheng4@huawei.com \
/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 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.