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:	Tue, 29 Sep 2015 16:09:46 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	mingo@...nel.org, linux-kernel@...r.kernel.org,
	torvalds@...ux-foundation.org, fweisbec@...il.com, oleg@...hat.com,
	umgwanakikbuti@...il.com, rostedt@...dmis.org
Subject: Re: [RFC][PATCH 02/11] sched: Create preempt_count invariant

On Tue, Sep 29, 2015 at 03:11:56PM +0200, Thomas Gleixner wrote:
> On Tue, 29 Sep 2015, Peter Zijlstra wrote:
> > +	/*
> > +	 * Still have preempt_count() == 2, from:
> > +	 *
> > +	 *	schedule()
> > +	 *	  preempt_disable();			// 1
> > +	 *	  __schedule()
> > +	 *	    raw_spin_lock_irq(&rq->lock)	// 2
> > +	 */
> > +	rq = finish_task_switch(prev); /* drops rq->lock, preempt_count() == 1 */
> >  	balance_callback(rq);
> > -	preempt_enable();
> > +	preempt_enable(); /* preempt_count() == 0 */
> 
> Bah. I so hate tail comments. What's wrong with
> 
> +	 /* preempt_count() ==> 0 */
> 	preempt_enable();
> 
> Hmm?

I find the tail comments more readable in this case; clearly I don't
share your hatred :-). But I can change them if you insist.

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