Bump up stdio cache sizes for major reads
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 189
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
(Reported by Leah Neukirchen.)
We routinely read some very large things on almost every invocation (available_filter_functions, kallmodsyms, module.ranges etc). We are doing all this with the default stdio buffer size, which is 1K. We should at least be using PAGE_SIZE: using more than that is risky for /proc but for stuff read out of /lib/modules etc we should probably go all the way to 64K.
This is a bit fiddly since it means we need to manage the stdio buffer lifetimes ourselves, so it's worth trying on one big one in /proc first to see if it has any effect. But it might well be worthwhile in the upcoming performance push.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the stdio reads for available_filter_functions, kallmodsyms, and module.ranges, then inspect how their buffers are currently allocated and released. Experiment first with one large /proc read using PAGE_SIZE, and compare the resulting performance while ensuring the buffer lifetime remains valid; completion means the cache sizing improves the targeted read without unsafe /proc behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- operating-systems, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100