* Peter Zijlstra (peterz@infradead.org) wrote:Good question indeed. How large is this memory footprint exactly ? If it is as small as you say, I suspect that the real issue could be that these variable are accessed by the scheduler critical paths and therefore trash the caches. (in bytes with 8 bytes longs) (in 2.6.23-mm1) task struct struct sched_entity 9 * 8 bytes struct sched_info 5 * 8 bytes (as Ingo noted, this is only in -mm. It really hurts since it grows the task structs) struct sched_domain 20 * 8 bytes O(nr cpus) or a little more on tricky setups struct rq struct sched_info 5 * 8 bytes 10 * 8 bytes O(nr cpus), which is not much. If the memory footprint of struct sched_domain and struct rq really matters, one should set its NR_CPUS to the lowest value required by his setup to help reduce the memory size. And forget about per task statistics. Adding data to the task struct will turn out to be a real problem, both for memory consumption and cache trashing. Could we think of allocating the memory required for statistics (scheduler, vm, ...) only when stats collection is required ? It could add one pointer to the task struct (NULL by default, set to a memory location used to accumulate per-task stats before we activate system wide stats counting). It could fit well with the immediate values, which could be used to enable/disable the statistic collection dynamically at runtime with minimal impact in the scheduler code. Mathieu -- Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68 -
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 002/196] Chinese: rephrase English introduction in HOWTO |
| Christoph Lameter | [00/41] Large Blocksize Support V7 (adds memmap support) |
| Chuck Ebbert | Re: Linux 2.6.21 |
git: | |
| Gerrit Renker | [PATCH 03/37] dccp: List management for new feature negotiation |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Hugh Dickins | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| David Miller | [GIT]: Networking |
