Received: by 10.223.185.116 with SMTP id b49csp4802151wrg; Wed, 7 Mar 2018 00:58:41 -0800 (PST) X-Google-Smtp-Source: AG47ELuMcEYbVbCAuvbCmyreuOxWk2dli6oVmoTXNlu8xm20pSzvikbqNfS9tY4jJZS513ytGhpo X-Received: by 2002:a17:902:7717:: with SMTP id n23-v6mr19310048pll.388.1520413121610; Wed, 07 Mar 2018 00:58:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520413121; cv=none; d=google.com; s=arc-20160816; b=JN8OI0qu6vJZ5U3WFk3lfAcMGG6ca93Y9bjvdGoAb8fols8E3DxAo7D3G67UjBHZyL yauhyY62340CCjAQuasbC8BAmasJWbuiNKERH9Bv/zuI8/DvdlIC5I9QyIr7vZgpCePO My/FtyGzTjUyJZN0QlxvHdA9/Nbs8ejv0lOLAXV51aiYDj/RjMbE/Fjp6wxyMjqN5oVB fPx/WL/PuHa5WsDBR75bK2PLb9qOI2FuoBCntVePP+c9iMv/ElIGOwDBNqCePICYhgT5 jH+4KopCj0/BGV2KtgN9DXmqMMg56DOln5oV6JljMmU1KNu+MpAtjpi/u9qkguWmephS aEjg== 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:arc-authentication-results; bh=uO2ABjyqd3UkZbOa2A2YKgS4xeOzHJ+r+b5EQLVBtDM=; b=kVi12Q9U9EFV+sQhItPmaqfxOuciSlJFXzbrFQ+5BQwGaMt6cBdB/4/HW2gVC2bR9P hi14ziZHhqM7KuyO9UQKtwIYC4tHratHG6Y6F40L/Z6ywF7ZwQW+eK5BaH/Nd6zDPS3P 36eGz03pIlHtpNqdbV5Wspf8S5kZNlKy6KnnCexiadSoYl6RyjvrTcmlVH8Xf5WxA+me LD6XaDq9WjBjfJugo+whhlrdq4qFt4uNzjNJPLf52Zh27bmFoC6L0YhBZxLI10FLemDT 7u8GtPZsbzfrs/kWDHy+EPm5Leeus3QbK5ISxzTRT5JhdbskF62oc68T553KTIX/8r5G qD6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=npMg1DXz; 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 y1si11027902pgv.234.2018.03.07.00.58.27; Wed, 07 Mar 2018 00:58:41 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=npMg1DXz; 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 S1754070AbeCGI5Q (ORCPT + 99 others); Wed, 7 Mar 2018 03:57:16 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:38270 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751110AbeCGI5P (ORCPT ); Wed, 7 Mar 2018 03:57:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=uO2ABjyqd3UkZbOa2A2YKgS4xeOzHJ+r+b5EQLVBtDM=; b=npMg1DXz9YEXJjgycRQzXqVu2 i2rZunA+FkwTm/2n0j3j8S18QeK/gMiZPGsTt2s5Ublzs21b+2t5fVFX9qBUlefKQtnJWNcvhvAwY 5qsNMVo7I1LznUhBy3nkIwPzay8wgsQpuMyGvaNH41cl4/cES8p6MqCcRphJ/0g82Od1CCpCZdLkF CWnFQZNzaYqhD5MQLpwzkEWcv8LesszDsms2wqmHwmiXVEWZZO1fwScEKW8GIkycXnlTEaj/ndBwI FwulpFXU161YgjAVarY75/nIWrhscbbNEAISG44m8Hvam34qZqw1Vn9BPXit8TkaxI34u8YgifdCv EXQTYpeuQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1etUsm-0004K8-RE; Wed, 07 Mar 2018 08:57:09 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id BDF5C2029FA14; Wed, 7 Mar 2018 09:57:05 +0100 (CET) Date: Wed, 7 Mar 2018 09:57:05 +0100 From: Peter Zijlstra To: Ravi Bangoria Cc: mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, linux-kernel@vger.kernel.org, rostedt@goodmis.org, mhiramat@kernel.org, ananth@linux.vnet.ibm.com, naveen.n.rao@linux.vnet.ibm.com, srikar@linux.vnet.ibm.com, oleg@redhat.com Subject: Re: [RFC 3/4] trace_uprobe: Support SDT markers having semaphore Message-ID: <20180307085705.GL25181@hirez.programming.kicks-ass.net> References: <20180228075345.674-1-ravi.bangoria@linux.vnet.ibm.com> <20180228075345.674-4-ravi.bangoria@linux.vnet.ibm.com> <20180306115921.GD25201@hirez.programming.kicks-ass.net> <3a0f9efd-158e-08ba-ae01-38391f580133@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3a0f9efd-158e-08ba-ae01-38391f580133@linux.vnet.ibm.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 07, 2018 at 02:16:13PM +0530, Ravi Bangoria wrote: > > W.T.H. is that called a semaphore? afaict its just a usage-counter. > > I totally agree with you. But it's not me who named it semaphore :) > > Please refer to "Semaphore Handling" section at: > https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation > > We can surly name it differently in the kernel code and document it > properly in the Documents/tracing/ Yes, just because the SDT people failed their CS101 class doesn't mean we need to perpetuate that failure. Please name it sensibly in our code. > > Also, would it not be much better to do userspace jump-labels for this? > > That completely avoids the dynamic branch at the SDT site. > > > > Userspace jump-label is a good idea but... > > Semaphore logic has already became a kinda ABI now. Tools like bcc, > gdb, systemtap etc. flip the semaphore while probing the marker. *groan*.. maybe suggest it for the next version; it appears we're already at SDTv3, so surely there will be a v4 too.