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: <YYph/EuzlGr/3vG/@hirez.programming.kicks-ass.net>
Date:   Tue, 9 Nov 2021 12:56:44 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Mel Gorman <mgorman@...hsingularity.net>
Cc:     Ingo Molnar <mingo@...nel.org>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Valentin Schneider <valentin.schneider@....com>,
        Aubrey Li <aubrey.li@...ux.intel.com>,
        Barry Song <song.bao.hua@...ilicon.com>,
        Mike Galbraith <efault@....de>,
        Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] sched/fair: Couple wakee flips with heavy wakers

On Thu, Oct 21, 2021 at 03:56:02PM +0100, Mel Gorman wrote:
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index ff69f245b939..d00af3b97d8f 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -5865,6 +5865,14 @@ static void record_wakee(struct task_struct *p)
>  	}
>  
>  	if (current->last_wakee != p) {
> +		int min = __this_cpu_read(sd_llc_size) << 1;
> +		/*
> +		 * Couple the wakee flips to the waker for the case where it
> +		 * doesn't accrue flips, taking care to not push the wakee
> +		 * high enough that the wake_wide() heuristic fails.
> +		 */
> +		if (current->wakee_flips > p->wakee_flips * min)
> +			p->wakee_flips++;
>  		current->last_wakee = p;
>  		current->wakee_flips++;
>  	}

It's a bit odd that the above uses min for llc_size, while the below:

> @@ -5895,7 +5903,7 @@ static int wake_wide(struct task_struct *p)
>  
>  	if (master < slave)
>  		swap(master, slave);
> -	if (slave < factor || master < slave * factor)
> +	if ((slave < factor && master < (factor>>1)*factor) || master < slave * factor)
>  		return 0;
>  	return 1;
>  }

has factor.

Now:

	!(slave < factor || master < slave * factor)

  !(x || y) == !x && !y, gives:

	slave >= factor && master >= slave * factor

  subst lhr in rhs:

	master >= factor * factor


your extra term:

	!((slave < factor && master < (factor*factor)/2) || master < slave * factor)

changes that how? AFAICT it's a nop.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ