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_ADSP_CUSTOM_MED,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 C4570C433ED for ; Wed, 5 May 2021 06:48:51 +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 4BB3A6109E for ; Wed, 5 May 2021 06:48:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4BB3A6109E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com 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:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MZSO0CctummfM9tiKBOv8lRSE8KqLB5+ENu5kULzh54=; b=Wibu12wRwL4faaMw7q9/7wWB4 Kax44tKZDMQWvD+YWIzQ1WBQAH0HM4RsEws3kAthLl4yu/V+RLeMsYEu1+vmd9vXtq9yyheeG32XG csJiJRFHwCOAI6He6Upd5gIaw8H4f7QHFe29Socwvr4K7ov8+CZM70yJLWrzNcOcJEGBwlzI6a+nL K7t/DbwakQGZI1sjCKHuR4iPqLuhVfDwuOvnMYht6Z70js9R/S9et1rbSxBVOA3GgfNDRfa+TKjzg ZZk+bZyikq/x5cHkoynGJmP1kcAXg0kE6aVB3b+CGeOYkT1j297N1S7t5ABmCGYkn0JLmDQHxvTN4 28MBQb5pg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1leBJ9-000NDA-CC; Wed, 05 May 2021 06:46:55 +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 1leBIq-000NBo-Jn for linux-arm-kernel@desiato.infradead.org; Wed, 05 May 2021 06:46:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=RFEpa7aRAhXqmunOFPKn8EFttQ65syzs7QU8w3fGK2E=; b=GRHzaitbn+AgfQN1QL5Dl/tz93 cCNmlJs1CVFn86NIMxhbz7QorWFvAApovD3F7e8tb8IbI02yaoOS9STWwk+fJhhTPWmrob4uAcq1U QrFNdsCBvT007tqDYdLaRheQxxZE6GI+kAGohgQJbTJE6UroGAA5xfSavsQaq6wo4+SKMGVj8qMPg 05m5M3DRwEmF8TaWIyX2ZOgBfxOngwGQFilpWxWm07pcOBpyrphAMSJQlHAJMPV0Ldt7pPFRlnmDL 5Iyn5McMMMhQV2zQpuk98glbd6qfhEsty+o210ljJoq84dp7NxIskMbuKVMEhrmXbYeq4bIrjmUpE XyaB0xmg==; Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1leBIn-004VZU-R8 for linux-arm-kernel@lists.infradead.org; Wed, 05 May 2021 06:46:35 +0000 Received: by mail-pl1-x62f.google.com with SMTP id b3so584035plg.11 for ; Tue, 04 May 2021 23:46:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RFEpa7aRAhXqmunOFPKn8EFttQ65syzs7QU8w3fGK2E=; b=CvyMzhqqlEorNd9BJ1+AH9NsnDSvzpAF7jJcA4m/sKgawGpOwi1LGxuVsrZ7/xWl34 X+SQtN5VkgG/48d00Ajb6OEDhb06S5KpRzPRJ3HdEPpIdcZQpxQSYq2+A2/NT+yk/aNZ c3CeKu6bk3xjF4438qXoyFu4N++VUDP6tUJDk1QmIDj6WjE4h/Gxmaff+FapCmT0ayQP LkQcYhVKW0uKd71w/Si8GTU3sHgHK2aJFE3mGJAXNuZWJ2U5mDoBp+V3qdJqPhRv/Wyw avRZ4pMmpluwCvU18V12aPT3kETGpMsRy/HmcL0DaEkIWX2QG+F8c3rTmUzGed9l9SYk 6mfw== 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=RFEpa7aRAhXqmunOFPKn8EFttQ65syzs7QU8w3fGK2E=; b=kDuqZdx8CujKJKSjAIXIEEsUjgLolXtNbekPHKJezUwNH2pJs6I3VRzesovmDcdE7z BNOobB3ktuteHzqEpyRrMoE90HyiB04CdAPogX7kEyGqv6rOZ8klFtmfRS24zZzHapBg Qh+tiB73Tkgbhgs+Gh1C7f/1Nz306cAUu7SDq7sM9JqWHQrSmzREWTJSrRk7Xt2JVeSF 2TPhKNxznltyoI2TWLcurzji+MH5SFG3v4Uv5Uqjy8o3c8wxRKUADxmKRYqFJLYrq/zN HU7MAUI4fIxuA2pnkZoCWuAwNCnV2gr85EzWAtPRqatsLHN9vsjrQf7EyITfo4xCL6up a9/Q== X-Gm-Message-State: AOAM531UrMh1f2KJAiIN2Im9OxAUQwFYxwDtG6Gc61GoIkevI4UNSfJf fq3Y0u1LUNu0H2AcF7YGXJwvcg1R63J5mEnK8jJArA== X-Google-Smtp-Source: ABdhPJxnwXKH9Q8IBtuT/BwebwHbCV/wya3m2POtIFCDGw4FN78uLaCDggBW6FPDwzNLbcG0Mp1k6JT41rWCyM1C/uQ= X-Received: by 2002:a17:90a:d085:: with SMTP id k5mr9661637pju.221.1620197191569; Tue, 04 May 2021 23:46:31 -0700 (PDT) MIME-Version: 1.0 References: <20210421120413.3110775-1-daniel.kiss@arm.com> <20210426175425.GA1391779@xps15> <20210427154746.GA1422814@xps15> <20210427160443.GA208852@leoy-ThinkPad-X240s> In-Reply-To: <20210427160443.GA208852@leoy-ThinkPad-X240s> From: Denis Nikitin Date: Tue, 4 May 2021 23:46:20 -0700 Message-ID: Subject: Re: [PATCH 0/4] coresight: Add ETR-PERF polling. To: Leo Yan Cc: Mathieu Poirier , Mike Leach , "coresight@lists.linaro.org" , "linux-arm-kernel@lists.infradead.org" , Daniel Kiss X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210504_234633_917150_71E44D97 X-CRM114-Status: GOOD ( 25.20 ) 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, 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. Thanks, Denis > > Thanks, > Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel