Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2181573pxa; Mon, 3 Aug 2020 09:23:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMHm9aS4ttRQ5H6RerKa0i7BEL2N5D6AFCzK3eYLctxkF9M7HNMwUgVYL1NOSBBtJZ05o1 X-Received: by 2002:a17:906:82d5:: with SMTP id a21mr17095896ejy.213.1596471825366; Mon, 03 Aug 2020 09:23:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596471825; cv=none; d=google.com; s=arc-20160816; b=aZB+znBCeqcxe9eDWKaumI/p/nbrmCJFi5bCavfbVE3a+i9Z3Hjg17OZ2kZ0e3eROM e4YuN1Wa8BiL1Fx5EVaSO5uhptMfas2t1Qsx6zHT0Q98iGQ74ICA30+NvGL6Bk8bKUsp jxx5UwILorDrW6oF4bBasDIiK/nHZrKK/q7HzGQtW5FMBc4Wv3H2LP4ggxXtEcmFjpTn p3Kk6qBTIaEnCfWp8gz3isMMHsR++91jDrZ9qJ3mo7MvSsh01eCyUL3+KiaKLYXBXlOr yEySTWQVi6XnoM9Q7Tos+HPZopVc9G1hQ3WAs2AzsqCtIX2i+Cjp3wcXh91129M56G4r qqhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=DuAzZZbtTCD/FunpRik00QhyAGnIAetc0b9NRlFShwk=; b=P+IZwThDPVaIUDjknIZPzf6kwHHDw22RwEMi28x3wXuvX91yD7vsfZDEJgqpWLlqd0 s5512D/ajll2m0I1mM90sBbFE3b5e0p9a5Po5xHDP7GSPtcbrBDo+Y64ljb0DIkykSPR mBwiB0jQ/Si4znfMYdgsvPhrsJd5SaZnNFSZpyKBWK3hjgLwrF9I8KcDGhRddUjjvH2G Rw0ABC1DC+mVlMQD3RgLLd2uMsDHao7K48FXYn2UyNhcIdEPHzfdQh3VR3X/vli2ecfS OuSQzxjLHG1aiVyRtoE4RRgKyuabiy1L80tkKmGjlcT0hONUqKH2rQ6w3AfLqNDzvVTg V3bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=X2X2zOxV; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q22si10081658ejn.410.2020.08.03.09.23.22; Mon, 03 Aug 2020 09:23:45 -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=pass header.i=@google.com header.s=20161025 header.b=X2X2zOxV; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727947AbgHCQXI (ORCPT + 99 others); Mon, 3 Aug 2020 12:23:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726239AbgHCQXG (ORCPT ); Mon, 3 Aug 2020 12:23:06 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC5E0C06174A for ; Mon, 3 Aug 2020 09:23:05 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id o1so20972545plk.1 for ; Mon, 03 Aug 2020 09:23:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DuAzZZbtTCD/FunpRik00QhyAGnIAetc0b9NRlFShwk=; b=X2X2zOxVAHLGT14KTEzVrxN+YVOkB2JZ0AWCYwVkpNrjN6xpv7uJnHGDexGy1sYLXG u/2rrBX3dMh04chIdQxxkJZchGHaLBKxcZhngBPpI1VFasSgC4v1CV7ao/cPQ61yQjy5 ei0pqTZOsbFHSlEAAvLyJh1RUzkIfIjxAaqWt3bX0QCKKb22uShKmM1/tC5A0sQV9bLo QHCzx1vKs8h0kr/EDTHq8Cf9LqsmD8iZjyzKETpTtAK5K04DbnFqrnx1to7mISTevhDg GejktA8vH2oS1es01S5SLWtAQx5+3/6aT9BW6iASea+uli0QssQRtAcK331OucnyZJcl +Qsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DuAzZZbtTCD/FunpRik00QhyAGnIAetc0b9NRlFShwk=; b=gaJo18NWiWCn8jQ7gvq8squCutF+cjamhBv80JJ9iLYZXlnvsnSKkCLSo7bRA/HBEf oH8hB/6OqI5IDxv91wbJUEmLStKFgwzsUKLYVOi4ff7RqcUBsQWWqNF4cGEJsG5wHRkn ZERiMDhFrgu4Y3PAsD9XeZTqNY+wBrKFB0KYSUpAByOyTKfDZrjoR//SiqYTfJwgaKMD S4QVkwjO6MxuAFaFkkCMBVFh+Oecbd0dfdKgyWuI3Wy6Ogg3G3R/NS1ljrkj/Y2sm7Du gNPYml5vqjhEJU1Ak42bD3uWgJAl6Vt0yzcyd3nBZ6+QPI1waJ24a4TPJO5do8TcgVpJ OTqw== X-Gm-Message-State: AOAM5337RwX5tElXF1FulEfIMlu8raFfaRfsRvebCd5wPWV/IoSrOubp Y/dAnvC/+aAsuMv8SmXA6jjn3+vguZsgyaNySt21FIkGlmo= X-Received: by 2002:a67:6441:: with SMTP id y62mr12434936vsb.82.1596471784607; Mon, 03 Aug 2020 09:23:04 -0700 (PDT) MIME-Version: 1.0 References: <20200803144719.3184138-1-kaleshsingh@google.com> <20200803144719.3184138-3-kaleshsingh@google.com> <20200803154125.GA23808@casper.infradead.org> <20200803161230.GB23808@casper.infradead.org> In-Reply-To: <20200803161230.GB23808@casper.infradead.org> From: Suren Baghdasaryan Date: Mon, 3 Aug 2020 09:22:53 -0700 Message-ID: Subject: Re: [PATCH 2/2] dmabuf/tracing: Add dma-buf trace events To: Matthew Wilcox 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 3, 2020 at 9:12 AM Matthew Wilcox wrote: > > 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. Sounds like a workable solution. Will explore that direction. Thanks Matthew!