From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77FF8C43460 for ; Wed, 5 May 2021 15:31:28 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E9B7E613BE for ; Wed, 5 May 2021 15:31:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E9B7E613BE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pbPrHFZjiVxHaqMLK5wymbIiZyo9il1Ykt8McbhhIPs=; b=ioOGykAKeHKQ+N2d77CvxjGun rEFVEnftOkXg0uOrwcoAKqWiAGvJZCNUUlMVTEBLJTGX+ND149bi2KrDvA+UZcAUZQqwfI1mQ0TE9 s0yd4xHZhjP5N0pvZuaBieIjhsIEvA0nQUvzq4aW73GSw7VhGvmr4GqTD/eKLenoX5DkS+evqQZon 5DvUTlE+uSEWZ+ALWUpkrlef1TY+vhKUSy1w/DAlwcaPwpvMpXWu0ewBHmpypexLYYUNHJpko3tc1 Xt4ckF5JxUnzcPdSWiT9Ej4kfe3XR6eJmpA4Zl6PF2+7Ohbf0M7DDSMVX2Vs/0O4MMzUMPl6btY/f FYWRYDzJA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1leJSt-001Ywa-EZ; Wed, 05 May 2021 15:29:31 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1leJSq-001YwI-1h for linux-arm-kernel@desiato.infradead.org; Wed, 05 May 2021 15:29:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ezlyr+gDuUyOBN61GBYUpxRdndnehOGDS4eFF214xF0=; b=psEFZHJwHOuuPm/UjX14Y9vtPC Hg7ZWx5NzQmq9DdGy86b0CLmkeydWQ+b5qznMu45JP2alpJFKmjVzPFxci4i/mt+whQALulTTrLwX H/lifTIFvE7tVvP/JJAVQg4H86b837WnzGNYWGaoqZqi9CfhyzoE85PGmHy4v8lp3PKmbJoDwwWCU nmgCRYe5s03ZzN6WWK0MZMd/O0SdpOOnydHE62bIBzIoezk3+CMHsPFdXu6rOgTJL66stLphPGYMl gNbuLkslQm6p3mGYd1jhXQY0If0oJncA94n8zBkRI39S0LjRs1c6WL922DJwy4OhZe4dMl8CvbxsK Vc/avWjg==; Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1leJSm-004sJH-Pr for linux-arm-kernel@lists.infradead.org; Wed, 05 May 2021 15:29:26 +0000 Received: by mail-pj1-x102c.google.com with SMTP id t2-20020a17090a0242b0290155433387beso1005695pje.1 for ; Wed, 05 May 2021 08:29:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ezlyr+gDuUyOBN61GBYUpxRdndnehOGDS4eFF214xF0=; b=YjJ1VzhSMZjlBfg8J30OTqH9GgV4hr2ohrpISTKAo1iynCZ0tDNFs3bV5aLL+/EKNy mYy8Kz5ckta04yA/C7Ax+WCfWkp/GOh7nHgj9Fe/KuILw3XQWGfKJxvxyKaKEqLXmdvF sGQS67msoID/AIzHraoVtDHCkuBn6V178NFbHiXPHg/LyceJXl9s1sTmR0KzFNzV0ekr W7SMfXZBLxURq6nvVgBnAw8ByAir8+e7lbaqK+7eGjNueIIRgBCs98xZvixfcc4hERB9 WqH9LqFYxH8hJRXil0yM0Ug3RE7vPBkm+rqEnNDonFWtmmi02DP6uq3Tsf8m2xbmQV5/ EuIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ezlyr+gDuUyOBN61GBYUpxRdndnehOGDS4eFF214xF0=; b=p1KOENP8x1U9Ao59wkKNF+3/cp3VqQQaYBfkDkGUApZHpU8nqFYqftY9k8ZfFEC9B7 VMAZIm0AZWZ2UnyzmScUlguGAWM5HVE28JX/NDqDWYLsIDMbjKD288xmrKvxCbOZo1mJ 5bs5mgHMNqY4cyGzg0JRdg4+gHW/25Z5Siu8sl0jqe/xkcGd3oVhVxksF7PipcT/oqt3 qpVXaItFukbfHI9iERrVgAITf6KkrEv06bu+6qi0Q80GEtpDF+i+IL677WoTvqrtEdn4 Uv04A8oxTcNVZePVL+M4ETlAQSQty4dDcqGVqD77tffOUYWl/mDknw0LQu5qKGvxZ80v J+Hw== X-Gm-Message-State: AOAM530gMAoHeiP594p9yLUCCnjz1tG+uC73YTACRoRPJt0vnAgZRNoF st35XYNLlNazlMhQbzGy035qoA== X-Google-Smtp-Source: ABdhPJxSsvj0ZMiOocNKrnSnUh50Z+BjYr+rQ0eA6lSJ3nSZz8NKIgyhCvN4xtFswMpLCwkeur5UFw== X-Received: by 2002:a17:90a:f684:: with SMTP id cl4mr36251066pjb.139.1620228562614; Wed, 05 May 2021 08:29:22 -0700 (PDT) Received: from xps15 (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id md21sm8045977pjb.3.2021.05.05.08.29.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 May 2021 08:29:21 -0700 (PDT) Date: Wed, 5 May 2021 09:29:19 -0600 From: Mathieu Poirier To: Denis Nikitin Cc: Leo Yan , Mike Leach , "coresight@lists.linaro.org" , "linux-arm-kernel@lists.infradead.org" , Daniel Kiss Subject: Re: [PATCH 0/4] coresight: Add ETR-PERF polling. Message-ID: <20210505152919.GA1766375@xps15> References: <20210421120413.3110775-1-daniel.kiss@arm.com> <20210426175425.GA1391779@xps15> <20210427154746.GA1422814@xps15> <20210427160443.GA208852@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210505_082924_894833_AE1388F1 X-CRM114-Status: GOOD ( 30.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 04, 2021 at 11:46:20PM -0700, Denis Nikitin wrote: > On Tue, Apr 27, 2021 at 9:04 AM Leo Yan wrote: > > > > On Tue, Apr 27, 2021 at 09:47:46AM -0600, Mathieu Poirier wrote: > > > > [...] > > > > > > 2) ETR polling ensures that more trace is collected across the entire > > > > trace session - seeking to reduce inconsistent capture volumes. > > > > > > I am not convinced disabling a sink to collect traces while an > > > event is active is the right way to go. To me it will add (more) complexity to > > > the coresight subsystem for very little gains, if any. > > > > > > If I remember correctly Leo brought forward the exact same idea about a year ago > > > and after discussion, we all agreed the benefit would not be important enough to > > > offset the drawbacks. > > > > > > As usual I am open to discussion and my opinion is not set in stone. But as I > > > mentioned I worry the feature will increase complexity in the driver and > > > produce dubious results. And we also have to factor in usability which, as > > > Al pointed, out will be a problem. > > > > Just want to remind one thing for ETR polling. From one perspective, > > the ETR polling mode is actually very similar with perf's snapshot > > mode. E.g. we can use specific interval to send USR2 singal to perf > > tool to captcure CoreSight trace data, thus it also can record the > > trace data continuously. > > > > I can see a benefit from ETR polling mode is it might introduce less > > overhead than perf snapshot mode. The kernel's mechanism (workqueue > > or kernel thread) will be much efficiency than perf's signal handling > > + SMP call with IPIs. > > > > So it's good to firstly understand if perf snapshot mode can meet the > > requirement or not. > > We evaluated the patch on Chrome OS and I can confirm that the quality > of AutoFDO profiles greatly improved with the ETR polling. > Tested with per-thread and system-wide mode. > > Without ETR polling the size of the collected ETM data was very > inconsistent on the same workload and could vary by a factor of two. > This, in turn, affects the quality of the AutoFDO profiles generated from ETM. > With ETR polling the data size became pretty stable. > Performance evaluation shows a similar consistency in performance gain > of AutoFDO optimization. > This, I think, supports the idea that data collection right now is sensitive > to the process scheduling and can be improved with ETR polling. > > For the system-wide mode particularly we didn't see any other alternatives > to collect data periodically on a long-running workload. > We haven't tested snapshot mode though. The idea sounds interesting. > But small runtime overhead is crucial for the sampling profiler in the field > and if there is a noticeable difference we would incline towards the > ETR polling. Please see if Leo's approach[1], or any kind of extension to the current snapshot feature, would be a viable solution. Reusing or extending code that is already there is always a better option. Thanks, Mathieu [1]. https://lists.linaro.org/pipermail/coresight/2021-April/006254.html > > Thanks, > Denis > > > > > Thanks, > > Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel