Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp876773rwl; Fri, 7 Apr 2023 06:51:52 -0700 (PDT) X-Google-Smtp-Source: AKy350a9tAJttyEjlY08kBiUDjIjXMA78VMXni7gv99yja8v20cHtrc+AaZbCZveZ2sWnY4UbDCO X-Received: by 2002:a17:903:11c5:b0:1a2:9a94:2f00 with SMTP id q5-20020a17090311c500b001a29a942f00mr3573196plh.27.1680875511940; Fri, 07 Apr 2023 06:51:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680875511; cv=none; d=google.com; s=arc-20160816; b=utqjFZvgSy3iOoVCPOdAnmDm/l95MJnXeM00SPcuqfvqz3vtFAc+QtMYZ+UqrGimxp jjL2PbGxKbv/iInxawpxUl6y7IyPOrkRGaEC2CPz4e8FwCKLnJIdp0gwhioMK2kaJ35C +oWP5ljbC4gwL6/ysOydLX2bFjtIUl7JLwo2A2nJLnpGNH4GpjO6WFpX8n+jTHgrEH0p wcVNmQU3erPIx42/0Nv1YZzc0JMtkwSdEm16niZEndeAnH3nN3fk3QWkKxn+oNanFbJY xxAGUvDi8GrF+R1uUMEUM1Z0UHIZIDo1miOg+EH0BH+e1Dzl/P8638DO8M4izuCtwtcr eytQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZL321vaITWn9sq0TM/dZld2xfZM7ieaEWlwJnFULcKo=; b=S4MOafL4uFHT4wM8pSUXgxsfjQZ68Nq0jUzhu67CnDAeU8F20SwisAzFl5G4xduTBC tIxObpbMGyn8OHg+ezDNI1A9ksPNmpIJW5VSGrZdGOGeaiI9YlKKaMI5CwJSq5BmKSLz LDxus4m0KJbJuNWxP8amnFlf10ZCeusY6Bu2KjDWI/Jwt4Sci60sEteLgcmaXu0iC0sD mdDtk0dNLPxLiw6yKVo2htE4+LIg0axq8Yp5Cb6PaSD30MNS7QERQSRQxpDhzsMuHyKM fQ+ZWgKAV+3qVgVJdimffDwHSN6P2n2LYJXd8xatFGBrG5CqfqC1KcLiP4Unad2ikShp MHJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kX12iSDY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n1-20020a170902d2c100b001a1f67ee4dbsi4132462plc.191.2023.04.07.06.51.38; Fri, 07 Apr 2023 06:51:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kX12iSDY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231165AbjDGNs4 (ORCPT + 99 others); Fri, 7 Apr 2023 09:48:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231757AbjDGNsS (ORCPT ); Fri, 7 Apr 2023 09:48:18 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0974FBDD8 for ; Fri, 7 Apr 2023 06:46:42 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-2449d3400d6so161211a91.3 for ; Fri, 07 Apr 2023 06:46:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680875197; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ZL321vaITWn9sq0TM/dZld2xfZM7ieaEWlwJnFULcKo=; b=kX12iSDYPTc/jNWI/Shc8ryP57t5aEJe6dCb/WMczQssEYLicItq9gB9dV7uM6EBZd HvxFSx8v/lDlcZRtF1tzF6whyY+6UrmmJUEzdC9ZLJR+dda2MvA/7oUSxpLgeInB/POm Su74NLfmxkvKDnKgdWXQqhWJqQ17l+u6wV8Q233LYvItrgXBUAjy0prMpNT+xDJgIxZ8 HmgQB2Jdp1gSDuO3tpXsmjlL3edgxU6Vqi1mUHX5koE0q0XWVtIAQT8N//rrRnkC+yxv I4IMsbF6r3RAOo3rC5XYdjYa8/s5ShRBVLBmC4KcbEmQsXcigR+3E1wJTOuF1WVTjWak xilA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680875197; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ZL321vaITWn9sq0TM/dZld2xfZM7ieaEWlwJnFULcKo=; b=pMEvPB+7IJAbyDPZ+tjsuv+UFAwBWT4+VFrmKhUKC/bxUtSU7+PkixqnqUbSmYKgK5 louXFDfgnMSxljCGbgkIsc5xPJT8zc6sc0uK0PkRXguatsR8jou+JebX37BId4c/gCnn wKsSuatQztu8uNd5TWn34MGGfRV8id1/8B7laKvhUI1wpoAGK6qWLOzPUMN31Pa3ZRBu vJruJOVKEzScpGUCbi1IQwePFDMf0MJBti0SMMiKmUP8JgrjpanjSQzkNOBAZ5y5h8Gn mH/+EDCYd5ZsLcOkbYm5dmRkWw4QWRd9oY25yBsOhd/qv9tqvgpjGFA8zslNvG0kXlY3 Cujw== X-Gm-Message-State: AAQBX9eoMn6ASrvEKFSm9dsfSDlbpoA9SKInZED/WJ5M4KXSZ1pSVJ+L n5er6bAMqEd6/XMiQGBYcwM= X-Received: by 2002:a62:1989:0:b0:626:1c2a:2805 with SMTP id 131-20020a621989000000b006261c2a2805mr2273160pfz.25.1680875197221; Fri, 07 Apr 2023 06:46:37 -0700 (PDT) Received: from debian.me (subs03-180-214-233-76.three.co.id. [180.214.233.76]) by smtp.gmail.com with ESMTPSA id b8-20020aa78108000000b0062d7c0dc4f4sm3067550pfi.80.2023.04.07.06.46.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Apr 2023 06:46:36 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id BEB061067F2; Fri, 7 Apr 2023 20:46:32 +0700 (WIB) Date: Fri, 7 Apr 2023 20:46:32 +0700 From: Bagas Sanjaya To: Kautuk Consul , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Fabiano Rosas , Paolo Bonzini , Chao Peng , Sean Christopherson Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] KVM: PPC: BOOK3S: book3s_hv_nested.c: improve branch prediction for k.alloc Message-ID: References: <20230407093147.3646597-1-kconsul@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6caTa8mxFTuMf/uP" Content-Disposition: inline In-Reply-To: <20230407093147.3646597-1-kconsul@linux.vnet.ibm.com> X-Spam-Status: No, score=1.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --6caTa8mxFTuMf/uP Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 07, 2023 at 05:31:47AM -0400, Kautuk Consul wrote: > I used the unlikely() macro on the return values of the k.alloc > calls and found that it changes the code generation a bit. > Optimize all return paths of k.alloc calls by improving > branch prediction on return value of k.alloc. What about below? "Improve branch prediction on kmalloc() and kzalloc() call by using unlikely() macro to optimize their return paths." That is, try to avoid first-person construct (I). Thanks. --=20 An old man doll... just what I always wanted! - Clara --6caTa8mxFTuMf/uP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSSYQ6Cy7oyFNCHrUH2uYlJVVFOowUCZDAetAAKCRD2uYlJVVFO o8WRAQDI+qrr3elgQo4FKB1f8DWaii9J1c8omUyFNKUt/TOr0AEAvj3x7tljbC01 Cs/ZW4kFNxjJHwgIY5bhRfZr28QfbA4= =4KC8 -----END PGP SIGNATURE----- --6caTa8mxFTuMf/uP--