Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3786218ybk; Tue, 19 May 2020 12:56:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeOeFx2SaU5V658Jz3Ewl6mUGO3Z6eVNk7ekQnlYZHAENKYdasf8vpyWoPqVgPiXuz+U6u X-Received: by 2002:a17:906:3607:: with SMTP id q7mr776937ejb.81.1589918188959; Tue, 19 May 2020 12:56:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589918188; cv=none; d=google.com; s=arc-20160816; b=c12xDYY2sh21s6jBMvnVB23kyHw39iPBwB1bGImOUoQ6IfSpVbzQaCHGB/eCmdEzwj CuG+yzTA3tBwtUshndYK2bVhCGFWqlMIfLiP7IH56sOizReOtiYOKilEyoNpccxbBIFt Z3TB5fGJMifV2vTXpJ5D2EK4dUuRdZeR9pw8czQF5dGilT37KC9cWU9vTw+0rCCdQ/VP H1vca1yCR00kjksV67cnd9zkFTld0hrxMc39p1uzCM517nD2tpVYao+5vF4eYydgAK1A RfK/sVl8iMRhJJtpWdFAHSpjbuvnhtZcIfH1Zs7DGnW/bxszpnKycB7Xv51pGFAJbSGm y61g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=urLKtiiyrLVz8Ua4Fxzp8gGt/IvKEX1hFAF1IYUDico=; b=zmM8CUEGdxKn7rs+uFtiVvDFcB8VQFJhmGLD25wi6rftyaZEA/pJyf+tDyu2kHskcT 2vdaWj8gYn+4feN+S48ekN6d/31j4Gs/IkcsUwGrxp//bXS6ZOFJtuIy2WgSsBepGACc n0FvEGT/APbVeU5IrZ+qikF2L2MrgsegRras408Z6rQHcKLEfwpgPxn6nx0DSzPuPZn8 s6O+5dm0VFqOw4qlTS5mGLYTwP0QBro6EcX8c16D/UTGOA9SzsP5k2XR/CZCMh6SIpR4 kMo8BSZp7QTCVi13br2DMyObnnDxFWZLbxphBk7K0hWN8t5RWGZhLrpZTxj2ON3jsXXA NoNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=U9h2cOUf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j60si284178edc.8.2020.05.19.12.56.06; Tue, 19 May 2020 12:56:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=U9h2cOUf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726871AbgESTvz (ORCPT + 99 others); Tue, 19 May 2020 15:51:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726447AbgESTvz (ORCPT ); Tue, 19 May 2020 15:51:55 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C4C4C08C5C0 for ; Tue, 19 May 2020 12:51:53 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id a9so561366lfb.8 for ; Tue, 19 May 2020 12:51:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=urLKtiiyrLVz8Ua4Fxzp8gGt/IvKEX1hFAF1IYUDico=; b=U9h2cOUfOcfJrmhfbliK4JirnazbKNYMzDRB/ZRGlHR7Yh6nIhGQI69ANWowb2U+g2 Mpk40uzi9qLJoeLmuKCQ+5dv42asrotkhs4Ul6pmhIbM75+uMOL2vEBtyP3FY/c7uCib /JkLYrJpflPBP/kfV+D+LiQybPenDK9OGwd4M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=urLKtiiyrLVz8Ua4Fxzp8gGt/IvKEX1hFAF1IYUDico=; b=fwX9Ais7PE1toHViK0hlbN/mH/9xaztsiLLnNmchd4LoJdAP+xmVab9wo+DujHiXhc HYsf3E7RDArvgdJiRoDS5av18LbdCpn0WeZH10EluoXDFd0tbARiPZ25F2VyzBNfbSJl hyMeKBPWIXcbKrYcJX6hhnd8HfE4MtKs5bqwOkcAXWQ2n0AAcHdAJz2zZU/AFHwqduyJ ZQtlsNuQhZqNzWOte2wRgXuy+RPHg5Jw0K1VGRfe8W8v3PtlOJ7xBo951qpy5OLnlJnP JY+i8cJa+UczXAGlOch79skKF9KHAd7l2Ek+/pW7c+PS4Xf84a5s14dXDRxbKboVBHC1 iYTw== X-Gm-Message-State: AOAM532U8sHULYzk2hRdPYj/Y2/MeqYFe0BdPAodgKWrnyA8E99qHN74 n0ftEMQvvvD81/7+3oRaZvU44ZuWAhg= X-Received: by 2002:ac2:4c95:: with SMTP id d21mr345991lfl.22.1589917911388; Tue, 19 May 2020 12:51:51 -0700 (PDT) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com. [209.85.167.50]) by smtp.gmail.com with ESMTPSA id d3sm206502lfq.2.2020.05.19.12.51.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 May 2020 12:51:50 -0700 (PDT) Received: by mail-lf1-f50.google.com with SMTP id r125so532910lff.13 for ; Tue, 19 May 2020 12:51:50 -0700 (PDT) X-Received: by 2002:ac2:504e:: with SMTP id a14mr352992lfm.30.1589917909684; Tue, 19 May 2020 12:51:49 -0700 (PDT) MIME-Version: 1.0 References: <20190718131834.GA22211@redhat.com> <20200127122817.GA10957@redhat.com> <20200519172506.GA317395@hirez.programming.kicks-ass.net> <20200519191156.GA325280@hirez.programming.kicks-ass.net> In-Reply-To: <20200519191156.GA325280@hirez.programming.kicks-ass.net> From: Linus Torvalds Date: Tue, 19 May 2020 12:51:33 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] sched/cputime: make scale_stime() more precise To: Peter Zijlstra Cc: Oleg Nesterov , Ingo Molnar , Thomas Gleixner , Andrew Fox , Stephen Johnston , Linux Kernel Mailing List , Stanislaw Gruszka Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 19, 2020 at 12:12 PM Peter Zijlstra wrote: > > My compiler doesn't like overriding a __weak with a static inline. It > complains about redefinitions. > > It works with extern inline though; but that is fairly rare in the > kernel. Still it compiles and generates the right code. That's a tiny bit worrisome, because the compiler might just decide not to inline at all and then you end up with the (relatively bad) version that doesn't take advantage of the hardware capabilities. But things will work, and not be absolutely horrid, I guess. And you do use "always_inline" so I guess it's all fine. For added protection, you might also mark the asm itself as "asm_inline", which makes sure gcc thinks it's a small asm too. Regardless, ack from me, with just a note on that small worry. Linus