From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754441AbcHSA6X (ORCPT ); Thu, 18 Aug 2016 20:58:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43544 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754419AbcHSA6T (ORCPT ); Thu, 18 Aug 2016 20:58:19 -0400 Subject: Re: RFC: Petition Intel/AMD to add POPF_IF insn To: Linus Torvalds References: <8de26c33-5597-bf00-2ac5-d265ba01d0d4@redhat.com> <1686aa11-152d-9416-34dd-17820de7a7b6@redhat.com> Cc: Andy Lutomirski , Sara Sharon , Dan Williams , =?UTF-8?Q?Christian_K=c3=b6nig?= , Vinod Koul , Alex Deucher , Johannes Berg , "Rafael J. Wysocki" , Andy Lutomirski , the arch/x86 maintainers , Ingo Molnar , LKML , Adrian Hunter From: Denys Vlasenko Message-ID: Date: Thu, 18 Aug 2016 19:49:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 18 Aug 2016 17:49:13 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/18/2016 07:47 PM, Denys Vlasenko wrote: > On 08/18/2016 07:24 PM, Linus Torvalds wrote: >> That said, your numbers really aren't very convincing. If popf really >> is just 10 cycles on modern Intel hardware, it's already fast enough >> that I really don't think it matters. > > It's 20 cycles. I was wrong in my email, I forgot that the insn count > also counts "push %ebx" insns. > > Since I already made a mistake, let me double-check. > > 200 million iterations of this loop execute under 17 seconds: > > 400100: b8 00 c2 eb 0b mov $0xbebc200,%eax # 1000*1000*1000 Grr. It's 200*1000*1000, not one billion. Sorry.