Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1136064imj; Thu, 14 Feb 2019 01:44:04 -0800 (PST) X-Google-Smtp-Source: AHgI3IbwvL1CPu8HYP0JFpb/FaQecSyPDla7QUeKpwmEAaf18/ZYcPJcNCF4L2dau2mXXXpOAkWm X-Received: by 2002:a63:235f:: with SMTP id u31mr2921668pgm.122.1550137444233; Thu, 14 Feb 2019 01:44:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550137444; cv=none; d=google.com; s=arc-20160816; b=VLVuFiIAb+XgqTDcgscaqDANipkTZ6iPtkp4bgGJdRNZh7Uw0lJQt7vVUVJsjwVxqP 5mFBVppozXxXGYbsFrzBWaSfOK3w8Zt8RYgOkhkyXnRIq0YFKXjWu9UQ/PxL5L+h3KFL 5WMKIocmEXy4E5JqT75sSM3CUOwwWQaS5s6KPUD9tdOXHRlhv4ofykPQbGoJ/aI3CmAD MamSAZgT78hmKZEiPY7OT+j8+A4UW2m4jYnoRvk0PZodYfQ6A/kFpdX01GAjUB6wKlWP hQboK2butMr75EzLymz0SFwEV6H3EMHxdLjhkMuPFEcMiKHaF18ldLv6wlnIUMEtUiTB tZOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ZPIj4EbTVOz6N/Q3YiGw9SLQBQnUYSsyTYltaROd0Ao=; b=vEGYVXYflc12+adTx3tre7yO1FVJVriwY2YCV0tj89vPJGcEcsDRFKZfX2p3kRCsoi ZCeM6ldWFzfwlffr5jiapJmor7SaDt1RcIzHlMMoarGd2v5nt6dXVNTtP44WtBFZo+8o 3nHrdvwQKWDQK7LThRULqNPcf4bO8IGT2VdVosAbj+R0Fje6G2/6/Sf+9mEZXMTvmVof X9UeBBMLd+EDwMjxWo/q8rIWae8C4iKVrXL7tz72QWT3ky5q3Ukyz8+zuNxuMn6IoU+O N6xCVevZevSY/mZOwmYuyecGsY64OI7XSf/y4nK8HoVhBv4VY5dIlTijb1LeJ84cDRX3 PJQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hGuDUh3J; 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 i30si1919021pgm.76.2019.02.14.01.43.47; Thu, 14 Feb 2019 01:44:04 -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=hGuDUh3J; 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 S2390822AbfBMXif (ORCPT + 99 others); Wed, 13 Feb 2019 18:38:35 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:36870 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728875AbfBMXie (ORCPT ); Wed, 13 Feb 2019 18:38:34 -0500 Received: by mail-pl1-f195.google.com with SMTP id b5so2009653plr.4 for ; Wed, 13 Feb 2019 15:38:34 -0800 (PST) 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:user-agent; bh=ZPIj4EbTVOz6N/Q3YiGw9SLQBQnUYSsyTYltaROd0Ao=; b=hGuDUh3JCW2v5hchNn5o0XSDnt1ylStAkY9CzQXtGk/7CGLqpAKlYAXvF2apzUWoWj lyVHA/Nljh/KOhEIirh4umYJduo72d3t5x1FRIpdjnIN2Cgg9ySeEqmk6wCnYmUmTBlE /YL2bkQ+TKFq/ahQJp8GAo+hTbVi/0Rg4OStjuw7zxNqc8GTuPve5td3dolkdlzYWn9F +LFrqiCb0OMvMGwYHRG1LT957m1OvRagGvoOCuzg0ldkmn5DA8PksxKfc+E7qpYF7fU+ XuJoH7UwdDY30zJ7p/UX9n/nWDxgtgEkN5ClQ4RIuKNYvAn5JmrZb4pREAK97Pm+A6Kr sckg== 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:user-agent; bh=ZPIj4EbTVOz6N/Q3YiGw9SLQBQnUYSsyTYltaROd0Ao=; b=E0u5GFBLpThkEJOJa0K9RCwpMRRSnEl3O32cXPxK5xBgechtrWFKEnVMG2ct9YIQtu 1TLFkDZbseX7IMynv7wlChdBZLEuHYf5XMyqLq2iLO/HM5tdBg6Jb1pCW3LKFXSpQyry oApZmgKfJQr7kfRC/rVaF+vx75+agQSRTWGKzjgffJ3wMlI6xpoMbd7PUrIhKfjeGXWM qCNVV9al88warnDy0iBoqXD4Wu9KfXE772qYBrUWb2sBG9uP4+KjKfQnc1fxvzUJ93+L BSsOo+PrWhm5owmfq9mCirVP/9mZemj1cS0isW0eWhjWxHW76NhOVutDNl8NkTs6iLpO VoNQ== X-Gm-Message-State: AHQUAuZpl38e1jOlJu1l4NVEEIA4BORFbM/Gbw/V53ZZgurnftNGaL/M TLNy9bClM5qBe6CNdRe9CpDwCg== X-Received: by 2002:a17:902:8d8d:: with SMTP id v13mr792927plo.121.1550101113885; Wed, 13 Feb 2019 15:38:33 -0800 (PST) Received: from leoy-ThinkPad-X240s (li221-181.members.linode.com. [173.255.211.181]) by smtp.gmail.com with ESMTPSA id l22sm530646pfj.179.2019.02.13.15.38.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Feb 2019 15:38:32 -0800 (PST) Date: Thu, 14 Feb 2019 07:38:27 +0800 From: Leo Yan To: Mathieu Poirier Cc: Mark Rutland , Peter Zijlstra , julien.thierry@arm.com, Alexander Shishkin , Ingo Molnar , Coresight ML , Linux Kernel Mailing List Subject: Re: [v5.0-rc6 regression] "perf/core: Don't WARN() for impossible ring-buffer sizes" Message-ID: <20190213233827.GA9483@leoy-ThinkPad-X240s> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mathieu, Mark, On Wed, Feb 13, 2019 at 02:26:25PM -0700, Mathieu Poirier wrote: > Hi Mark, > > CoreSight trace collection is broken on v5.0-rc6 due to this commit: > > 9dff0aa95a32 perf/core: Don't WARN() for impossible ring-buffer sizes > > Before: > root@juno:/home/linaro# perf record -e cs_etm/@20070000.etr/u > --per-thread uname > [ perf record: Woken up 1 times to write data ] > [ perf record: Captured and wrote 0.036 MB perf.data ] > root@juno:/home/linaro# > > After: > root@juno:/home/linaro# perf record -e cs_etm/@20070000.etr/u > --per-thread uname > failed to mmap with 12 (Cannot allocate memory) > root@juno:/home/linaro# > > The problem is related to the order_base_2() [1] test with a size of > 1264, stemming from nr_pages equal to 128. The combination yields an > order of 11, something leading directly to the error path. > > The results are the same with linux-next 20190213. This was tested on > a Juno R0 and R1 with a 4K page configuration. I haven't tried but > I'm pretty sure it breaks IntelPT as well. I noticed in another thread [1] Peter gave out the fixing for this issue; applied this fixing on my local code and it fixes CoreSight tracing issue. Thanks, Leo Yan [1] https://lkml.org/lkml/2019/2/12/452