From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH 7/7] sched, x86: Optimize the preempt_schedule() call Date: Tue, 10 Sep 2013 15:42:47 +0200 Message-ID: <20130910134247.GC7537@gmail.com> References: <20130910130811.507933095@infradead.org> <20130910132011.474646746@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20130910132011.474646746@infradead.org> Sender: linux-kernel-owner@vger.kernel.org To: Peter Zijlstra , Jan Beulich Cc: Linus Torvalds , Andi Kleen , Peter Anvin , Mike Galbraith , Thomas Gleixner , Arjan van de Ven , Frederic Weisbecker , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org List-Id: linux-arch.vger.kernel.org * Peter Zijlstra wrote: > + .macro SAVE_ALL > + pushl_cfi %eax > + CFI_REL_OFFSET eax, 0 > + pushl_cfi %ebp > + CFI_REL_OFFSET ebp, 0 > + pushl_cfi %edi > + CFI_REL_OFFSET edi, 0 > + pushl_cfi %esi > + CFI_REL_OFFSET esi, 0 > + pushl_cfi %edx > + CFI_REL_OFFSET edx, 0 > + pushl_cfi %ecx > + CFI_REL_OFFSET ecx, 0 > + pushl_cfi %ebx > + CFI_REL_OFFSET ebx, 0 > + .endm > + > + .macro RESTORE_ALL > + popl_cfi %ebx > + CFI_RESTORE ebx > + popl_cfi %ecx > + CFI_RESTORE ecx > + popl_cfi %edx > + CFI_RESTORE edx > + popl_cfi %esi > + CFI_RESTORE esi > + popl_cfi %edi > + CFI_RESTORE edi > + popl_cfi %ebp > + CFI_RESTORE ebp > + popl_cfi %eax > + CFI_RESTORE eax > + .endm Side note: shouldn't the pushl_cfi and popl_cfi macros be adjusted, instead of open coding it? Thanks, Ingo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-bk0-f46.google.com ([209.85.214.46]:59007 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751256Ab3IJNmv (ORCPT ); Tue, 10 Sep 2013 09:42:51 -0400 Date: Tue, 10 Sep 2013 15:42:47 +0200 From: Ingo Molnar Subject: Re: [PATCH 7/7] sched, x86: Optimize the preempt_schedule() call Message-ID: <20130910134247.GC7537@gmail.com> References: <20130910130811.507933095@infradead.org> <20130910132011.474646746@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130910132011.474646746@infradead.org> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Peter Zijlstra , Jan Beulich Cc: Linus Torvalds , Andi Kleen , Peter Anvin , Mike Galbraith , Thomas Gleixner , Arjan van de Ven , Frederic Weisbecker , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Message-ID: <20130910134247.QDS8b3GCGDMYHXH-rRzuyNUv8YAzEdj-4CQ-4oUfMPQ@z> * Peter Zijlstra wrote: > + .macro SAVE_ALL > + pushl_cfi %eax > + CFI_REL_OFFSET eax, 0 > + pushl_cfi %ebp > + CFI_REL_OFFSET ebp, 0 > + pushl_cfi %edi > + CFI_REL_OFFSET edi, 0 > + pushl_cfi %esi > + CFI_REL_OFFSET esi, 0 > + pushl_cfi %edx > + CFI_REL_OFFSET edx, 0 > + pushl_cfi %ecx > + CFI_REL_OFFSET ecx, 0 > + pushl_cfi %ebx > + CFI_REL_OFFSET ebx, 0 > + .endm > + > + .macro RESTORE_ALL > + popl_cfi %ebx > + CFI_RESTORE ebx > + popl_cfi %ecx > + CFI_RESTORE ecx > + popl_cfi %edx > + CFI_RESTORE edx > + popl_cfi %esi > + CFI_RESTORE esi > + popl_cfi %edi > + CFI_RESTORE edi > + popl_cfi %ebp > + CFI_RESTORE ebp > + popl_cfi %eax > + CFI_RESTORE eax > + .endm Side note: shouldn't the pushl_cfi and popl_cfi macros be adjusted, instead of open coding it? Thanks, Ingo