Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8631070imu; Tue, 4 Dec 2018 11:27:09 -0800 (PST) X-Google-Smtp-Source: AFSGD/WypGfl0wI+Pf7Xj+OXQRX0bCE1vIDn2c52LgnodSrGav7r3OR+LnYTPy/FVo8DBYgrsnOJ X-Received: by 2002:a17:902:8d8e:: with SMTP id v14mr21047891plo.133.1543951629543; Tue, 04 Dec 2018 11:27:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543951629; cv=none; d=google.com; s=arc-20160816; b=cl+uC7fWWwkk4LaMRXjVl6QCMV0hu/zPp/op9IObO6w8hk7GIL4B0ZPiybqlFui4Kx EpJW9I0t+p7YB3WM9q6Ny31KHzh13jOCf0mO4PJQQ2LFF08dcPRalz2UUztlkjPa+b05 7Wz1JoPa3FdPet39R/Zt3Q65U/0PPNH7WVRvdALrp+1ocyxnB0dzsElra9qfCxxk/KjN PuJjeLEBNM7efs1/oeRFB/bhypGisWGYvpC8mz4o/gDqmxIxlKYKIqLdAEoU95s4fnZr caZIePrL5uM6vhPiyIZtnJPbsk/bAXyG9L2teVKuKTF2fOh6kkMTzo75BmszqucW/x8K HGhQ== 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=QOg6aNcJr1LQ7jAnnZQn6cnT30WyrQH2omgagch31qU=; b=LY9HilXdy7jU0aCjgWJJAZi9cCPQ17ZNkNQzZdOqBm3tXdh120RPGyyqNyIBWvND4o +TGxxpxNzBDZ8Cl3i7b4X5Jp89vbWS/qAn4ZzpHN5NIzUncipXnOk3DbpEDFRJMSIvUW zukzxVV3aWdgbihm3QwKljE1sC1/HqCuRRMDJu/u2BpX5c6//AWAInXmFRGGs3NF7gF8 HPxAnGC2+yj2oNA94vyZaxjaBlGY64c3YOAI2m/pxgwHwpmK7k8M94a2LhIQo7KQ7Ljl x1IA2Z8hYMzu1TA6L5npUFfMBTpDOhGxjgoaPVkZ8g868t3TplENTA8wSQON2Hlq/osK Q4Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JLzKMTPA; 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 d32si18476208pla.136.2018.12.04.11.26.54; Tue, 04 Dec 2018 11:27: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; dkim=pass header.i=@linaro.org header.s=google header.b=JLzKMTPA; 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 S1726213AbeLDTZn (ORCPT + 99 others); Tue, 4 Dec 2018 14:25:43 -0500 Received: from mail-yw1-f66.google.com ([209.85.161.66]:35070 "EHLO mail-yw1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725831AbeLDTZn (ORCPT ); Tue, 4 Dec 2018 14:25:43 -0500 Received: by mail-yw1-f66.google.com with SMTP id h32so7464691ywk.2 for ; Tue, 04 Dec 2018 11:25:43 -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=QOg6aNcJr1LQ7jAnnZQn6cnT30WyrQH2omgagch31qU=; b=JLzKMTPAxNKMl9OJ0JnfJxdS+jvQrSVktsCKY05zGofV9GRG158An8xO7Y0UoabwTB r7/WLg4ZzfmE9nvyGV8S75W7Qd8bwMwLNaSZjkbijleiy3rbXRZ9o7YC+his5iPEIVSh bV3QJyeWjCty/0yezB/FW5AYzASB9QL7GKCG8= 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=QOg6aNcJr1LQ7jAnnZQn6cnT30WyrQH2omgagch31qU=; b=pULv2SmG0KyHew6bQ//0Ltf8rqAupL0IztW2SLpK4/9EY7vKuTsHjralfM/QNWcAsU aBz3cxm1fcwduhb8QZpyTbtLWAwcwhH33sl5kLmXxX058SlLdRXlJABl5xloiSkwv8Jc RAjE5ahIlkEDvEtXtaxOM+xzFhOz3Dst66NmpZlB7qQFSXEOMY7wNzKgSC4Xa+GUVWx5 5wBjgNAZeW2P5HKHOEdJrMxunaM2Wc7h5PTVwd092WBnhKH8DNJxT58uMnOuMd7t6rnu YMvTniTZ1qVsU1dV/ajuxtPDN89lLQsSMdRq6SgwdFd8VOkyy19uepBZphXFjLRTLmNk 9o9Q== X-Gm-Message-State: AA+aEWa3C2jY3+Oz+5J9ISjdqfN6irXcLasOfoUBPr41Tq6kmuPukMoS eDogd/hl/iUbjnPydRceWAQdUWQpRuUz4mOtK2upAg== X-Received: by 2002:a81:e40b:: with SMTP id r11mr21086209ywl.56.1543951542441; Tue, 04 Dec 2018 11:25:42 -0800 (PST) MIME-Version: 1.0 References: <20181204191229.6851-1-anders.roxell@linaro.org> <20181204141908.76e7afa5@vmware.local.home> <20181204142142.4e2e2169@vmware.local.home> In-Reply-To: <20181204142142.4e2e2169@vmware.local.home> From: Anders Roxell Date: Tue, 4 Dec 2018 20:25:31 +0100 Message-ID: Subject: Re: [PATCH] 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 20:21, Steven Rostedt wrote: > > On Tue, 4 Dec 2018 14:19:08 -0500 > Steven Rostedt wrote: > > > > @@ -2435,6 +2438,13 @@ void __weak ftrace_replace_code(int enable) > > > /* Stop processing */ > > > return; > > > } > > > + /* > > > + * Some archs calls this function with interrupts or preemption > > > + * disabled. Howeve, other archs don't and this can cause a > > typo "However". But could you write it this way: > > "However, for other archs that can preempt, this can cause an > tremendous unneeded latency." > I'll fix this and move it up (where I added it in the first place but moved it) =) Cheers, Anders > Thanks! > > -- Steve > > > > + * tremendous unneeded latency. > > > + */ > > > > Actually, could you move the comment up where schedulable gets set? > > > > Thanks! > > > > -- Steve > > > > > + if (schedulable) > > > + cond_resched(); > > > } while_for_each_ftrace_rec(); > > > } > > > > > >