On Fri, 20 May 2005 17:21, Nick Piggin wrote: > chen Shang wrote: > >I minimized my patch and against to 2.6.12-rc4 this time, see below. > > > >The new schedstat fields are for the test propose only, so I removed > >them completedly from patch. Theoritically, requeue_task() is always > >cheaper than dequeue_task() followed by enqueue_task(). So, if 99% of > >priority recalculation trigger requeue_task(), it will save. > > > >In addition, my load is to build the kernel, which took around 30 > >minutes with around 30% CPU usage on 2x2 processors (duel processors > >with HT enable). > >Here is the statistics: > > > >CPU0: priority_changed (669 times), priority_unchanged(335,138 times) > >CPU1: priority_changed (784 times), priority_unchanged(342,419 times) > >CPU2: priority_changed (782 times), priority_unchanged(283,494 times) > >CPU3: priority_changed (872 times), priority_unchanged(365,865 times) > > OK that gives you a good grounds to look at the patch, but _performance_ > improvement is what is needed to get it included. If you end up using requeue_task() in the fast path and it is hit frequently with your code you'll need to modify requeue_task to be inline as well. Currently it is hit only via sched_yield and once every 10 scheduler ticks which is why it is not inline. The performance hit will be demonstrable if it is hit in every schedule() Cheers, Con
Attachment:
pgpx68zOKjsYZ.pgp
Description: PGP signature
- Follow-Ups:
- Re: [PATCH] kernel <linux-2.6.11.10> kernel/sched.c
- From: chen Shang <[email protected]>
- Re: [PATCH] kernel <linux-2.6.11.10> kernel/sched.c
- References:
- [PATCH] kernel <linux-2.6.11.10> kernel/sched.c
- From: chen Shang <[email protected]>
- Re: [PATCH] kernel <linux-2.6.11.10> kernel/sched.c
- From: chen Shang <[email protected]>
- Re: [PATCH] kernel <linux-2.6.11.10> kernel/sched.c
- From: Nick Piggin <[email protected]>
- [PATCH] kernel <linux-2.6.11.10> kernel/sched.c
- Prev by Date: Re: [PATCH] kernel <linux-2.6.11.10> kernel/sched.c
- Next by Date: snd-intel8x0 buggy on Nvidia CK804, TYAN, AMD Opteron board?
- Previous by thread: Re: [PATCH] kernel <linux-2.6.11.10> kernel/sched.c
- Next by thread: Re: [PATCH] kernel <linux-2.6.11.10> kernel/sched.c
- Index(es):