Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1172743AbdDXSt1 (ORCPT ); Mon, 24 Apr 2017 14:49:27 -0400 Received: from mail-by2nam01on0045.outbound.protection.outlook.com ([104.47.34.45]:20064 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S969096AbdDXStT (ORCPT ); Mon, 24 Apr 2017 14:49:19 -0400 Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=caviumnetworks.com; Subject: Re: [PATCH 1/2] arm64:vdso: Rewrite gettimeofday into C. To: Catalin Marinas , Andrew Pinski References: <1492991221-5156-1-git-send-email-apinski@cavium.com> <20170424152106.GG25449@e104818-lin.cambridge.arm.com> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org From: Andrew Pinski Message-ID: <31273d31-57a8-2bfd-283f-025d3a88c96f@caviumnetworks.com> Date: Mon, 24 Apr 2017 11:49:10 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170424152106.GG25449@e104818-lin.cambridge.arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: MWHPR1201CA0022.namprd12.prod.outlook.com (10.174.253.32) To DM5PR07MB3420.namprd07.prod.outlook.com (10.164.146.17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 517792d5-c3fa-4505-0db0-08d48b429cd2 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:DM5PR07MB3420; X-Microsoft-Exchange-Diagnostics: 1;DM5PR07MB3420;3:wQGpdVMRG/GOSrDqMGfYd/qNQ/iD9T2dgFkcKYaoO0i7CXV2DEvCe0dKPxkXwJFFmA9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DhkNqBkzcvdttrGPLLjKjzBJMxK97zghuP3CYe/N6MjFaUR2o+UVyA5to4kAVwgGz5wivWW31yAH/HfH37a5nyj2EPwDda09pgitpQA2sSpKePxrajfpW6nQjG0Yo8sTukKNlLdrdqszs2LAVEIVgGCsMED+cnoh2+f6UJcd/F9cUTIesSU7ARO8y9W2mylGcFYhvFdAXB3LVqXO1K4ZQuR0gDEHXUOkYS5E0NSGGMKfzVgEmLQGLNrcZWI164QDv1HXHOFGIjBkWEPV+/+1iJJP6HhdhGZu4+TH776Xi4TTn9+ZFvTqZKJO1l8ksDmNopBM+q9h5EFhHyVz5NJp2o3XUR+9V04fKm2/3p/ptNp8FRm+LGGo44vSKnVBHEsZwOhKX3KheVGz/cBsweB/8Se38GCdKdr71wdloats/tuHEgDW+92I+3MvdSDuD3cc9LvgOJybxaaySysJ6WQrJv1VcD5QSe6IAFhMLbOjC5/h0jcsxCUxK795qCSwW0QJCHtQd4w8tVH2uyZtdbkwv6kbKeNR/YoeSy0AR1UUjOPFW6ohMks0u0= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(6041248)(20161123560025)(20161123562025)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(6072148);SRVR:DM5PR07MB3420;BCL:0;PCL:0;RULEID:;SRVR:DM5PR07MB3420; X-Microsoft-Exchange-Diagnostics: 1;DM5PR07MB3420;4:qTPbk984/xn0BMP2oxpgBDNx1LsggnSp2mFBc5RsiGhsJEOmQASY5DlR7dpVbxAp72uv/duT70WFCpbGTV4aKYh4rIm72jbHloMXUprwlaYaKcjhagv777lkB0tdXO2aLrNEzBg+fvy4id5CGl3b5TZgJ9WATYid0t5qnsBpSIB6l9GlDd2hkbUPycsabR1U3Gy6koKUSGq2q735q4TSVWhmvSh2LfzXAkXvPK7N0GSouL8atbHik5ejiuQMFPnZ9L9hgSxtTpCcymzhMBq6X5mWjD4l/+mi2VyD8Qbdo0daEgh2ioXVk5kqILZ7HACDNbVFzK7dGGTeZsnNmZUTOxS1OAtCJQQgKtfbkppOG3LeBBGRBqV1uhrViBnAxMG0ByJtWqBIMgu3z2VAW4BxDZ7fjAYgcSz6jibrIFJvE83qTshJZ7+v+3nDsRPmi2UgEQC09EvVFZXRNIPNg4kbzOtyyn2mfII66suzJLyWQDfRqJa6rUpfCqHDuM4EPq1sWweeyChlQ4uRYeVGWMvmAUKKb4qXLP+xUFpUIvzYZjNUV0WofHr8NMmoIjRCZ8yu9XuwuB+d/+v8q8H/77C0fayXd5EjT/9kUrE4qShSNdL/+X3Fan+qjMMirBijmm/dJxqJr7Ap8u2j1g4yL/hhG5/IrySNw8qyPU/MoW7kRTqco31dg5ucTSOIAGnrZJua X-Forefront-PRVS: 0287BBA78D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6049001)(6009001)(39840400002)(39850400002)(39410400002)(39400400002)(377454003)(24454002)(42882006)(4001350100001)(7736002)(305945005)(31686004)(36756003)(189998001)(42186005)(2950100002)(53936002)(38730400002)(2906002)(31696002)(33646002)(65956001)(66066001)(6246003)(230700001)(25786009)(64126003)(83506001)(229853002)(8676002)(5660300001)(6116002)(54356999)(50986999)(81166006)(76176999)(50466002)(47776003)(77096006)(6666003)(4326008)(6486002)(53546009)(23746002)(3846002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR07MB3420;H:[10.18.104.236];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;DM5PR07MB3420;23:lO48BMMSE5Qk2W56DqTLBe6G+HSxJfSQskCj7?= =?Windows-1252?Q?MDGuK6kqRBL5U7m5JF93hkoRmga2qlV2FLK4DiDdEiRZXJk8S/VP8fud?= =?Windows-1252?Q?k6ienbxY1yCR7mz45D1WfQZ2VrdJ+Mi9xO2vG0N5E5DEP/npj6h5xSSs?= =?Windows-1252?Q?jAP7Kkv88dwtBX+gSgi6NG/XxR4VnerHWo3yymEXKk/wT3nSnSNFr7+f?= =?Windows-1252?Q?TGvVeHJBkfJMwnnC26yWl9xHX4ogQr4VwWH6e4DV2/X7rgAYMIqGP3A8?= =?Windows-1252?Q?Z5AKk439BKRWtZsxkHL0ilW/Y9poR2jGZ7lZLQCfdUShfP/7hkSYKjTP?= =?Windows-1252?Q?Kvm3gpDJ89EFgHZ4sifqpajml+EKZeDxBsfMSjaRxKy37iQJoAwWcu4B?= =?Windows-1252?Q?TFNCMhaebQSGQH/zZXtlTDENGwR0+BhTa5abN3qHHlgM4v0bevawECep?= =?Windows-1252?Q?Ok5HZf7Arl7cYj6lkmMugq2x224oLlvSJnI5rVOUh//E91sdHqFH3FAa?= =?Windows-1252?Q?FavClLzytenRsd8YTwjj3KjvtFCcct6469NWC40C7IyYZOUwDkKaXh0Z?= =?Windows-1252?Q?Wahbm502sp/szgK4ovzJeHoF8cba+cwB8puuUjOj5DQRBC9AjyI9pHYb?= =?Windows-1252?Q?+UuQvU6KXULHn8w9kh483qwtB9t+3H4pYxMCApePowDe88IYlZLC/6Lv?= =?Windows-1252?Q?IDB+7rYT61OZ4+tOad4cHvK5cvDtNqxM90s+flpnv6+77U5YeqzKCzr7?= =?Windows-1252?Q?mKkPTx9ZPGmAsHfHqZVS6i/nPXMqtxRCIUL8j+F8sK7SbDpOX73UxEYN?= =?Windows-1252?Q?W0xBsv1jcBYoQlVECjnHQfDTTWV5aYVOGpkVoBRLSdUhjiWfXF6+PEI2?= =?Windows-1252?Q?w76tLT3ofeVNzw+RzWb5rLc7GiZylXfmNwpUr0+VfifHvAcjXSgnfPB5?= =?Windows-1252?Q?GiCMew3qH+zOXth5j1vpQ1CyZdryHakwU9j22wUdwxabuya6iEogAJTI?= =?Windows-1252?Q?6dTxVAmK9J+XS2VxGJq4l0zk4GYqjOOaFLFi2P4wcMBqTqQFyhSxNdbD?= =?Windows-1252?Q?eP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aWV4YMPAaM7S0pYysiFc/bRw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR07MB3420;7:ThBfbLx0MtQczBe3EiNTEdOpQ0IUxl4PScTN6A/SPS7I9meVC2gAH+OMPNVaLJNnw9U8Ygpxx2t50b1FG/XpqTj7S+Obil+wadHHbY5/7V645bmojyZM/9QepmwWgHTIzMTlbl69ga1CcyiaVVpqDbY32ScwD9lRLw6bj8OFimJ/KM1UWZVcj2jEjx8Bv1i2el7H2U8FiiqV8Pd9DVleklRVGb2Oeb7tzXqIkX9Q4pPmuSsPOLTr4Bp4kdnW5uejSL9ggrL33t5/PhpXcCsry6cD9o65SA5zQUjXSusfndmwWvsgGySCP7UtPBp66RGE+nRC6RWcxefOU6gURTXFbw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2017 18:49:17.6753 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3420 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 917 Lines: 23 On 4/24/2017 8:21 AM, Catalin Marinas wrote: > On Sun, Apr 23, 2017 at 04:47:00PM -0700, Andrew Pinski wrote: >> This allows the compiler to optimize the divide by 1000. >> And remove the other divide. >> >> On ThunderX, gettimeofday improves by 32%. On ThunderX 2, >> gettimeofday improves by 18%. > Is this with or without the second patch (removing the ISB)? Hi Caralin, This is without the second patch that removes the ISB. Maybe I should not have sent them as the same patch set to make it clear that way. As I tried to make a mention of, the improvement is the compiler not outputting the udiv instruction for the division by 1000. I should also mention I tested this patch on a softiron using GCC 4.8.5 (SUSE's default compiler) and the performance was the same; GCC 4.8.5 emits udiv still in this case. I did not try a newer compiler to see the performance there. Thanks, Andrew Pinski >