GSoC prefetching: tracing subsystem for review

Krzysztof Lichota krzysiek at lichota.net
Thu Jun 28 07:40:00 UTC 2007


According to "release early, release often" practice, I am posting here
for your review the tracing subsystem developed for this year's
"prefetching" Google Summer of Code project in Ubuntu (which hopefully
be a part of Gutsy release). The mentor is Tollef Fog Heen.

The code is based on pagecache code by Fengguang Wu.

Tracing is done using  using "page referenced" bit checking.

The idea is as follows: in first run pages are scanned and "page
referenced" bit is cleared (this will be done at the start of tracing).
Next (when application finishes startup), pages will be scanned once
again, this time recording which pages were referenced.

Current /proc interface is for testing, tracing will be run
automatically upon application start in kernel, without going to userspace.

For clearing "referenced" bit I am using TestClearPageReferenced()
without any locking. I do not have much experience with memory
management code, so if this is wrong, please let me know.
Also, I am not sure if clearing these bits will affect some important
system processes. Anyone knows anything about it?

If you see any other problems with the code, also I will be grateful for
comments. Please note that this code is work-in-progress, the trace log
will be changed to something similar to cyclic buffer, current
implementation is just a proof of concept.

Any comments welcome :)

	Krzysztof Lichota

PS. Please keep CC to prefetch-devel.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: prefetch.c
Type: text/x-csrc
Size: 14055 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20070628/7529b030/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20070628/7529b030/attachment.sig>


More information about the kernel-team mailing list