From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH 00/11] preempt_count rework -v3 Date: Tue, 17 Sep 2013 12:53:44 +0200 Message-ID: <20130917105344.GA23024@gmail.com> References: <20130917082838.218329307@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-bk0-f43.google.com ([209.85.214.43]:62782 "EHLO mail-bk0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752207Ab3IQKxs (ORCPT ); Tue, 17 Sep 2013 06:53:48 -0400 Content-Disposition: inline In-Reply-To: <20130917082838.218329307@infradead.org> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Peter Zijlstra 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 * Peter Zijlstra wrote: > These patches optimize preempt_enable by firstly folding the preempt and > need_resched tests into one -- this should work for all architectures. And > secondly by providing per-arch preempt_count implementations; with x86 using > per-cpu preempt_count for fastest access. > > These patches have been boot tested on CONFIG_PREEMPT=y x86_64 and survive > building a x86_64-defconfig kernel. > > text data bss filename > 11387014 1454776 1187840 defconfig-build/vmlinux.before > 11352294 1454776 1187840 defconfig-build/vmlinux.after That's a 0.3% size improvement (and most of the improvement is in hotpaths), despite GCC is being somewhat stupid about not allowing us to mark asm goto targets as cold paths and thus causes some unnecessary register shuffling in some cases, right? Not bad IMO. Thanks, Ingo