From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932082Ab3HMP4o (ORCPT ); Tue, 13 Aug 2013 11:56:44 -0400 Received: from mail-ee0-f42.google.com ([74.125.83.42]:60470 "EHLO mail-ee0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758486Ab3HMP4l (ORCPT ); Tue, 13 Aug 2013 11:56:41 -0400 Date: Tue, 13 Aug 2013 17:56:37 +0200 From: Ingo Molnar To: Linus Torvalds Cc: Peter Zijlstra , Thomas Gleixner , Mike Galbraith , Peter Anvin , Andi Kleen , Linux Kernel Mailing List Subject: Re: [RFC] per-cpu preempt_count Message-ID: <20130813155637.GA5280@gmail.com> References: <20130812115113.GE27162@twins.programming.kicks-ass.net> <20130812175830.GB18691@gmail.com> <20130813103056.GA2170@gmail.com> <20130813122652.GA24092@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Linus Torvalds wrote: > On Tue, Aug 13, 2013 at 5:26 AM, Peter Zijlstra wrote: > > > > So we're now down to something like: > > > > decl fs:preempt_count > > cmpl PREEMPT_NEED_RESCHED,fs:preempt_count > > jnz 1f > > Well, this isn't worth doing unless you can make PREEMPT_NEED_RESCHED be > the high bit, and we can combine it into just "decl+jns". Otherwise we'd > be better off with the simpler two separate adjacent variables. Definitely, the cmpl should be avoided. PREEMPT_NEED_RESCHED could be made the high bit - or maybe an even simpler solution is to invert its meaning: making '0' the "it needs to resched!" case, so the check would be decl+jz? Thanks, Ingo