From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90BABC10F03 for ; Tue, 23 Apr 2019 19:45:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5CEAB21773 for ; Tue, 23 Apr 2019 19:45:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DELKxVYU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727074AbfDWTpQ (ORCPT ); Tue, 23 Apr 2019 15:45:16 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:36930 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725956AbfDWTpQ (ORCPT ); Tue, 23 Apr 2019 15:45:16 -0400 Received: by mail-ed1-f67.google.com with SMTP id f53so13771510ede.4 for ; Tue, 23 Apr 2019 12:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lEojHrew0gIc72okUsCE0SIj9khEoIsYh2QSmczegCI=; b=DELKxVYU82lEZsI62Os4pHJJgQCryZCeKfgQ9tMFFBre2heIiQKAPw6gL6JKpf9YST Hne/S0I25sQYa7K3WnCMraDHeK0F5cDAS+KC/1XuZ3c6sQT96FE8V7FBqv2Sy7PxXCd3 rBWFGPhbyX/V1rl0Xlq3OR29Hxsfv2kq3MEJLynwhCvQ80VUD+qftt7WmOrTVPkuoGps 3mwyd3BnGlF7kZoAqegwCJ2OoGCKCPDcT0KhyxPmqeT7lVrDClYr6w3fvg6xfF0kwckF XnvN3rLCU3PdCSpD8Z0MXO4OXj9dLKc0oEbTTz83SmV9SWyIB5E6uYRjcJPoKcyfFanM LqBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lEojHrew0gIc72okUsCE0SIj9khEoIsYh2QSmczegCI=; b=ecHJasqQL/LuphuwxLgO4IOuJzK2zl8ILIz+J8sjXzwVe36vKlPkrOR4oCzLvovOPG +XPwjclnFso3jmHmsQZC57D5WtBEyrc141lDl2mjR1+HLx349sIgS1IMpRIS2PU7kLJE gFe3mcHrwCIpQranh7fW2oS64aBKz5xrpLxLeMdyw3lPyu2WXpzlNHeaamnf+Oo1rYsG flKPT8rPUUKxMusAaV2kqtxr1JcwtX+QZCC69F23WSi+5ahBc1crK/zly34uej7i7gaO D4xicuYaEpqRvXKqFbARNQVp3EZVpfQobiP5NghSr1+HD6LkNlwWsSql7xq62puw+Oj7 YsDA== X-Gm-Message-State: APjAAAWluZtywgSZLq2KPunxmMAbsfPqSxpQXxX8Qs2w8iJaqBHWIE0V ES7wtgIK3ZJ+Y1ReXA1U5BE= X-Google-Smtp-Source: APXvYqzNEaAklkPbfEAV2aTOCIRuAozu8+bOOFxZyqPo5mQS2zHqbgY7sgQm/BT/lUSvuAjWNSfM5w== X-Received: by 2002:a50:c016:: with SMTP id r22mr4271686edb.30.1556048714596; Tue, 23 Apr 2019 12:45:14 -0700 (PDT) Received: from archlinux-i9 ([2a01:4f9:2b:2b84::2]) by smtp.gmail.com with ESMTPSA id m15sm5009795edd.68.2019.04.23.12.45.13 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 23 Apr 2019 12:45:13 -0700 (PDT) Date: Tue, 23 Apr 2019 12:45:12 -0700 From: Nathan Chancellor To: Sasha Levin Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nick Desaulniers , clang-built-linux@googlegroups.com Subject: Re: Backport of commit a75bb4eb9e565b9f5115e2e8c07377ce32cbe69a Message-ID: <20190423194512.GA31444@archlinux-i9> References: <20190423190426.18720-1-natechancellor@gmail.com> <20190423193512.GP17719@sasha-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190423193512.GP17719@sasha-vm> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Tue, Apr 23, 2019 at 03:35:12PM -0400, Sasha Levin wrote: > On Tue, Apr 23, 2019 at 12:04:21PM -0700, Nathan Chancellor wrote: > > Hi Greg and Sasha, > > > > Please apply this commit to 4.4 through 5.0 (patches are threaded in > > reply to this one), which will prevent Clang from emitting references > > to compiler runtime functions and doing some performance-killing > > optimization when using CONFIG_CC_OPTIMIZE_FOR_SIZE. > > > > Please let me know if I did something wrong or if there are any > > objections. > > This looks like a fix for a performance regression, which don't usually > end up in stable unless they are severe enough. > Yes and no. The original reason for the revert was because of the compiler runtime functions: https://lore.kernel.org/lkml/CAG5bF+S6OvBnsaR6UpMCqjDR9_hMo6qRMHGiW+iCaRYQW4C3YA@mail.gmail.com/ The Chromium guys hit this [1] and have applied the patch for their kernels, I think it should be applied for everyone. > This patch looks simple enough, and seeing peterz on it suggests to me > that this was significant enough for someone to notice. Is this really > the case, or is this just one of those %0.01 performance regression > things? > I don't know of anyone else who has hit this but Qualcomm enabled CONFIG_CC_OPTIMIZE_FOR_SIZE in their 4.9 kernels with clang [2] so it would be nice to have this to avoid any further issues down the road. [1]: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/8bb957d781e2350515c7cffd7e7dc0dfc1777f3b [2]: https://source.codeaurora.org/quic/la/kernel/msm-4.9/commit/?id=e828e50380a34533c37eff98345847fd74667ddd Thanks for the quick reply! Nathan > -- > Thanks, > Sasha