Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5147589ybi; Tue, 28 May 2019 08:18:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzSYXnZozwMRE7v67BvFB7I+JW6LM0PiozXeVW1IUaQTsvihoq+bcYJkeyIFRq6mwJ4h67l X-Received: by 2002:a17:902:2847:: with SMTP id e65mr131971156plb.319.1559056690192; Tue, 28 May 2019 08:18:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559056690; cv=none; d=google.com; s=arc-20160816; b=B4nRGzgtF1KduKanQ6nrCb8wYaEXeSySohh82VDIjy+ZRfj2kSCGNqqOfa4QKDdadg fbcU0oS89E12JWvbZDDjQM9y5ZnWYN0lW7rf5u4f/rqa2VY93HFdjmkSw9Fhs2XSGbHK EkNfx1aQ+wDaXGF9WSPcCTIQ469LWQkQhsLJ5nazy0HHKUrbmfxRA02KClqVeHSdsvJf IP+Ydl6i8CO6LTAUFcwFeLJ9dvRwhZGd6Kp55g0NIWOllS1AvXoS/+fGEN9z3xjhx8r8 R+zm1fUWaq9zXykccPKcR0+iibfapRBfrv/HkNVSi4y+OAElb2Y0hH28v2sLNeAw7fRn CQuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=WHyMboZCf1ZxDXnMjrs3TTeI06vj4n2ddztWgH3WCXE=; b=mT3O7DsDpo6HophwgBE0D/k5ll+nDv+k6sgIUBdvEzFFKlg8iCYUNgqCQpTjh/NPD7 AcQEj0eOfmI4uWFCZli0ChlbQepe+TdpgyE2Q1ik7/KGMQFZ1/XqVge8RlWLXQBg8ob1 kVor+QRTt5Gg+f277J2XQgjGcg8OiAiPERiI6WIMVRQJZ2mqytHsmTPy/U959ey9DKeb rcM4MIY/t65+rU41uPxDkgx1RJo7Bl5+RTEfz8dubpRwKtVPg0EUb5nTp8u4xwJWNcWj CDLUdfx3KBf4ZI5Od1BnTApdUpIftWo4fzsn+qVxEppvc9nVqg6FsNPCuBpQVQKyei/b LUdg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x8si3832989pjq.80.2019.05.28.08.17.53; Tue, 28 May 2019 08:18:10 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726879AbfE1PQu (ORCPT + 99 others); Tue, 28 May 2019 11:16:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54490 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726362AbfE1PQt (ORCPT ); Tue, 28 May 2019 11:16:49 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CA8E5A3B49; Tue, 28 May 2019 15:16:44 +0000 (UTC) Received: from inkernel.default (ovpn-116-60.phx2.redhat.com [10.3.116.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7A9E67856B; Tue, 28 May 2019 15:16:38 +0000 (UTC) From: Daniel Bristot de Oliveira To: linux-kernel@vger.kernel.org Cc: williams@redhat.com, daniel@bristot.me, "Steven Rostedt (VMware)" , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , "Paul E. McKenney" , Matthias Kaehlcke , "Joel Fernandes (Google)" , Frederic Weisbecker , Yangtao Li , Tommaso Cucinotta Subject: [RFC 0/3] preempt_tracer: Fix preempt_disable tracepoint Date: Tue, 28 May 2019 17:16:21 +0200 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 28 May 2019 15:16:49 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While playing with the model + working in a fix for the task context & trace recursion, I ended up hitting two cases in which the preempt_disable/enable tracepoint was supposed to happen, but didn't. There is an explanation for each case in the log message. This is an RFC exposing the problem, with possible ways to fix it. But I bet there might be better solutions as well, so this is a real RFC. Daniel Bristot de Oliveira (3): softirq: Use preempt_latency_stop/start to trace preemption preempt_tracer: Disable IRQ while starting/stopping due to a preempt_counter change preempt_tracer: Use a percpu variable to control traceble calls kernel/sched/core.c | 66 ++++++++++++++++++++++++++++++++++----------- kernel/softirq.c | 13 ++++----- 2 files changed, 55 insertions(+), 24 deletions(-) -- 2.20.1