Lines Matching refs:ios
193 .name = "track-ios",
243 * for tracking individual ios
1177 static inline void __account_m(struct io_stats *ios, struct blk_io_trace *t,
1181 ios->mwrites++;
1182 ios->mwrite_kb += t_kb(t);
1184 ios->mreads++;
1185 ios->mread_kb += t_kb(t);
1195 struct io_stats *ios = find_process_io_stats(t->pid);
1197 __account_m(ios, t, rw);
1201 static inline void __account_pc_queue(struct io_stats *ios,
1205 ios->qwrites_pc++;
1206 ios->qwrite_kb_pc += t_kb(t);
1208 ios->qreads_pc++;
1209 ios->qread_kb += t_kb(t);
1219 struct io_stats *ios = find_process_io_stats(t->pid);
1221 __account_pc_queue(ios, t, rw);
1225 static inline void __account_pc_issue(struct io_stats *ios, int rw,
1229 ios->iwrites_pc++;
1230 ios->iwrite_kb_pc += bytes >> 10;
1232 ios->ireads_pc++;
1233 ios->iread_kb_pc += bytes >> 10;
1243 struct io_stats *ios = find_process_io_stats(t->pid);
1245 __account_pc_issue(ios, rw, t->bytes);
1249 static inline void __account_pc_requeue(struct io_stats *ios,
1253 ios->wrqueue_pc++;
1254 ios->iwrite_kb_pc -= t_kb(t);
1256 ios->rrqueue_pc++;
1257 ios->iread_kb_pc -= t_kb(t);
1267 struct io_stats *ios = find_process_io_stats(t->pid);
1269 __account_pc_requeue(ios, t, rw);
1273 static inline void __account_pc_c(struct io_stats *ios, int rw)
1276 ios->cwrites_pc++;
1278 ios->creads_pc++;
1287 struct io_stats *ios = find_process_io_stats(t->pid);
1289 __account_pc_c(ios, rw);
1293 static inline void __account_queue(struct io_stats *ios, struct blk_io_trace *t,
1297 ios->qwrites++;
1298 ios->qwrite_kb += t_kb(t);
1300 ios->qreads++;
1301 ios->qread_kb += t_kb(t);
1311 struct io_stats *ios = find_process_io_stats(t->pid);
1313 __account_queue(ios, t, rw);
1317 static inline void __account_c(struct io_stats *ios, int rw, int bytes)
1320 ios->cwrites++;
1321 ios->cwrite_kb += bytes >> 10;
1323 ios->creads++;
1324 ios->cread_kb += bytes >> 10;
1334 struct io_stats *ios = find_process_io_stats(t->pid);
1336 __account_c(ios, rw, bytes);
1340 static inline void __account_issue(struct io_stats *ios, int rw,
1344 ios->iwrites++;
1345 ios->iwrite_kb += bytes >> 10;
1347 ios->ireads++;
1348 ios->iread_kb += bytes >> 10;
1358 struct io_stats *ios = find_process_io_stats(t->pid);
1360 __account_issue(ios, rw, t->bytes);
1364 static inline void __account_unplug(struct io_stats *ios, int timer)
1367 ios->timer_unplugs++;
1369 ios->io_unplugs++;
1378 struct io_stats *ios = find_process_io_stats(t->pid);
1380 __account_unplug(ios, timer);
1384 static inline void __account_requeue(struct io_stats *ios,
1388 ios->wrqueue++;
1389 ios->iwrite_kb -= t_kb(t);
1391 ios->rrqueue++;
1392 ios->iread_kb -= t_kb(t);
1402 struct io_stats *ios = find_process_io_stats(t->pid);
1404 __account_requeue(ios, t, rw);
1648 static void dump_io_stats(struct per_dev_info *pdi, struct io_stats *ios,
1655 fprintf(ofp, " Reads Queued: %s, %siB\t", size_cnv(x, ios->qreads, 0), size_cnv(y, ios->qread_kb, 1));
1656 fprintf(ofp, " Writes Queued: %s, %siB\n", size_cnv(x, ios->qwrites, 0), size_cnv(y, ios->qwrite_kb, 1));
1657 fprintf(ofp, " Read Dispatches: %s, %siB\t", size_cnv(x, ios->ireads, 0), size_cnv(y, ios->iread_kb, 1));
1658 fprintf(ofp, " Write Dispatches: %s, %siB\n", size_cnv(x, ios->iwrites, 0), size_cnv(y, ios->iwrite_kb, 1));
1659 fprintf(ofp, " Reads Requeued: %s\t\t", size_cnv(x, ios->rrqueue, 0));
1660 fprintf(ofp, " Writes Requeued: %s\n", size_cnv(x, ios->wrqueue, 0));
1661 fprintf(ofp, " Reads Completed: %s, %siB\t", size_cnv(x, ios->creads, 0), size_cnv(y, ios->cread_kb, 1));
1662 fprintf(ofp, " Writes Completed: %s, %siB\n", size_cnv(x, ios->cwrites, 0), size_cnv(y, ios->cwrite_kb, 1));
1663 fprintf(ofp, " Read Merges: %s, %siB\t", size_cnv(x, ios->mreads, 0), size_cnv(y, ios->mread_kb, 1));
1664 fprintf(ofp, " Write Merges: %s, %siB\n", size_cnv(x, ios->mwrites, 0), size_cnv(y, ios->mwrite_kb, 1));
1669 if (ios->qreads_pc || ios->qwrites_pc || ios->ireads_pc || ios->iwrites_pc ||
1670 ios->rrqueue_pc || ios->wrqueue_pc || ios->creads_pc || ios->cwrites_pc) {
1671 fprintf(ofp, " PC Reads Queued: %s, %siB\t", size_cnv(x, ios->qreads_pc, 0), size_cnv(y, ios->qread_kb_pc, 1));
1672 fprintf(ofp, " PC Writes Queued: %s, %siB\n", size_cnv(x, ios->qwrites_pc, 0), size_cnv(y, ios->qwrite_kb_pc, 1));
1673 fprintf(ofp, " PC Read Disp.: %s, %siB\t", size_cnv(x, ios->ireads_pc, 0), size_cnv(y, ios->iread_kb_pc, 1));
1674 fprintf(ofp, " PC Write Disp.: %s, %siB\n", size_cnv(x, ios->iwrites_pc, 0), size_cnv(y, ios->iwrite_kb_pc, 1));
1675 fprintf(ofp, " PC Reads Req.: %s\t\t", size_cnv(x, ios->rrqueue_pc, 0));
1676 fprintf(ofp, " PC Writes Req.: %s\n", size_cnv(x, ios->wrqueue_pc, 0));
1677 fprintf(ofp, " PC Reads Compl.: %s\t\t", size_cnv(x, ios->creads_pc, 0));
1678 fprintf(ofp, " PC Writes Compl.: %s\n", size_cnv(x, ios->cwrites, 0));
1680 fprintf(ofp, " IO unplugs: %'8lu%8c\t", ios->io_unplugs, ' ');
1681 fprintf(ofp, " Timer unplugs: %'8lu\n", ios->timer_unplugs);
1771 struct io_stats total, *ios;
1790 ios = &pci->io_stats;
1791 total.qreads += ios->qreads;
1792 total.qwrites += ios->qwrites;
1793 total.creads += ios->creads;
1794 total.cwrites += ios->cwrites;
1795 total.mreads += ios->mreads;
1796 total.mwrites += ios->mwrites;
1797 total.ireads += ios->ireads;
1798 total.iwrites += ios->iwrites;
1799 total.rrqueue += ios->rrqueue;
1800 total.wrqueue += ios->wrqueue;
1801 total.qread_kb += ios->qread_kb;
1802 total.qwrite_kb += ios->qwrite_kb;
1803 total.cread_kb += ios->cread_kb;
1804 total.cwrite_kb += ios->cwrite_kb;
1805 total.iread_kb += ios->iread_kb;
1806 total.iwrite_kb += ios->iwrite_kb;
1807 total.mread_kb += ios->mread_kb;
1808 total.mwrite_kb += ios->mwrite_kb;
1810 total.qreads_pc += ios->qreads_pc;
1811 total.qwrites_pc += ios->qwrites_pc;
1812 total.creads_pc += ios->creads_pc;
1813 total.cwrites_pc += ios->cwrites_pc;
1814 total.ireads_pc += ios->ireads_pc;
1815 total.iwrites_pc += ios->iwrites_pc;
1816 total.rrqueue_pc += ios->rrqueue_pc;
1817 total.wrqueue_pc += ios->wrqueue_pc;
1818 total.qread_kb_pc += ios->qread_kb_pc;
1819 total.qwrite_kb_pc += ios->qwrite_kb_pc;
1820 total.iread_kb_pc += ios->iread_kb_pc;
1821 total.iwrite_kb_pc += ios->iwrite_kb_pc;
1823 total.timer_unplugs += ios->timer_unplugs;
1824 total.io_unplugs += ios->io_unplugs;
1828 dump_io_stats(pdi, ios, line);
2672 "[ -t | --track-ios ]\n" \
2689 "\t-t Track individual ios. Will tell you the time a request took\n" \