lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1311926218.5890.215.camel@twins>
Date:	Fri, 29 Jul 2011 09:56:58 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Yong Zhang <yong.zhang0@...il.com>
Cc:	Lin Ming <ming.m.lin@...el.com>, "mingo@...e.hu" <mingo@...e.hu>,
	lkml <linux-kernel@...r.kernel.org>,
	Mike Galbraith <efault@....de>
Subject: Re: [PATCH] sched: Remove WAKEUP_PREEMPT feature check in
 entity_tick

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.

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ