From: Yong Zhang <yong.zhang0@gmail.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Lin Ming <ming.m.lin@intel.com>, "mingo@elte.hu" <mingo@elte.hu>,
lkml <linux-kernel@vger.kernel.org>,
Mike Galbraith <efault@gmx.de>
Subject: Re: [PATCH] sched: Remove WAKEUP_PREEMPT feature check in entity_tick
Date: Fri, 29 Jul 2011 16:18:00 +0800 [thread overview]
Message-ID: <20110729081800.GA12106@zhy> (raw)
In-Reply-To: <1311926218.5890.215.camel@twins>
On Fri, Jul 29, 2011 at 09:56:58AM +0200, Peter Zijlstra wrote:
> On Fri, 2011-07-29 at 15:46 +0800, Yong Zhang wrote:
> > On Fri, Jul 29, 2011 at 03:36:15PM +0800, Lin Ming wrote:
> > > >From another point of view, below !sched_feat(WAKEUP_PREEMPT) still
> > > looks like duplicated.
> > >
> > > if (cfs_rq->nr_running > 1 || !sched_feat(WAKEUP_PREEMPT))
> > > check_preempt_tick(cfs_rq, curr);
> > >
> > > if "!sched_feat(WAKEUP_PREEMPT)" is run,
> > > that implies cfs_rq->nr_running == 1.
> >
> > That's true.
> >
> > >
> > > Why do we need to call check_preempt_tick when there is only 1 task
> > > runnable?
> >
> > Just set_tsk_need_resched(p) if p's slice is over, thus:
> >
> > (n tick) ---> (n+1 tick)
> > set_tsk_need_resched(p);
> > another task Q is awaked
> >
> > If we don't have !sched_feat(WAKEUP_PREEMPT), Q maybe will wait
> > for tick coming to get scheduled. If we have
> > !sched_feat(WAKEUP_PREEMPT), Q will get scheduled when some event
> > happen, like IRQ.
>
> Nah, if there is 1 runnable task it will always run, preemption simply
> doesn't matter. There's nothing to preempt it with.
Hmmm, so the newly waked task could be scheduled a little later.
That means schedule tick judge everything.
Thanks,
Yong
>
> I've queued Lin's patch as I don't see the point of this thing either,
> normally WAKEUP_PREEMPT is enabled so it says || 0 which is kinda
> useless :-)
>
> And I'm starting to think we should just kill all of WAKEUP_PREEMPT I
> don't think we ever want to disable it anyway..
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Only stand for myself
next prev parent reply other threads:[~2011-07-29 8:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-28 9:43 [PATCH] sched: Remove WAKEUP_PREEMPT feature check in entity_tick Lin Ming
2011-07-29 6:21 ` Yong Zhang
2011-07-29 6:24 ` Yong Zhang
2011-07-29 6:49 ` Lin Ming
2011-07-29 7:03 ` Yong Zhang
2011-07-29 7:36 ` Lin Ming
2011-07-29 7:46 ` Yong Zhang
2011-07-29 7:56 ` Lin Ming
2011-07-29 7:56 ` Peter Zijlstra
2011-07-29 8:18 ` Yong Zhang [this message]
2011-07-29 8:20 ` Peter Zijlstra
2011-07-29 8:44 ` Lin Ming
2011-07-29 8:46 ` Yong Zhang
2011-07-29 11:45 ` Peter Zijlstra
2011-08-01 1:33 ` Yong Zhang
2011-07-29 8:20 ` [RFC PATCH] sched: Kill WAKEUP_PREEMPT Yong Zhang
2011-07-29 8:30 ` Lin Ming
2011-07-29 8:32 ` Lin Ming
2011-08-14 15:57 ` [tip:sched/core] " tip-bot for Yong Zhang
2011-07-29 9:04 ` [PATCH] sched: Remove WAKEUP_PREEMPT feature check in entity_tick Mike Galbraith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110729081800.GA12106@zhy \
--to=yong.zhang0@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.m.lin@intel.com \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.