On 15/10/2007, Ingo Molnar <mingo@elte.hu> wrote:an update on this issue: shortly, SD_BALANCE_FORK is required to trigger this problem and hence, only NUMA machines could have been affected by it (and only ia64 and x86 have SD_BALANCE_FORK in SD_NODE_INIT). more details: it's perfectly legitimate for 'rq->cfs.curr' to be NULL in task_new_fair() in the case when this_cpu != task_cpu(p) (p -- is a newly created task). why this_cpu != task_cpu(p) : do_fork() --> copy_process() --> sched_fork() --> cpu = sched_balance_self(this_cpu, SD_BALANCE_FORK) chose a different cpu for the new task and there is _no_ 'class_sched_fair' task running on this cpu at the moment (that's why rq->cfs.curr == NULL). [ thanks a lot to Paul for providing debugging information ] btw., it's not the 'curr->vruntime < se->vruntime' part in task_new_fair() that gave us the oops (it's only executed in the case of this_cpu == task_cpu(p)) _but_ it's rather: [*] check_spread(cfs_rq, curr) which also accesses 'curr->vruntime'. 2 checks are required as 'current' and rq->cfs.curr are not the same :-) It also should work if we just get rid of [*] or add an adiitional (curr != NULL) check there. just as a additional observation: there are lots of per-cpu threads (like events/cpu, ksoftirq/cpu, etc.) being created on start-up (x NUMBER_OF_CPUS) and SD_SCHED_FORK (actually, sched_balance_self() from sched_fork()) is just an overhead in this case... although, sched_balance_self() is likely to be responsible for a minor % of the time taken to create a new context so optimizing it away (esp. for some corner cases) won't improve the start-up time noticeable. -- Best regards, Dmitry Adamushko -
| Justin C. Sherrill | Re: dragonflybsd.org website link? |
| David Woodhouse | Re: -mm merge plans for 2.6.23 |
| Greg Kroah-Hartman | [PATCH 002/196] Chinese: rephrase English introduction in HOWTO |
| Eric Sandeen | Re: [RFC] Heads up on sys_fallocate() |
git: | |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Patrick McHardy | [NET_SCHED 01/15]: sch_atm: fix format string warning |
