# SPDX-License-Identifier: GPL-2.0 from __future__ import print_function data = {} times = [] threads = [] cpus = [] def get_key(time, event, cpu, thread): return "%d-%s-%d-%d" % (time, event, cpu, thread) def store_key(time, cpu, thread): if (time not in times): times.append(time) if (cpu not in cpus): cpus.append(cpu) if (thread not in threads): threads.append(thread) def store(time, event, cpu, thread, val, ena, run): #print("event %s cpu %d, thread %d, time %d, val %d, ena %d, run %d" % # (event, cpu, thread, time, val, ena, run)) store_key(time, cpu, thread) key = get_key(time, event, cpu, thread) data[key] = [ val, ena, run] def get(time, event, cpu, thread): key = get_key(time, event, cpu, thread) return data[key][0] def stat__cycles_k(cpu, thread, time, val, ena, run): store(time, "cycles", cpu, thread, val, ena, run); def stat__instructions_k(cpu, thread, time, val, ena, run): store(time, "instructions", cpu, thread, val, ena, run); def stat__cycles_u(cpu, thread, time, val, ena, run): store(time, "cycles", cpu, thread, val, ena, run); def stat__instructions_u(cpu, thread, time, val, ena, run): store(time, "instructions", cpu, thread, val, ena, run); def stat__cycles(cpu, thread, time, val, ena, run): store(time, "cycles", cpu, thread, val, ena, run); def stat__instructions(cpu, thread, time, val, ena, run): store(time, "instructions", cpu, thread, val, ena, run); def stat__interval(time): for cpu in cpus: for thread in threads: cyc = get(time, "cycles", cpu, thread) ins = get(time, "instructions", cpu, thread) cpi = 0 if ins != 0: cpi = cyc/float(ins) print("%15f: cpu %d, thread %d -> cpi %f (%d/%d)" % (time/(float(1000000000)), cpu, thread, cpi, cyc, ins)) def trace_end(): pass # XXX trace_end callback could be used as an alternative place # to compute same values as in the script above: # # for time in times: # for cpu in cpus: # for thread in threads: # cyc = get(time, "cycles", cpu, thread) # ins = get(time, "instructions", cpu, thread) # # if ins != 0: # cpi = cyc/float(ins) # # print("time %.9f, cpu %d, thread %d -> cpi %f" % (time/(float(1000000000)), cpu, thread, cpi)) -2.6.38.y'>linux-2.6.38.y Hosts the 0x221E linux distro kernel.Ubuntu
summaryrefslogtreecommitdiff
path: root/mm/readahead.c
AgeCommit message (Expand)Author
2022-09-20mm: add PSI accounting around ->read_folio and ->readahead callsChristoph Hellwig
2022-06-23filemap: Fix serialization adding transparent huge pages to page cacheAlistair Popple
2022-06-09filemap: Don't release a locked folioMatthew Wilcox (Oracle)
2022-05-31Merge tag 'riscv-for-linus-5.19-mw0' of git://git.kernel.org/pub/scm/linux/ke...Linus Torvalds
2022-05-24Merge tag 'folio-5.19' of git://git.infradead.org/users/willy/pagecacheLinus Torvalds
2022-05-23Merge tag 'for-5.19/block-2022-05-22' of git://git.kernel.dk/linux-blockLinus Torvalds
2022-05-09mm,fs: Remove aops->readpageMatthew Wilcox (Oracle)
2022-05-09fs: Introduce aops->read_folioMatthew Wilcox (Oracle)
2022-05-08readahead: Use a folio in read_pages()Matthew Wilcox (Oracle)
2022-05-05mm/readahead: Fix readahead with large foliosMatthew Wilcox (Oracle)
2022-05-02blk-cgroup: remove unneeded includes from <linux/blk-cgroup.h>Christoph Hellwig
2022-04-26riscv: compat: syscall: Add compat_sys_call_table implementationGuo Ren
2022-04-01readahead: Update commentsMatthew Wilcox (Oracle)
2022-04-01mm: remove the skip_page argument to read_pagesChristoph Hellwig
2022-04-01mm: remove the pages argument to read_pagesChristoph Hellwig
2022-04-01fs: Remove ->readpages address space operationMatthew Wilcox (Oracle)
2022-04-01readahead: Remove read_cache_pages()Matthew Wilcox (Oracle)
2022-03-22Merge tag 'folio-5.18b' of git://git.infradead.org/users/willy/pagecacheLinus Torvalds
2022-03-22Merge tag 'folio-5.18c' of git://git.infradead.org/users/willy/pagecacheLinus Torvalds
2022-03-22remove inode_congested()NeilBrown
2022-03-22mm: improve cleanup when ->readpages doesn't process all pagesNeilBrown
2022-03-22mm: document and polish read-ahead codeNeilBrown
2022-03-21mm/readahead: Switch to page_cache_ra_orderMatthew Wilcox (Oracle)
2022-03-21mm/readahead: Add large folio readaheadMatthew Wilcox (Oracle)
2022-03-15fs: Turn do_invalidatepage() into folio_invalidate()Matthew Wilcox (Oracle)
2022-01-04readahead: Convert page_cache_ra_unbounded to foliosMatthew Wilcox (Oracle)
2022-01-04readahead: Convert page_cache_async_ra() to take a folioMatthew Wilcox (Oracle)
2021-11-06Merge branch 'akpm' (patches from Andrew)Linus Torvalds
2021-11-06mm/readahead.c: fix incorrect comments for get_init_ra_sizeLin Feng