Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2173612pxa; Mon, 3 Aug 2020 09:13:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZQMXJ5f6Id4a6FKe6Uf0E0MNmmlurEtp3jLCyaU6RxdiDBGSdw34Uyci8DAs82vfuzxI9 X-Received: by 2002:a17:906:d930:: with SMTP id rn16mr17949552ejb.330.1596471208963; Mon, 03 Aug 2020 09:13:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596471208; cv=none; d=google.com; s=arc-20160816; b=S8Nn30OrBQWGA79t/s0zRyFVfMzVFoRo5EbJY1ivp/EaeDaEUjiHo3Eo1mYBemOhPQ kd3//LYMqV9Nvs/klb9Y0cpFO9baAwtMM8eHylizN+zV79ZAFByuJZxvOnrOwpMC48Lm kjBNL5CDZw9vgDdJDv9fmhlPkHLtmTltQRCjemR8DBpbj356SV42sfUWEXY98khSfs7h OcJckZaserAlQoihkKFxeOnX4C+Ypcs28IV3CUu5TeD7wPPn+Do2WUepVFT0VMEGXTD/ clY8Mypa9aFGl0QBb7Xtm7vgd3uw40EOPlQe0xfwKghO6ugMGfcfMk4KcA33cFLjk0FN Uxnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Jjt0E9vK/ahlYCJCf6JgaQ1Z9HcAiypA/MZQmN7aHDI=; b=wScxLvbW3wvEv1RHyppRQ9CtTrtJYSHsn1N6TgZh19zwt4Fr4jQ5nYHjJqcOZedHP5 /h+l04y3XdTULxxLquj0xuFmOksur6zB0k6UT2nuN0Rnyb/Cyt7tKWYu4hZ+KSv0L+ZP CJS8YKUz+piXmZa4GTmIiN9rdEkpw85udq4U+XnBsONAqEkrMm25Rw33k/iVQxEsJ1Ew evlByfm2GleJR3QWRzvizGnbF6FE+EC1kh63cPkM99+JprI6OKNjnHpOgQb/aYeJ1wG2 7nhxWQlNMpHneeSxBZIhKLq6JEpmMgU9CpkZs5TzTNwja07gaS1zubnW/iaKkXNcjjro Zj8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=v9sEOjX0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ci15si10319754ejb.107.2020.08.03.09.13.06; Mon, 03 Aug 2020 09:13:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=v9sEOjX0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728380AbgHCQMl (ORCPT + 99 others); Mon, 3 Aug 2020 12:12:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725945AbgHCQMj (ORCPT ); Mon, 3 Aug 2020 12:12:39 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FB5EC06174A; Mon, 3 Aug 2020 09:12:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=Jjt0E9vK/ahlYCJCf6JgaQ1Z9HcAiypA/MZQmN7aHDI=; b=v9sEOjX05M53TG5F7vsJHkJRxP SUTLinHGW8UeImHcg5h5r26zVeM83lGqIf30Yy9SeON0G5OGgCTBOdtMQx8O0FmjKiLsgtkb6e4TW P/wXIMlPMyR86sWjfVd6waN4/ik7a+SFeewP54KG25p1OgId9RVIQG3PcPP9KxdOI5qLXOUworZDQ 3L/fKCnhvTCxtAfV0Ya2HVHZuvGzke8HG/pf3tvNI0t944RaJoAjFGoyZd87WT7Ls8WC6RzSi59po Yk7XpxFG9iqhxpw3XSW9HuLbSoxqgTlM3u0WQAZYbLjSO6N6GM/jOYdW7lDMAGNZd/RXMic9r8m8s EP0V+iyw==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2d4g-0002EU-MF; Mon, 03 Aug 2020 16:12:30 +0000 Date: Mon, 3 Aug 2020 17:12:30 +0100 From: Matthew Wilcox To: Suren Baghdasaryan Cc: Kalesh Singh , Jonathan Corbet , Sumit Semwal , Alexander Viro , Steven Rostedt , Ingo Molnar , linux-doc@vger.kernel.org, LKML , linux-media@vger.kernel.org, DRI mailing list , linaro-mm-sig@lists.linaro.org, linux-fsdevel@vger.kernel.org, Hridya Valsaraju , Ioannis Ilkos , John Stultz , kernel-team Subject: Re: [PATCH 2/2] dmabuf/tracing: Add dma-buf trace events Message-ID: <20200803161230.GB23808@casper.infradead.org> References: <20200803144719.3184138-1-kaleshsingh@google.com> <20200803144719.3184138-3-kaleshsingh@google.com> <20200803154125.GA23808@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 03, 2020 at 09:00:00AM -0700, Suren Baghdasaryan wrote: > On Mon, Aug 3, 2020 at 8:41 AM Matthew Wilcox wrote: > > > > On Mon, Aug 03, 2020 at 02:47:19PM +0000, Kalesh Singh wrote: > > > +static void dma_buf_fd_install(int fd, struct file *filp) > > > +{ > > > + trace_dma_buf_fd_ref_inc(current, filp); > > > +} > > > > You're adding a new file_operation in order to just add a new tracepoint? > > NACK. > > Hi Matthew, > The plan is to attach a BPF to this tracepoint in order to track > dma-buf users. If you feel this is an overkill, what would you suggest > as an alternative? I'm sure BPF can attach to fd_install and filter on file->f_ops belonging to dma_buf, for example.