tree: https://github.com/ceph/ceph-client.git testing head: ddbb6c1aee607cf1b84f4985c035163f5321be72 commit: 067c33483fef4c48d774c66902b3bd8b86b9add7 [2/8] ceph: periodically send perf metrics to ceph config: ia64-randconfig-r006-20200724 (attached as .config) compiler: ia64-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 067c33483fef4c48d774c66902b3bd8b86b9add7 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): In file included from arch/ia64/include/asm/pgtable.h:154, from include/linux/pgtable.h:6, from arch/ia64/include/asm/uaccess.h:40, from include/linux/uaccess.h:11, from include/linux/crypto.h:21, from include/crypto/hash.h:11, from include/linux/uio.h:10, from include/linux/socket.h:8, from include/uapi/linux/in.h:24, from include/linux/in.h:19, from include/linux/ceph/types.h:6, from fs/ceph/mds_client.h:15, from fs/ceph/metric.c:9: arch/ia64/include/asm/mmu_context.h: In function 'reload_context': arch/ia64/include/asm/mmu_context.h:137:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable] 137 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4; | ^~~~~~~ fs/ceph/metric.c: In function 'ceph_mdsc_send_metrics': >> fs/ceph/metric.c:23:11: warning: variable 'total' set but not used [-Wunused-but-set-variable] 23 | s64 sum, total; | ^~~~~ vim +/total +23 fs/ceph/metric.c 10 11 static bool ceph_mdsc_send_metrics(struct ceph_mds_client *mdsc, 12 struct ceph_mds_session *s) 13 { 14 struct ceph_metric_head *head; 15 struct ceph_metric_cap *cap; 16 struct ceph_metric_read_latency *read; 17 struct ceph_metric_write_latency *write; 18 struct ceph_metric_metadata_latency *meta; 19 struct ceph_client_metric *m = &mdsc->metric; 20 u64 nr_caps = atomic64_read(&m->total_caps); 21 struct ceph_msg *msg; 22 struct timespec64 ts; > 23 s64 sum, total; 24 s32 items = 0; 25 s32 len; 26 27 len = sizeof(*head) + sizeof(*cap) + sizeof(*read) + sizeof(*write) 28 + sizeof(*meta); 29 30 msg = ceph_msg_new(CEPH_MSG_CLIENT_METRICS, len, GFP_NOFS, true); 31 if (!msg) { 32 pr_err("send metrics to mds%d, failed to allocate message\n", 33 s->s_mds); 34 return false; 35 } 36 37 head = msg->front.iov_base; 38 39 /* encode the cap metric */ 40 cap = (struct ceph_metric_cap *)(head + 1); 41 cap->type = cpu_to_le32(CLIENT_METRIC_TYPE_CAP_INFO); 42 cap->ver = 1; 43 cap->compat = 1; 44 cap->data_len = cpu_to_le32(sizeof(*cap) - 10); 45 cap->hit = cpu_to_le64(percpu_counter_sum(&mdsc->metric.i_caps_hit)); 46 cap->mis = cpu_to_le64(percpu_counter_sum(&mdsc->metric.i_caps_mis)); 47 cap->total = cpu_to_le64(nr_caps); 48 items++; 49 50 /* encode the read latency metric */ 51 read = (struct ceph_metric_read_latency *)(cap + 1); 52 read->type = cpu_to_le32(CLIENT_METRIC_TYPE_READ_LATENCY); 53 read->ver = 1; 54 read->compat = 1; 55 read->data_len = cpu_to_le32(sizeof(*read) - 10); 56 total = m->total_reads; 57 sum = m->read_latency_sum; 58 jiffies_to_timespec64(sum, &ts); 59 read->sec = cpu_to_le32(ts.tv_sec); 60 read->nsec = cpu_to_le32(ts.tv_nsec); 61 items++; 62 63 /* encode the write latency metric */ 64 write = (struct ceph_metric_write_latency *)(read + 1); 65 write->type = cpu_to_le32(CLIENT_METRIC_TYPE_WRITE_LATENCY); 66 write->ver = 1; 67 write->compat = 1; 68 write->data_len = cpu_to_le32(sizeof(*write) - 10); 69 total = m->total_writes; 70 sum = m->write_latency_sum; 71 jiffies_to_timespec64(sum, &ts); 72 write->sec = cpu_to_le32(ts.tv_sec); 73 write->nsec = cpu_to_le32(ts.tv_nsec); 74 items++; 75 76 /* encode the metadata latency metric */ 77 meta = (struct ceph_metric_metadata_latency *)(write + 1); 78 meta->type = cpu_to_le32(CLIENT_METRIC_TYPE_METADATA_LATENCY); 79 meta->ver = 1; 80 meta->compat = 1; 81 meta->data_len = cpu_to_le32(sizeof(*meta) - 10); 82 total = m->total_metadatas; 83 sum = m->metadata_latency_sum; 84 jiffies_to_timespec64(sum, &ts); 85 meta->sec = cpu_to_le32(ts.tv_sec); 86 meta->nsec = cpu_to_le32(ts.tv_nsec); 87 items++; 88 89 put_unaligned_le32(items, &head->num); 90 msg->front.iov_len = len; 91 msg->hdr.version = cpu_to_le16(1); 92 msg->hdr.compat_version = cpu_to_le16(1); 93 msg->hdr.front_len = cpu_to_le32(msg->front.iov_len); 94 dout("client%llu send metrics to mds%d\n", 95 ceph_client_gid(mdsc->fsc->client), s->s_mds); 96 ceph_con_send(&s->s_con, msg); 97 98 return true; 99 } 100 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip