Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1286215ybd; Sun, 23 Jun 2019 04:16:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJPSe+MSZV7jzBXVL0DBbd2w3ftGaAVlNEj0dC5ane/2o4Hzw9J4pU+rdelseGEagKgGjC X-Received: by 2002:a65:42cd:: with SMTP id l13mr27033539pgp.72.1561288595934; Sun, 23 Jun 2019 04:16:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561288595; cv=none; d=google.com; s=arc-20160816; b=z0PlshlHveIv5afiqQ3YZqvZjy9F5FpZR6kvoupdonvapfkv2mzsp+eMhkC8LJPY4h NtUVuSTCL5wLRvJCz7CbM99R/x8ebCjsHN8stZW6RstCJgtR8t/Tw4DHoJdC8+QByhAD CXMV3aqGdAqixsghDh7+FlTXhL6rKzRtuArt4AsBI1poxMAlElI80rPVZc5C1DMHWfoX qZDmMW1wlPeQ0/FNxlU3hCKTiN/gP5mCbIR3P1n3YyCh1/BT99DRu7zWt43gkkWbFR30 m9u9lOVuo9hobQLfILdzhFglsnvm5ie5O94FcDda+FTjCh31TzEhqCKjluY+quBHqfkW ROew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=YeET0UULw0CBhjJiD5/FKojM2NZuBGdMFK1qweueUxc=; b=UshS6GCMJoi+Z9FVO48XsmobyxTfaCrDtQNd2ENif8NQVU4cLfSRJ25aojFy9qvpek oMMOh8E+3CnRviGX+04zncRmJZ69d3uV1vtDJtqoz7OskZprvGX7dEe8YjpGvCj3j67P /j/BjlNt+zoS4yOs+14bMSGNagIcuWXcGGdELobtxewOjLJ+PVKGiKH4K22UNJn/kh/l N34/wkb9vhX7nu8U5HPM3wMYbxnldiNQDJmnL4aVcEEfiZzKjyxeC9lRuyIZ/DdH1g+x ve59HiM3sclfpYNyrG3Rtv+2iPTA0Qgmk/skXauKi9jaKZeL5kfsNSttjFJMoHuOrMGm HuZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t130si3088763pgc.237.2019.06.23.04.16.17; Sun, 23 Jun 2019 04:16:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726477AbfFWLQO (ORCPT + 99 others); Sun, 23 Jun 2019 07:16:14 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:33221 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726350AbfFWLQO (ORCPT ); Sun, 23 Jun 2019 07:16:14 -0400 Received: from p5b06daab.dip0.t-ipconnect.de ([91.6.218.171] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hf0Tf-00086e-Rm; Sun, 23 Jun 2019 13:16:07 +0200 Date: Sun, 23 Jun 2019 13:16:07 +0200 (CEST) From: Thomas Gleixner To: Anders Roxell cc: peterz@infradead.org, mingo@redhat.com, will.deacon@arm.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] seqlock: mark raw_read_seqcount and read_seqcount_retry as __always_inline In-Reply-To: <20190611154751.10923-1-anders.roxell@linaro.org> Message-ID: References: <20190611154751.10923-1-anders.roxell@linaro.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 11 Jun 2019, Anders Roxell wrote: > With the function graph tracer, each traced function calls sched_clock() > to take a timestamp. As sched_clock() uses > raw_read_seqcount()/read_seqcount_retry(), we must ensure that these > do not in turn trigger the graph tracer. > Both functions is marked as inline. However, if CONFIG_OPTIMIZE_INLINING > is set that may make the two functions tracable which they shouldn't. > > Rework so that functions raw_read_seqcount and read_seqcount_retry are > marked with __always_inline so they will be inlined even if > CONFIG_OPTIMIZE_INLINING is turned on. Why just those two? The same issue can happen in other places with other clocks which can be utilized by the tracer. Aside of your particular issue, there is no reason why any of those functions should ever trigger a graph. Thanks, tglx