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.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 07798C10F03 for ; Tue, 23 Apr 2019 19:56:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C83CC21773 for ; Tue, 23 Apr 2019 19:56:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Pb6QYs8i" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726502AbfDWT4a (ORCPT ); Tue, 23 Apr 2019 15:56:30 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44275 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725945AbfDWT4a (ORCPT ); Tue, 23 Apr 2019 15:56:30 -0400 Received: by mail-pf1-f193.google.com with SMTP id y13so8012911pfm.11 for ; Tue, 23 Apr 2019 12:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=JpH0pRA90NiUnLbRKMdzWxPB6G8a7lwOMtJMD+/ihjM=; b=Pb6QYs8iSXr923TxPPxISVKNsUzMas6zObiZE03FtK7ZGKlTS52j7fVYBQPxqbfA4N kNYQx74pLEzBmOS9DYiRFeqQeKEVA+ZYlUyikx4itgm464LXDyIbS3Pefaq2FUSU/deB CfDmKNdUNy3BKYRRya0BZkZ5cwFwyoJ7iDElw= 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=JpH0pRA90NiUnLbRKMdzWxPB6G8a7lwOMtJMD+/ihjM=; b=XNBmmpCBP7D4p/HTMQwWSRcC2u+7el/xhFbt4jB1vRhZFwn3OBy9GszmFmaUo0y3oj YdFdSPwWN+6Dmm6KSaukZbyPm7DMidEPtm8KGpw+9/oJz6EdMpx0+QQCfvzIjxiRDTG7 508tTXEf43b9yLzXbnTHUXLBZH8B5bZJCiNJHG4kwsHy4i7wBL427hlRzoyJFQv6VO0z 2YbZDspo5eukNQeZEviOAy/7oClYJehvpJCKRSWFsCeXHvK/mlWdBa7KtKamCJ6lYRL4 /J3va/pP/rBIxXGlXQYIbOxGRCV3HcFY5QoObA/l5uEO3iGvW74bI2Qxb2xs2VlRfhLC OukA== X-Gm-Message-State: APjAAAU3GmTXtMCYGpAFNqbvxUL/EZS+9C/8EHu6wp8+6+PWYgNfCC+6 g6D7dZVvOGXjDU8ZPm819IXT5g== X-Google-Smtp-Source: APXvYqwmkLdJYrY5bGFatP03qunPU8m0QtsrXQnsq8q4I2bSnbDpaxjl6brQf1DCReYj7ycTbF8HbQ== X-Received: by 2002:a63:1e57:: with SMTP id p23mr4523276pgm.352.1556049389382; Tue, 23 Apr 2019 12:56:29 -0700 (PDT) Received: from localhost ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id i15sm23390872pfd.162.2019.04.23.12.56.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Apr 2019 12:56:28 -0700 (PDT) Date: Tue, 23 Apr 2019 12:56:28 -0700 From: Matthias Kaehlcke To: Nathan Chancellor Cc: Sasha Levin , Greg Kroah-Hartman , stable@vger.kernel.org, Nick Desaulniers , clang-built-linux@googlegroups.com Subject: Re: Backport of commit a75bb4eb9e565b9f5115e2e8c07377ce32cbe69a Message-ID: <20190423195628.GD112750@google.com> References: <20190423190426.18720-1-natechancellor@gmail.com> <20190423193512.GP17719@sasha-vm> <20190423194512.GA31444@archlinux-i9> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190423194512.GA31444@archlinux-i9> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Tue, Apr 23, 2019 at 12:45:12PM -0700, Nathan Chancellor wrote: > 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. We picked it into our kernels because we needed a fix *now* to unbreak our builds, but I agree it should be fixed at least in relevant LTS versions. > > 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 I suspect the Qualcomm tree would hit the VDSO issue if they use a sufficiently recent version of clang. Thanks Nathan for posting this to -stable, I should have cc-ed them in the first place.