Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933396AbaJCXsW (ORCPT ); Fri, 3 Oct 2014 19:48:22 -0400 Received: from mail-vc0-f174.google.com ([209.85.220.174]:34987 "EHLO mail-vc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933376AbaJCXsS (ORCPT ); Fri, 3 Oct 2014 19:48:18 -0400 MIME-Version: 1.0 In-Reply-To: References: <20140921184153.GA23727@redhat.com> <542E2B05.5080607@oracle.com> <20141003083954.10a13a24@as> <20141003214124.GA31614@redhat.com> Date: Fri, 3 Oct 2014 16:48:17 -0700 X-Google-Sender-Auth: hTOnf636kkKVHq5BHjfT5OGwS0U Message-ID: Subject: Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers From: Linus Torvalds To: Andy Lutomirski Cc: Oleg Nesterov , Chuck Ebbert , Sasha Levin , Ingo Molnar , "H. Peter Anvin" , "linux-kernel@vger.kernel.org" , Peter Zijlstra , Denys Vlasenko , Thomas Gleixner Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 3, 2014 at 2:56 PM, Andy Lutomirski wrote: > > Is this thing missing a flags or cc clobber: > > # define __preempt_schedule() asm ("call ___preempt_schedule") Yes, it should probably have a cc clobber. Although I think thet gcc actually assumes all asms clobber flags on x86, so it shouldn't matter. > Is this all just to make the call sequence for preempt_schedule shorter? Not so much the call sequence, but the code around the call - not havign to spill live registers etc. But yes. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/