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]
Date:	Fri, 29 Jul 2011 14:49:40 +0800
From:	Lin Ming <ming.m.lin@...el.com>
To:	Yong Zhang <yong.zhang0@...il.com>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	"mingo@...e.hu" <mingo@...e.hu>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sched: Remove WAKEUP_PREEMPT feature check in
 entity_tick

On Fri, 2011-07-29 at 14:21 +0800, Yong Zhang wrote:
> On Thu, Jul 28, 2011 at 05:43:23PM +0800, Lin Ming wrote:
> > Currently, entity_tick calls check_preempt_tick if WAKEUP_PREEMPT feature is
> > disabled. That's wrong. It should do that if the feature is enabled.
> 
> Why is it wrong?
> check_preempt_wakeup() is used for wakeup.

I guess you mean "check_preempt_tick" here, yes?

in entity_tick(...):
        if (cfs_rq->nr_running > 1 || !sched_feat(WAKEUP_PREEMPT))
                check_preempt_tick(cfs_rq, curr);

Note that, above "if" statement says "if WAKEUP_PREEMPT feature is
*disabled* then calls check_preempt_tick".

Shouldn't it be "if WAKEUP_PREEMPT feature is *enabled* then ...."?

> 
> > 
> > And actually the check is duplicate because check_preempt_tick will do
> > that. So just remove it from entity_tick.
> 
> It's not exactly duplicated. entity_tick() will resched_task(*p)
> if p's slice is over. So if there is an following wakeup(say X),
> then there is an opportunity for X to schedule quickly.

Understood this.

But what I mean is both "entity_tick" and "check_preempt_tick" check
WAKEUP_PREEMPT feature. That's duplicated.

Only need to check it in "check_preempt_tick".

Thanks,
Lin Ming

--
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