Received: by 10.213.65.68 with SMTP id h4csp1528322imn; Mon, 19 Mar 2018 06:42:30 -0700 (PDT) X-Google-Smtp-Source: AG47ELuxGPb+1TLkf5/8GpOyBpB9RWFZnZKbIMbTQletcfemIImdu67Q4zpX6Y3u6kyzcDXFPmDR X-Received: by 2002:a17:902:161:: with SMTP id 88-v6mr12426471plb.212.1521466950691; Mon, 19 Mar 2018 06:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521466950; cv=none; d=google.com; s=arc-20160816; b=CiRGb7fDpVwzTUswWLxR6S3zWaJUgOr5kbkwz+5LZzy26Ozcyi5gWWlPeo2EZ2irjB ajhcAQEA23dY7No4/h7vUOUHLoAf3+lkJBQB1oy5eghRok+xuKbfr4PH0E0IB6zk7rxd EwIkaS7bYtH3Rb68bCcy19bdcSqVFGEA6WTaZWAzZZGpPMCrCjg/iaQT3X2yq4zFTchL GJMNAv9W0VKeC3dWLjGUvdsisSCgtOxEjpwMvX/7pE7Jnnc4B1XDpK2RbCaBYRAFmqAf i8KCMpQ+/nh/9SzPpOKstpwAN4TvNDD9SPU5wRd1u5iJuV5VBdJyE0lfZ1ltAUbVxbFv Cs6g== 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:arc-authentication-results; bh=wryYs1ra+RvF7T1IeuVppV7o0Yap3iQnXlFiwMwM4lc=; b=VYtXRuoJNd4m/8eTM1BNJ3CHIl2tcIj4jt/iqElTNmt1aH1lOEhAF65Sy88/hCJfol gMkYXqO+XhO86X5Qa0G5AecUHEh6YZ4OuYBbbcBHUTHoZu8Qllsv05iAO5Kdb9ZEZH9d I2nSgxzpTQQTgUTtLfFOPQGfykVoNH1QNdTaqEVogaLT9grxSogB9u8atbs5iMy1tirp sWBtCfVNA+QtE7B2af5SOSN8ncIGgzO1BQcVtuICU03dtTlwKKyxT5mt06lWRF0Ccb1c LrzhzQB5TRNkVqTLcvkiaU3aha99K6QG0e7zHSFFY7xW2rxg/rOiYQFy6ioK7YZGkl02 UvWg== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r191si12795pfr.65.2018.03.19.06.42.15; Mon, 19 Mar 2018 06:42:30 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932831AbeCSNlC (ORCPT + 99 others); Mon, 19 Mar 2018 09:41:02 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:44268 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932793AbeCSNk6 (ORCPT ); Mon, 19 Mar 2018 09:40:58 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D0AE04068034; Mon, 19 Mar 2018 13:40:57 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.34.27.30]) by smtp.corp.redhat.com (Postfix) with SMTP id E78A5AB3F2; Mon, 19 Mar 2018 13:40:51 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Mon, 19 Mar 2018 14:40:57 +0100 (CET) Date: Mon, 19 Mar 2018 14:40:51 +0100 From: Oleg Nesterov To: Ravi Bangoria Cc: mhiramat@kernel.org, peterz@infradead.org, srikar@linux.vnet.ibm.com, acme@kernel.org, ananth@linux.vnet.ibm.com, akpm@linux-foundation.org, alexander.shishkin@linux.intel.com, alexis.berlemont@gmail.com, corbet@lwn.net, dan.j.williams@intel.com, gregkh@linuxfoundation.org, huawei.libin@huawei.com, hughd@google.com, jack@suse.cz, jglisse@redhat.com, jolsa@redhat.com, kan.liang@intel.com, kirill.shutemov@linux.intel.com, kjlx@templeofstupid.com, kstewart@linuxfoundation.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mhocko@suse.com, milian.wolff@kdab.com, mingo@redhat.com, namhyung@kernel.org, naveen.n.rao@linux.vnet.ibm.com, pc@us.ibm.com, pombredanne@nexb.com, rostedt@goodmis.org, tglx@linutronix.de, tmricht@linux.vnet.ibm.com, willy@infradead.org, yao.jin@linux.intel.com, fengguang.wu@intel.com Subject: Re: [PATCH 6/8] trace_uprobe/sdt: Fix multiple update of same reference counter Message-ID: <20180319134050.GA12554@redhat.com> References: <20180313125603.19819-1-ravi.bangoria@linux.vnet.ibm.com> <20180313125603.19819-7-ravi.bangoria@linux.vnet.ibm.com> <20180315144959.GB19643@redhat.com> <20180316175030.GA28770@redhat.com> <4b337afd-fc5e-6110-888b-d4fa36a797ee@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4b337afd-fc5e-6110-888b-d4fa36a797ee@linux.vnet.ibm.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 19 Mar 2018 13:40:58 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 19 Mar 2018 13:40:58 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'oleg@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ravi, On 03/19, Ravi Bangoria wrote: > > On 03/16/2018 11:20 PM, Oleg Nesterov wrote: > > > > And it seems that you are trying to confuse yourself, not only me ;) Just > > suppose that an application does mmap+munmap in a loop and the mapped region > > contains uprobe but not the counter. > > this is fine because ... Yes, I guess I tried to say "counter but not uprobe" but possibly I was actually confused. > Our initial design was to increment counter in install_breakpoint() but > uprobed instruction gets patched in a very early stage of binary loading > and vma that holds the counter may not be mapped yet. Yes, yes, I understand this is not that simple... > > Btw, why do we need a counter, not a boolean? Who else can modify it? > > Or different uprobes can share the same counter? > > Yes, multiple SDT markers can share the counter. OK, thanks. Oleg.