Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9681402imu; Wed, 5 Dec 2018 08:36:09 -0800 (PST) X-Google-Smtp-Source: AFSGD/U9ne6+FSjwg67H+FqNY11U2aUiiB36FIl4oxPuGJCyR5GozmJzVtREOctbrDTU9A3QMRNr X-Received: by 2002:aa7:8552:: with SMTP id y18mr25483418pfn.83.1544027769419; Wed, 05 Dec 2018 08:36:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544027769; cv=none; d=google.com; s=arc-20160816; b=VPGPxqbE9T60dzF6ZrhiOi0KnLWXiE2zTPBoxgHGKb2oRmfRidJaxaGoJLTvetzHYC +0JMVvHi7vT0cET+OITnaAau0XM4o8mU7rCS2JOZuk04yvCwwqykraKcH7U9VPZioJnr 0xiPhDI8qz+Zmd7MRP8rOX2PBhE+YtAgYnJUPRBZ9IF0txZL357ebEwWDET4u/7oeYMH zR4Uo7eMeFClV5NuqiuSgxBFy7KsoYzUDQCAXUXx3A01N0DFqiDCXt7hVlu1VRTye3Kr 1HZX57PivMrpJNysoZp+8ZkSmz+lt5GAUCjZP4tujT6dVwWaExaUBRJ1uJoc3+IE2DGA 424Q== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=xerN6dz5saAhSW5iB4w6qRvMwuMc2Gs7f4GyMJNp8xs=; b=lD5vUPDpyFrzjlFVXexe6xGwxX/pXbWASAH5foeEo6IyT6V084Je9MKnbuhJiJBTif WXXJRlb015qBdmtUKrp8hYiUvsLVygLaU4gAdzgbH/omAONDLR9/UZTh8pJUjYeXPOyi nJ8GAROlCSoA01zJ/rsifCtzv3WxMuJny3r5TNN34VpRvROG9xY1gA3WDH4/NndavLEs GSuE07Ze7HtAxke7RJk1txOePfFYhPRnXihonAEY3+qmHPsusH4cn/aT7EzDgey/v2pR HMrVXTzbSwZtReSNYGIchai1BUn8ciqgWwnvAngcv3Glqs8TIh3DpI1OW/zkOmCpH3dS 47MA== 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 l124si19644428pfl.284.2018.12.05.08.35.54; Wed, 05 Dec 2018 08:36:09 -0800 (PST) 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 S1727934AbeLEQdq (ORCPT + 99 others); Wed, 5 Dec 2018 11:33:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:44000 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727103AbeLEQdq (ORCPT ); Wed, 5 Dec 2018 11:33:46 -0500 Received: from vmware.local.home (unknown [208.91.3.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4AF542084C; Wed, 5 Dec 2018 16:33:45 +0000 (UTC) Date: Wed, 5 Dec 2018 11:33:42 -0500 From: Steven Rostedt To: Anders Roxell Cc: Will Deacon , mingo@redhat.com, Catalin Marinas , Kees Cook , Arnd Bergmann , Linux Kernel Mailing List , Linux ARM Subject: Re: [PATCH v2] tracing: add cond_resched to ftrace_replace_code() Message-ID: <20181205113342.00ed69a5@vmware.local.home> In-Reply-To: References: <20181204192903.8193-1-anders.roxell@linaro.org> <20181205095445.GA14317@arm.com> X-Mailer: Claws Mail 3.15.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 5 Dec 2018 11:43:12 +0100 Anders Roxell wrote: > > > + schedulable = !irqs_disabled() && !preempt_count(); > > > > Is there a reason not to use preemptible() here? > > As I understand it preemptible() is defined to 0 if > CONFIG_PREEMPT_COUNT is disabled. > Thats no good right ? No it's not, which means this isn't a good approach. I have a much better idea on how to solve this. I'll post a small patch set in a bit. -- Steve