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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 3 May 2007 17:17:41 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Ting Yang <tingy@...umass.edu>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [patch] CFS scheduler, -v7


* Ting Yang <tingy@...umass.edu> wrote:

> +    s64 __delta = curr->fair_key - p->fair_key;
> +
> +    /*
> +     * Take scheduling granularity into account - do not
> +     * preempt the current task unless the best task has
> +     * a larger than sched_granularity fairness advantage:
> +     */
> +    if (__delta > niced_granularity(rq, curr, granularity))
> +        resched_task(curr);
> +}
> 
> This code actually now says, the difference of fair_key needed to 
> preempt the current task is amplified by a facto of its weigh (in Al 
> Boldi's example 32). However, the weighted task already advance its 
> p->fair_key by its weight, (also 32 here). The combination of them 
> becomes quadratic!

it's not quadratic in terms of CPU share: the first factor impacts the 
CPU share, the second factor impacts the granularity. This means that 
reniced workloads will be preempted in a more finegrained way - but 
otherwise there's _no_ quadratic effect for CPU time - which is a 
completely separate metric. Remember: there are no timeslices in CFS, so 
a task can be preempted any number of times without being at a 
disadvantage.

>     Besides this quadratic effect, another minor issue amplified this 
> a little bit further: p->wait_runtime accumulated before. [...]

actually, this 'minor issue' was the main issue that caused the bug ;-)

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