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.1 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 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 33AD9C2B9F7 for ; Wed, 26 May 2021 06:49:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DBE84613E1 for ; Wed, 26 May 2021 06:49:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DBE84613E1 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=bombadil.20210309; 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=AtqKex+14jTuqAx37cX2kfPkc+TsYz94gC0COrHL20U=; b=lQmbB/GZlEO43U BjAmG6ZQuD3UXTN+XhiivPbhC2SnMVd+d5Vx3qEQkMrOxm31ChCOXBkzOdZ/lCI554kV0/W8WZN77 oKC5+fuTxxQrtk17z3Jse5j2sbrVSXiE8Z6+Ong2gMdluP1HQ9qPWxwxpkJQKeqLg4EP8utc/pLYv Dmzdo1LptxkFekndTeW6jG4XphscYZPRJRqJqUHwWnqzGYQgaD+8rGs106jy5YHBBy2sbLTW+Pkl2 mYG0Yjc8FAbNDp0OWYSb6Qe04zgIG1y9Vj2UBIczYVUzBpd4Q3IRYqwwa9qD5vLFxGMVGGBqNl8ce FdzTa8QfHuYuD7QbfQXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1llnKS-00Bjq6-6d; Wed, 26 May 2021 06:47:44 +0000 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1llnKN-00BjoX-SF for linux-arm-kernel@lists.infradead.org; Wed, 26 May 2021 06:47:41 +0000 Received: by mail-pg1-x535.google.com with SMTP id j12so124557pgh.7 for ; Tue, 25 May 2021 23:47:38 -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=XsNgxO/9URdDc36QLPeG4TPHsESPk1GDbeGED8+8bHc=; b=gsncofzI8Gximb3VVlWi+mjNgouqxah0ppj8UoOiZIVGWxxO/7PWgj8shfhQOydrer 0sb+41pRGQdZvPKurnDVQPOkOnefM03pldJl9GXJUmKMpwRvAH5O3KVSiV//NJtjQsXO Z6W1nxuvclYtuCWmFhUzJhjewmu8uO2iH9WUBTQxZ4Q18NURcUeNqaJfTk9krKLtsbbu 4g4VxbyKaSw/RsMrRAWGgw7WJPNXXRGYDWqod9g6/P5LLSCN4AG9I9bI1pUvbTsZrWPO RSzAQYm8aArUnWo8OIPDRSz+VokNN+YnJOnLY4v2NBSW+C0VR5eSTH3mrQrVIZTZ9DVn NUww== 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=XsNgxO/9URdDc36QLPeG4TPHsESPk1GDbeGED8+8bHc=; b=Fv7HIvkiogR0xrDYp28OSJ4nyeeFcnspUzvMy35TLmGCBUI8ZwTyWQY/PlcBBhD63n RDxhya50TLvCC6kKxv6/yNitRpm+WjtdKLZSCg+rTgE2xmNrsjZmsYaE2ZrByeKuXGld Oy2MqXPNJHqBcpp2vhyRqGX8RFvYsKwh1iIT8BxcCO6b4LCE69C6ULVXW7jsEilAfFpQ o37q3beQDbLHDMAs3YOr3EZ5DzRrEWSXJU1HRGYrsvcQE4JHGEeBKDeqFQaff+dZwZzh 5QFeZsfsHJnJ/ANKhvTi0OneRAHaQ0BVjP/J3y0G/Cvt7XOlLqAZxUDPvAwUA92tk6ia aeHA== X-Gm-Message-State: AOAM532Q2vUMLa/1P6FrEtU0840/WJ4S2/VHlQw+cN3rLu/2nJEAq+Up WS72vjQZmM/1gqwqxr0+WTrlyFz0iw9xbgc9T3Dx7w== X-Google-Smtp-Source: ABdhPJy1Q78bnd/aPY/djWoF+7rebjFq4ZYvKnuBiDXvpXd+4cByEIjjAhf0qWjT790wlcl59C1GrqoVIJzHQaSozJ4= X-Received: by 2002:a63:e18:: with SMTP id d24mr15253084pgl.118.1622011657717; Tue, 25 May 2021 23:47:37 -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> <20210505152919.GA1766375@xps15> <20210518140040.GC942578@leoy-ThinkPad-X240s> In-Reply-To: <20210518140040.GC942578@leoy-ThinkPad-X240s> From: Denis Nikitin Date: Tue, 25 May 2021 23:47:25 -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-20210525_234739_958583_968CA6C4 X-CRM114-Status: GOOD ( 28.82 ) 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 Hi Leo, Sorry for the delayed reply. On Tue, May 18, 2021 at 7:00 AM Leo Yan wrote: > > Hi Denis, > > > Performance overhead is indeed higher than with ETR polling patch. > > Here are some numbers for comparison (measured on browser > > Speedometer2 benchmark): > > Runtime overhead of ETM tracing with ETR poll period 100ms is less than > > 0.5%. Snapshot mode gives 2.1%. > > With 10ms period I see 4.6% with ETR polling and 22% in snapshot mode. > > It's not expected that the snapshot mode causes so big overload. > In my head, two factors might cause the overload: > > - The perf interaction between the user space and kernel space; > - The data copying from the ETR's buffer to the AUX ring buffer. > > Check one thing: what's the buffer size for ETR polling mode and for > snapshot mode in your experiments? AUX buffer size was 64KB in both modes. I used small buffers to keep the overall perf.data size under 200-500MB with a long-running perf record (3-5 min). > > If I remember correctly, by default the snapshot mode uses 4MB for ETR > buffer, if copying 4MB per 10ms, then it's likely to cause big > overload. So at the first glance, the overhead difference might be > caused by the by the different buffer size between ETR poll mode and > snapshot mode. As I said, the buffer was small. But I can go ahead and check the difference with a bigger buffer. I will also double check how strobing affects runtime overhead. It should be lower. > > > We could probably utilize the ETM strobing feature and reduce frequency > > of data collection but I see a problem when I'm using both. > > Within a minute of profiling the ETM generates a reasonable profile size > > (with strobing autofdo,preset=9 with period 0x1000 it is up to 20MB). > > But then the size grows unproportionally. > > With a 4 minute run I got a 6.3GB profile. > > Just check, as Mathieu has suggested, have you applied the patch [1] > on your local code base for fixing the data copying for snapshot mode? That was my mistake. When I switched to the Strobing patch series I forgot to apply [1]. When applied I don't see this issue any more. It's not obvious from the description that the patch would fix my issue. So it sounds like your patch fixes multiple problems :) Thanks, Denis [...] > > Thanks, > Leo > > [1]. https://lists.linaro.org/pipermail/coresight/2021-April/006254.html _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel