Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp805815ima; Wed, 24 Oct 2018 09:26:58 -0700 (PDT) X-Google-Smtp-Source: AJdET5dwWkTtum/7AfnSIsQvYiSOSxkB0/YGrVuyw3x+6Yl9Dt3lnCmN713FPoRQT9KzlUBWjpcw X-Received: by 2002:a63:344e:: with SMTP id b75mr3075703pga.184.1540398418383; Wed, 24 Oct 2018 09:26:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540398418; cv=none; d=google.com; s=arc-20160816; b=tm7Z7jOzdVWojwqpDpkb8L3tA8KnzUCVPUQqGqC6ArP16T0eL8OsIz0OrvQbWD3SRb D6eHmIvEWhd0Jenqol7DoBjequ4SOKKfT8APaReSm8smWuCA8TLqG8vw5x0aYcmhJbnv VX/FR+Xt+zIFFGmJ+puteltqsIW5hCSCOEtyTfE//RI6yJMakddN0qiARokeaRm/XEN1 1jyEfBsb89kH/jvj8ZQ0ZPjuxxXfvybK0GdMOcHpoDGSWHWVPIs+2uarqfCxWyiV7beG N4br89B3dppWeeeSxDTxvCYeHIRLcZZXtkJa7nf+b6EGslZXYoDekomTYmwYpI6jmUYE hYFw== 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; bh=xf+Wo5LHnph7fA8cHlbdGd9ST6IWmNHSOYekrD+BX7E=; b=si3dTjYgkemTsN9XXs1U+Al5NaLuwend4+DMoOJLxMVU/xLaSsoWG5Rhz4vVngB1hG IesUGjpLtmkLtNiPacJ7Cs5AMhbDt52QtrhA9+qtq0A2d2QWtjMGegKzpfIXgD3QYUoS ILgsHGezBOFlXSrO6OAjP5k4TqtfP5SY5qv9feIq8p7EBIOg8ZbBifMoZYhR4rkcdu3O CzMfqgoQLS7y4OgTzSr2xHeYOmu5MHAXzw2XuQqHrRo5CKFA+k6EvoqI8xeV3A8ppInV HE5a/pXgdcK+Gujw7wa+sGqhGuwRMcS851DSCSxNa/fsf8/jZornCW4D0SLm2vxkvfMh OkKQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d12-v6si4672967pla.245.2018.10.24.09.26.42; Wed, 24 Oct 2018 09:26:58 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727033AbeJYAwS (ORCPT + 99 others); Wed, 24 Oct 2018 20:52:18 -0400 Received: from mga11.intel.com ([192.55.52.93]:37466 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726433AbeJYAwR (ORCPT ); Wed, 24 Oct 2018 20:52:17 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2018 09:23:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,421,1534834800"; d="scan'208";a="244017587" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.126]) by orsmga004.jf.intel.com with ESMTP; 24 Oct 2018 09:23:34 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id 8B24A30137B; Wed, 24 Oct 2018 09:23:34 -0700 (PDT) Date: Wed, 24 Oct 2018 09:23:34 -0700 From: Andi Kleen To: kan.liang@linux.intel.com Cc: peterz@infradead.org, tglx@linutronix.de, mingo@redhat.com, acme@kernel.org, linux-kernel@vger.kernel.org, bp@alien8.de, eranian@google.com Subject: Re: [PATCH 1/2] perf: Add munmap callback Message-ID: <20181024162334.GG6218@tassilo.jf.intel.com> References: <20181024151116.30935-1-kan.liang@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181024151116.30935-1-kan.liang@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +void perf_event_munmap(void) > +{ > + struct perf_cpu_context *cpuctx; > + unsigned long flags; > + struct pmu *pmu; > + > + local_irq_save(flags); > + list_for_each_entry(cpuctx, this_cpu_ptr(&sched_cb_list), sched_cb_entry) { Would be good have a fast path here that checks for the list being empty without disabling the interrupts. munmap can be somewhat hot. I think it's ok to make it slower with perf running, but we shouldn't impact it without perf. -Andi