Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2491500pxa; Mon, 3 Aug 2020 18:09:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHG3XMuReF7NaZ78D+gVFRJYDHDNX+qcmNn7Akp2THk9RtPDaIJm72cNeS01ULbqh1CJQg X-Received: by 2002:a50:a404:: with SMTP id u4mr17872388edb.222.1596503394224; Mon, 03 Aug 2020 18:09:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596503394; cv=none; d=google.com; s=arc-20160816; b=ekgu1yMITxu6y8uYJW57mBtlPMjr3MLpZoPian+SanEx7W/ZMhhI7u54PucdqO/dVh nH45815Yj+mYBJ9C/P07XEkpz6FiI3WrXF+yrsh8EVuBrnZAH6ma+IKHNQwKoTBerME/ uW8cGFViQHTbyQD33PZcJuYnjFvB/NEBoHB6IEN/n+bCfczKn+V22KCHK3lFlshlN3UK GtEzNzAOrGNQbSLS5iQvcpUbrxxlYspCdUvb4Ad3tS/jzgJPGfVJN5uXv+7BJvxRXZhz wzNKyYv82Q5XOafO0R17o3ALQlRIfT9ooKOcNSYGVpdnYh0v7+rTKhqV6h315dtrjZTZ 8uig== 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; bh=mZP6nN6BMogpBnx1+b4qcUvFTQjLzwuljIHoFSyt0Fg=; b=RDFs8hM+ghi//Rs6D0GKsMM1vHDdNZzNf01Asl77NVb+VySgwDzzl6kDwKqYYxGbHv 5l4zv3uQX9+kahMhUQR6VRHtw2E0s3fLnvZ42cXsEixZ4ogohz14ItQZMNtLgVRd4fDX VwgZyaDm9mbF8yOaMFbegmUos4QWU286sr73ov/BQorp98/rUigD57DdDqAfZHQOJ+lO Jo8Uepci4XQ8gzbAdLBZMmvOpFDu+3WocEmXlCwLS0UYOFQhn7iaI58N1/UjjjCuS2jj esvb7OCrIhRNrA+SpPlrlwKjTu3f6f+z7KQDTJEfK1ftbVthr1Y1PBWjfGfGAYCM5B7N 95Cw== ARC-Authentication-Results: i=1; mx.google.com; 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 b16si11302778eja.517.2020.08.03.18.09.31; Mon, 03 Aug 2020 18:09:54 -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; 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 S1728157AbgHDBJ1 (ORCPT + 99 others); Mon, 3 Aug 2020 21:09:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726276AbgHDBJ1 (ORCPT ); Mon, 3 Aug 2020 21:09:27 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37E2AC06174A; Mon, 3 Aug 2020 18:09:27 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2lS5-008ndS-Kd; Tue, 04 Aug 2020 01:09:13 +0000 Date: Tue, 4 Aug 2020 02:09:13 +0100 From: Al Viro To: Suren Baghdasaryan Cc: Matthew Wilcox , Kalesh Singh , Jonathan Corbet , Sumit Semwal , 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: <20200804010913.GA2096725@ZenIV.linux.org.uk> References: <20200803144719.3184138-1-kaleshsingh@google.com> <20200803144719.3184138-3-kaleshsingh@google.com> <20200803154125.GA23808@casper.infradead.org> <20200803161230.GB23808@casper.infradead.org> <20200803222831.GI1236603@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200803222831.GI1236603@ZenIV.linux.org.uk> 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 11:28:31PM +0100, Al Viro wrote: > IOW, what the hell is that horror for? You do realize, for example, that there's > such thing as dup(), right? And dup2() as well. And while we are at it, how > do you keep track of removals, considering the fact that you can stick a file > reference into SCM_RIGHTS datagram sent to yourself, close descriptors and an hour > later pick that datagram, suddenly getting descriptor back? > > Besides, "I have no descriptors left" != "I can't be currently sitting in the middle > of syscall on that sucker"; close() does *NOT* terminate ongoing operations. > > You are looking at the drastically wrong abstraction level. Please, describe what > it is that you are trying to achieve. _IF_ it's "who keeps a particularly long-lived sucker pinned", I would suggest fuser(1) run when you detect that kind of long-lived dmabuf. With events generated by their constructors and destructors, and detection of longevity done based on that. But that's only a semi-blind guess at the things you are trying to achieve; please, describe what it really is.