Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9318258imu; Wed, 5 Dec 2018 02:51:42 -0800 (PST) X-Google-Smtp-Source: AFSGD/UhCSdRJrOusoOx1LaSGz3DfKZqQY0LbaG61Uc6FFdoqHmqhM4rPBP2Rez4KKpDLkOjjDR4 X-Received: by 2002:a65:5a8e:: with SMTP id c14mr19782499pgt.137.1544007102933; Wed, 05 Dec 2018 02:51:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544007102; cv=none; d=google.com; s=arc-20160816; b=JvziIWka4OEjNk+JPp8CkItQ4gMAUaSHn6Rw9VQUWWu3QTQFb0NhUyM2gtCa7WyBRR u9GO88rCi+LlPrZD7SObVfKbqRcXulx0MZ16sjj+DaukYnqymTQ6xp9DEN8yUb+7g+b7 iGU+KwS/CfUJWafFIYj8JvOEMh5FGmS97GqYQe59QNQ4u5IeiXOSPHoh934Ht1SIo7I+ e6Il3pj8b1aBhP97dUiJJRMpjMUOJhW3RN8afkQhdEPbNv1RTBzVRS6Oa29EN+2xWq8e 60aZjeRYnM4X11y/64B1NSPNqXM9nphkLhlp6reEmQhvi20vofQ4wfSDpW0YmY4vlG/R hW5Q== 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=PMF0bAzTBxyCkjK+bptI9nByQiftSOTnZNCdXVQwIUE=; b=aN5BSwXehkBfNJ9VYzLh7oXMrtKUO+h8K877QcaywTtZ5rpbd2E3BWAZ7Kl0ZLClAy 05Dx21X/Ed6jVBve8fsknFwBdDU9WJx/tEj2Iv7et1vk1509Y4z3/Z8Kqx+nqsIUz8U/ I7Bmq5CztvERTdEFQ5uDwlxobqQzFX8UHa+IRhVVQAC/rzr8d3eMYIFejL+uB02DSHxp +Ow8lRsNd3DpzPpiUZubX3eX1H/vH0qsclf049DkzZ5JZkIXrBAYSyAumAhhcvaQByDZ cMtH7nvT4WcK9CDkaDkcQvTAjr4rOmn6phwhiPtkKmhSyyXvnGDljf8Qw2hmAGd6lEMn Or/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VbYn6OOM; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k33si17826760pld.374.2018.12.05.02.51.27; Wed, 05 Dec 2018 02:51:42 -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; dkim=pass header.i=@linaro.org header.s=google header.b=VbYn6OOM; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727278AbeLEKuw (ORCPT + 99 others); Wed, 5 Dec 2018 05:50:52 -0500 Received: from mail-yb1-f196.google.com ([209.85.219.196]:35821 "EHLO mail-yb1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726979AbeLEKuw (ORCPT ); Wed, 5 Dec 2018 05:50:52 -0500 Received: by mail-yb1-f196.google.com with SMTP id z2-v6so8198032ybj.2 for ; Wed, 05 Dec 2018 02:50:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PMF0bAzTBxyCkjK+bptI9nByQiftSOTnZNCdXVQwIUE=; b=VbYn6OOMANHGd9NLXCgfWGN8LiC6/Hc5e8pfcuOR7Tcv28w3jcd0ZsAHxU13ohXU9k 6QmEi2cT7AG/YXWTDSLogpBHsh5cgsoChHAwYcPkchXpKGqnyqASrhYd/E+dCRm2eVpN jJrcP3LlQV900grS6OjawLv8jhEeTyXTpTtY4= 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=PMF0bAzTBxyCkjK+bptI9nByQiftSOTnZNCdXVQwIUE=; b=NDp82AZ6TSVU3bRDY6ytdYeA2Tz1O2JTbMnclA99bzPmLM3BYQIu2x8DPMvABkZmWj PCjQOlQGYHzs/LKEmaAIHkN8xcRyKwfOAtf8i1EXFzfFvz+X37bMu9lAZzQTI3omVG0D xdO0LL2LFCMyobEO/F774G+tqQOMtZjf9bfUUpjsI842wEVL6+BHjCWHhS9d5chL9JaS /hbZ+05sRFLZVw0liBn7QFuJQoJ/GjILUg9qwoINrMLtOC2azRoJ8/BvTZPYVfZTP460 Ls6G8uz2rrPnvgyScITqDHO+ZeKEtszbbn0NNpE2w64PKBLLAFp3XJrBSCU7Lcx4QyBy MjNg== X-Gm-Message-State: AA+aEWYhqXwxyhQ0pZbaSa88Nw61cBSlpH1B/QbytzCFRAHioT82pK25 8XIyB2ko0vH4TBPHxEC3ijlif3h/74TrK9qsc3kROA== X-Received: by 2002:a25:2157:: with SMTP id h84-v6mr21892011ybh.198.1544007051334; Wed, 05 Dec 2018 02:50:51 -0800 (PST) MIME-Version: 1.0 References: <20181204194044.9506-1-anders.roxell@linaro.org> <20181204173258.6de70c66@vmware.local.home> In-Reply-To: <20181204173258.6de70c66@vmware.local.home> From: Anders Roxell Date: Wed, 5 Dec 2018 11:50:40 +0100 Message-ID: Subject: Re: [PATCH v3] tracing: add cond_resched to ftrace_replace_code() To: rostedt@goodmis.org Cc: mingo@redhat.com, Catalin Marinas , Will Deacon , Kees Cook , Arnd Bergmann , Linux Kernel Mailing List , Linux ARM 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, 4 Dec 2018 at 23:33, Steven Rostedt wrote: > > On Tue, 4 Dec 2018 20:40:44 +0100 > Anders Roxell wrote: > > > When running in qemu on an kernel built with allmodconfig and debug > > options (in particular kcov and ubsan) enabled, ftrace_replace_code > > function call take minutes. The ftrace selftest calls > > ftrace_replace_code to look >40000 through > > ftrace_make_call/ftrace_make_nop, and these end up calling > > __aarch64_insn_write/aarch64_insn_patch_text_nosync. > > > > Microseconds add up because this is called in a loop for each dyn_ftrace > > record, and this triggers the softlockup watchdog unless we let it sleep > > occasionally. > > > > Rework so that we call cond_resched() if !irqs_disabled() && !preempt_count(). > > This isn't urgent is it? No, it is not urgent. I'm trying to get allmodconfig to boot on arm64. > That is, it doesn't need a stable tag? Also I don't think its a regression, since clearly nobody has ever been able to boot an arm64 allmodconfig kernel or anything close to that. Cheers, Anders