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: <20140210210224.GZ5002@laptop.programming.kicks-ass.net>
Date:	Mon, 10 Feb 2014 22:02:24 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	linux-kernel@...r.kernel.org
Cc:	Jason Low <jason.low2@...com>, Waiman Long <waiman.long@...com>,
	mingo@...nel.org, paulmck@...ux.vnet.ibm.com,
	torvalds@...ux-foundation.org, tglx@...utronix.de, riel@...hat.com,
	akpm@...ux-foundation.org, davidlohr@...com, hpa@...or.com,
	andi@...stfloor.org, aswin@...com, scott.norton@...com,
	chegu_vinod@...com
Subject: Re: [PATCH 2/8] mutex: In mutex_can_spin_on_owner(), return false if
 task need_resched()

On Mon, Feb 10, 2014 at 08:58:22PM +0100, Peter Zijlstra wrote:

Bah, I forgot Quilt eats the From: headers and I forgot to re-add them.
They're still present in the queue, just lost in mailing :/

> The mutex_can_spin_on_owner() function should also return false if the
> task needs to be rescheduled to avoid entering the MCS queue when it
> needs to reschedule.
> 
> Cc: chegu_vinod@...com
> Cc: paulmck@...ux.vnet.ibm.com
> Cc: Waiman.Long@...com
> Cc: torvalds@...ux-foundation.org
> Cc: tglx@...utronix.de
> Cc: riel@...hat.com
> Cc: akpm@...ux-foundation.org
> Cc: davidlohr@...com
> Cc: hpa@...or.com
> Cc: andi@...stfloor.org
> Cc: aswin@...com
> Cc: mingo@...nel.org
> Cc: scott.norton@...com
> Signed-off-by: Jason Low <jason.low2@...com>
> Signed-off-by: Peter Zijlstra <peterz@...radead.org>
> Link: http://lkml.kernel.org/r/1390936396-3962-2-git-send-email-jason.low2@hp.com
> ---
>  kernel/locking/mutex.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> --- a/kernel/locking/mutex.c
> +++ b/kernel/locking/mutex.c
> @@ -166,6 +166,9 @@ static inline int mutex_can_spin_on_owne
>  	struct task_struct *owner;
>  	int retval = 1;
>  
> +	if (need_resched())
> +		return 0;
> +
>  	rcu_read_lock();
>  	owner = ACCESS_ONCE(lock->owner);
>  	if (owner)
> 
> 
--
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