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: <1438025945.25997.46.camel@stgolabs.net>
Date:	Mon, 27 Jul 2015 12:39:05 -0700
From:	Davidlohr Bueso <dave@...olabs.net>
To:	Waiman Long <waiman.long@...com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	linux-kernel@...r.kernel.org, Scott J Norton <scott.norton@...com>,
	Douglas Hatch <doug.hatch@...com>
Subject: Re: [PATCH v3 2/7] locking/pvqspinlock: Add pending bit support

On Mon, 2015-07-27 at 13:30 -0400, Waiman Long wrote:
> The pending bit acts as a 1-slot waiting queue. So if the vCPU needs to 
> fall back to regular queuing, it needs to clear the bit.

Right, that's what I thought. So you would also need to call
clear_pending() as soon as the trylock/pending loop hits zero. Or am I
missing something?

/*
 * trylock || pending
 */
for (;;) {
	...
	if (loop--<= 0) {
		clear_pending(lock);
		goto queue;
	}
}

Also, no need to check for negative loop, zero should be enough to
breakout.

Thanks,
Davidlohr

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