From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756371AbbLQO10 (ORCPT ); Thu, 17 Dec 2015 09:27:26 -0500 Received: from mga14.intel.com ([192.55.52.115]:49133 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753148AbbLQO1Z (ORCPT ); Thu, 17 Dec 2015 09:27:25 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,441,1444719600"; d="scan'208";a="843268123" From: Alexander Shishkin To: Peter Zijlstra Cc: Ingo Molnar , linux-kernel@vger.kernel.org, vince@deater.net, eranian@google.com, johannes@sipsolutions.net, Arnaldo Carvalho de Melo Subject: Re: [PATCH 2/7] perf: Generalize task_function_call()ers In-Reply-To: <20151217134034.GM6373@twins.programming.kicks-ass.net> References: <1449138762-15194-1-git-send-email-alexander.shishkin@linux.intel.com> <1449138762-15194-3-git-send-email-alexander.shishkin@linux.intel.com> <20151203173431.GC3816@twins.programming.kicks-ass.net> <87vb88yjs6.fsf@ashishki-desk.ger.corp.intel.com> <20151208165700.GE6357@twins.programming.kicks-ass.net> <20151217134034.GM6373@twins.programming.kicks-ass.net> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Thu, 17 Dec 2015 16:25:14 +0200 Message-ID: <87k2odb19x.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Peter Zijlstra writes: > On Tue, Dec 08, 2015 at 05:57:00PM +0100, Peter Zijlstra wrote: >> On Tue, Dec 08, 2015 at 06:42:01PM +0200, Alexander Shishkin wrote: >> > > +void ___perf_event_disable(void *info) >> > >> > Only maybe change these to __perf_event_disable_locked() or something >> > visually distinctive from the 'active' callback? >> >> Yeah, I ran out of naming-foo and punted. I'll give it another go >> tomorrow. > > How about something like so? > > Its a bit 'weird' but they're already long function names and adding > things like _locked to it makes them really rather unwieldy. That aside, why I brought it up in the first place is because the two functions are asymmetric: one is called with irqs disabled and the other -- with ctx::lock held (and not because I'm into bikeshedding or anything like that). Looking at the pair of them sets off my "that's not right" trigger and sends me to the event_function_call() implementation. So in that sense, prepending an extra underscore kind of made sense. Maybe __perf_remove_from_context_{on,off}()? Regards, -- Alex