From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, T_SPF_HELO_TEMPERROR,T_SPF_TEMPERROR,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by gnuweeb.org (Postfix) with ESMTPS id 3FB967E6C9 for ; Mon, 7 Mar 2022 12:39:04 +0000 (UTC) Received: from nazgul.tnic (nat0.nue.suse.com [IPv6:2001:67c:2178:4000::1111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 2C9DD1EC0373; Mon, 7 Mar 2022 13:38:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1646656736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=rV0+tZuhGoDxY69jUN7iTJa185bniGGbHQV7C81Odz0=; b=izJE9st1GWUDeJQkgmfjNE3OplstXHOuFVJPLsXikqQYHJR8rD7PE0Ujs7MGP1IArmUpxj H7c/L/5pdnzUv01eBaaiIoZ32IsjcAYSBteNl2A9Lkkg4GRGJhO2DiROkupIaiVcXI/UmR EbKZ6EQ9pPtXNJYqAyTpV/l21ctnV8A= Date: Mon, 7 Mar 2022 13:38:59 +0100 From: Borislav Petkov To: Ammar Faizi Cc: Andy Shevchenko , Dave Hansen , "H. Peter Anvin" , Ingo Molnar , Josh Poimboeuf , Juergen Gross , Kees Cook , Peter Zijlstra , Thomas Gleixner , Tony Luck , Youquan Song , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, gwml@vger.gnuweeb.org, x86@kernel.org Subject: Re: [PATCH v1 0/2] x86: Avoid using INC and DEC instructions on hot paths Message-ID: References: <20220307114558.1234494-1-ammarfaizi2@gnuweeb.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220307114558.1234494-1-ammarfaizi2@gnuweeb.org> List-Id: On Mon, Mar 07, 2022 at 06:45:56PM +0700, Ammar Faizi wrote: > In order to take maximum advantage of out-of-order execution, > avoid using INC/DEC instructions when appropriate. INC/DEC only > writes to part of the flags register, which can cause a partial > flag register stall. This series replaces INC/DEC with ADD/SUB. "Improvements" like that need to show in benchmark runs - not microbenchmark - that they bring anything. Just by looking at them, I'd say they won't show any difference. But I'm always open to surprises. Btw, you don't have to send all your patches directly to me - there are other x86 maintainers. IOW, you can use scripts/get_maintainer.pl to figure out who to send them to. Also, I'd advise going over Documentation/process/ if you're new to this. Especially Documentation/process/submitting-patches.rst. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette