From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752819AbdKHPv2 (ORCPT ); Wed, 8 Nov 2017 10:51:28 -0500 Received: from mail-ot0-f179.google.com ([74.125.82.179]:47054 "EHLO mail-ot0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752728AbdKHPvL (ORCPT ); Wed, 8 Nov 2017 10:51:11 -0500 X-Google-Smtp-Source: AGs4zMY8CKO+wgOwySZ+GQKbGdpC4iMhvuPudjekjvIbzTiLUC7DBJ00Zq8EKfAu+IKJGmq6o3Ndcf050JuJbj0uLV0= MIME-Version: 1.0 In-Reply-To: <20171108151218.GA11018@krava> References: <20171106092305.GA16382@krava> <20171108141522.GA6320@krava> <20171108151218.GA11018@krava> From: Milind Chabbi Date: Wed, 8 Nov 2017 07:51:10 -0800 X-Google-Sender-Auth: e0J9lovCnfL0dC7ccrvXihnNEK8 Message-ID: Subject: Re: [PATCH] perf/core: fast breakpoint modification via _IOC_MODIFY_BREAKPOINT To: Jiri Olsa Cc: Milind Chabbi , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Namhyung Kim , linux-kernel@vger.kernel.org, Michael Kerrisk-manpages , linux-man@vger.kernel.org, Michael Ellerman , Andi Kleen , Kan Liang , Hari Bathini , Sukadev Bhattiprolu , Jin Yao Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 8, 2017 at 7:12 AM, Jiri Olsa wrote: > > I am not able to fully understand your concern. > > Can you point to a code file and line related to your observation? > > The patch is modeled after the existing modify_user_hw_breakpoint() function > > present in events/hw_breakpoint.c; don't you see this problem in that code? > > the reserve_bp_slot/release_bp_slot functions manage > counts for current breakpoints based on its type > > those counts are cumulated in here: > static DEFINE_PER_CPU(struct bp_cpuinfo, bp_cpuinfo[TYPE_MAX]); > > you allow to change the breakpoint type, so I'd expect > to see some code that release slot count for old type > and take new one (if it's available) > > jirka Why is this not a concern for modify_user_hw_breakpoint() function?