Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1744095ybm; Thu, 23 May 2019 06:11:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQQDuD7mHNZ1PptPMudhBNtvG+gyWqp7yHCFBAJuoHRcSVWktZ/UIbSfZvDjyEGql62IU2 X-Received: by 2002:a65:5c41:: with SMTP id v1mr22386979pgr.20.1558617079440; Thu, 23 May 2019 06:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558617079; cv=none; d=google.com; s=arc-20160816; b=xhWddhKBfsGQofHnwpLT3MZsWXFASUhZojBRK2O+PjIM6W2BVgqmvUf3n+O8vhhX/b O4PVTbRNDyoQn8rGZeoPtG+jRlvTVClRQEYJ/R6cWvE5+gj/+xa1tuzy/gUdwCFJKUdA oofDS85J/ewEuO4Es5lfxOJ9BqRzv/wwl5UUiYV04i4iDH4XzLlh4/8S1u+YRR+svSX6 EDie3JvXsxqS9CX9Fpy2aJCWTXjHdZtIra517iyNWej2HpNCBD2Bse7OeagH8Sf9/RNQ 5KlcaOAw7//cgk+CcvXBTSovADJ6qzY8LpSxCjZdweDB9HnFBq6UkeITHBmphnBPQ4oS 6kMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:mime-version:user-agent:date:message-id :cc:to:subject:from:dmarc-filter:dkim-signature:dkim-signature; bh=mQa7npGG4URXa1PhwEt3EgvdOeSjFpnDy5YlktE4o2U=; b=x+m9BBk+SKvnxTIcr4aVD7GMVohPfLnKa8WJ35hkjXeiUIC/UHeJbYHDxcvaRtIdQZ ujYMXa4bSh5UBTh1EyqrQ35P2Yo228EtcYekLkxujDVEi3M93o9QwHoxQXHWU35bs2Bo ARm12IOnmWIQQVVSCfVxN7VLu0oCFBVq78KurjPFDMFjsD1L5rXTKYAegOdpD8X+jDZ2 Z9QkvwdC26mPRUfJBjSYdAEt3Psi7bzcFzafRnG/DSDH+EGze8u/U8ZO76sA5MjoeMce 83YXdhkkGvCE9lzD0ph9Lyhu2SiEVwYt0Agj1pawLdAHBMPNiGDBZ/o0aVSvPVlcq9yO NP4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=NFUEa1xO; dkim=pass header.i=@codeaurora.org header.s=default header.b=iopALxqe; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f6si20593609pgh.580.2019.05.23.06.10.57; Thu, 23 May 2019 06:11:19 -0700 (PDT) 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=@codeaurora.org header.s=default header.b=NFUEa1xO; dkim=pass header.i=@codeaurora.org header.s=default header.b=iopALxqe; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730549AbfEWNJh (ORCPT + 99 others); Thu, 23 May 2019 09:09:37 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:43616 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726310AbfEWNJg (ORCPT ); Thu, 23 May 2019 09:09:36 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 53F4C6087A; Thu, 23 May 2019 13:09:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558616976; bh=wfXAsv/D6tc2pz76WMJTOlgUtKHJzRfaFaV69eXWLao=; h=From:Subject:To:Cc:Date:From; b=NFUEa1xOwYbpvtJfzWND+VGOOYp1tN57Zc4ZHjSuQAy1iJOnLx3GKtTGc0oUEClk4 A3aAJRZ4N4fw4VciptE5e8rGw8m8xwPZkNekzOVvhUrMuraqexA8QXK0VFeyq2O531 8aEOkVKbN6KBlEWaOeUjQrogrCcZpkWse6XjfCTo= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from [10.204.79.15] (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mojha@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4467260388; Thu, 23 May 2019 13:09:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558616975; bh=wfXAsv/D6tc2pz76WMJTOlgUtKHJzRfaFaV69eXWLao=; h=From:Subject:To:Cc:Date:From; b=iopALxqe4UjLh7YxbAj5A2jLZNrr7riwpgd9nw81qmTPOULMuNSxSMwNC+u2Imrcq 0EYcBwFoIfM8MKZgXBdE/GwKCVscxOfrdajjSnxiM8isL4qyIjsWxT38t7T/XwDX/b FIjOIWB03H2wCu9QRO4L3htvfNO5A8b5+bT4EaGU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4467260388 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mojha@codeaurora.org From: Mukesh Ojha Subject: Perf: Preserving the event across CPU hotunplug/plug and Creation of an event on offine CPU To: Peter Zijlstra Cc: lkml , Thomas Gleixner Message-ID: Date: Thu, 23 May 2019 18:39:23 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter/All, This is regarding the discussion happen in the past about https://lkml.org/lkml/2018/2/15/1324 Where the exact ask is to allow preserving and creation of events on a offline CPU, so that when the CPU comes online it will start counting. I had a look at your patch too and resolve crash during while trying to create an event on an offline cpu. In your patch,  you seem to disable event when cpu goes offline which is exactly deleting the event from the pmu and add when it comes online, it seems to  work. But, For the purpose of allowing the creation of event while CPU is offline is not able to count event while CPU coming online, for that i did some change, that did work. Also, I have query about the events which gets destroyed while CPU is offline and we need to remove them once cpu comes online right ? As Raghavendra also queried the same in the above thread. Don't we need  a list where we maintain the events which gets destroyed while CPU is dead ? and clean it  up when CPU comes online ? Thanks. Mukesh