Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp166025pxb; Wed, 3 Feb 2021 02:25:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdq5HeTYBmet9iDCB60pAQlYxC370OB/414QZZdPxhVE4ALMfgNRMlPZpEvSQ94Gv/sGYV X-Received: by 2002:a17:906:4c85:: with SMTP id q5mr2449481eju.375.1612347932129; Wed, 03 Feb 2021 02:25:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612347932; cv=none; d=google.com; s=arc-20160816; b=WaqhWua/6wBHiwAxnj8kk5ytkgI7maPaxDD6A3+mYwU542xBFalBp1OsDQaCd5pS9N 1WbkrO1slWXeRlBs4IuDtYK3Ox7j18VPu0F7lEGagc0B06Tb1QT5WBOdl1AdCC9YWeZ0 gs1kewZLYtKQQFCViQ/JrxlJoNGH7IZ+cMT2tynOfcH+i0e0tac7j5T7k117RUhrNXD5 NmTnvwAicCVaMVC6uyOrTn/rbu35tlVVzHPKFE75ShK0skloWh6ARklztK3K1hdJR9fh l9ClgFimCGuFYggt5rsOSzFDVtHEmgASw5EzgfZnbhocn95lM7ah6eewhyxMsOnlG6NX hQ8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=YVcGpKd8+eC2YQ5xYyo7fYllHOO2iPEn0qmRLD8c4tk=; b=hQJQkbConghazB0GScZMARGFPhlpcsjYgHxlzsvgVBnMC76VMP1Qdwu/9KvWG9qe3b p4KV3QNQ5w1Rkg46ULQwdRhvfOWGG6S20T/tz/wSBmvZCeatZ/PucBAVeSzoxzJf2ouH CsXYWsMBvpszIcYPuv2h9kcL/aYfr8JT6kjbib+Rq+3E9GtXbysY7TUc9QzxQSrhGBJz IKDU0I/3xOVk2cDHYPIrU+3SIlhBHpvY55mABUaTpkP/3Kf3XkZn0sNEU/JWhaCJwp2r vLOCswYWI/4ponqRts9iVSHHqaQOik93WA51LqQLkoFIHFhDnFPwk7dvYMe1SQ1IBsDF G2uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=XcTmJyWd; 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 s19si1041190ejz.396.2021.02.03.02.25.07; Wed, 03 Feb 2021 02:25:32 -0800 (PST) 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=@ffwll.ch header.s=google header.b=XcTmJyWd; 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 S233734AbhBCKY3 (ORCPT + 99 others); Wed, 3 Feb 2021 05:24:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233488AbhBCKYY (ORCPT ); Wed, 3 Feb 2021 05:24:24 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F984C0613D6 for ; Wed, 3 Feb 2021 02:23:44 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id f16so4895032wmq.5 for ; Wed, 03 Feb 2021 02:23:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=YVcGpKd8+eC2YQ5xYyo7fYllHOO2iPEn0qmRLD8c4tk=; b=XcTmJyWd74nvKmKqGb0lHYbm4BberuwObLIrEVZVDU5MFPGSgRvwBVl691DtsVL32v PoxSztsiW9kqnY7fWODTxJQ24Xut19EQmALlq/oOlmCC/lE28uXGaC0MT/lTB3vpqnHz OO6YtZ53iIHcnPn/3H7K8/Ji389pkKLCfJXYw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=YVcGpKd8+eC2YQ5xYyo7fYllHOO2iPEn0qmRLD8c4tk=; b=I6MQ6v6MrUlauVv/BFZ4lhV0Bzy2F/dLk4aHFQuD6exn84DeUWWD0/cX2SMqyaBLhC 3emArAlgtG44y2tGUrON1V5pD8iOWmy8XS0gjcLttQFMvaJ5hogjrrO6Ak1pt8nao5jI 9az7tL4l952r01thZu0ieNpEiLrHVQCGLj0qhFhP/uS3dy2qcAboGeYxxEWgV/qHNbBc ECHrLkkCyrDgeOwKAqtnkI7worYRvi7InDx3fh1JuoL4ieR/jtbYrthIFh6OnGqF3UjN 7sbbIIaU0Q8blcfBeZJ8RkpiY4u3Je3CLPxuaPmBbGtjnNRf+2MtUSYTqjRJ2yE9gH+1 1Mcw== X-Gm-Message-State: AOAM533LdwXEkDtQCaQ1z5IvLKwVO+IN7GpiCn3Dgz6xR6GHYl6YjjcE ImT6ZEFr7p7m6MMb172R8CH+IA== X-Received: by 2002:a7b:c3ca:: with SMTP id t10mr1325153wmj.138.1612347823070; Wed, 03 Feb 2021 02:23:43 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id b3sm2351907wme.32.2021.02.03.02.23.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Feb 2021 02:23:42 -0800 (PST) Date: Wed, 3 Feb 2021 11:23:39 +0100 From: Daniel Vetter To: Christian =?iso-8859-1?Q?K=F6nig?= Cc: Simon Ser , Pekka Paalanen , Michal Hocko , "open list:DOCUMENTATION" , Szabolcs Nagy , dri-devel@lists.freedesktop.org, Andrei Vagin , Kalesh Singh , Hui Su , Michel Lespinasse , Jonathan Corbet , Mauro Carvalho Chehab , Jeffrey Vander Stoep , Daniel Jordan , kernel-team , Alexey Dobriyan , Linux Media Mailing List , Kees Cook , Jann Horn , linaro-mm-sig@lists.linaro.org, linux-fsdevel , Bernd Edlinger , Suren Baghdasaryan , Alexey Gladkov , kernel list , Minchan Kim , Yafang Shao , "Eric W. Biederman" , Greg Kroah-Hartman , Hridya Valsaraju , Andrew Morton , Linux API Subject: Re: [PATCH] procfs/dmabuf: Add /proc//task//dmabuf_fds Message-ID: Mail-Followup-To: Christian =?iso-8859-1?Q?K=F6nig?= , Simon Ser , Pekka Paalanen , Michal Hocko , "open list:DOCUMENTATION" , Szabolcs Nagy , dri-devel@lists.freedesktop.org, Andrei Vagin , Kalesh Singh , Hui Su , Michel Lespinasse , Jonathan Corbet , Mauro Carvalho Chehab , Jeffrey Vander Stoep , Daniel Jordan , kernel-team , Alexey Dobriyan , Linux Media Mailing List , Kees Cook , Jann Horn , linaro-mm-sig@lists.linaro.org, linux-fsdevel , Bernd Edlinger , Suren Baghdasaryan , Alexey Gladkov , kernel list , Minchan Kim , Yafang Shao , "Eric W. Biederman" , Greg Kroah-Hartman , Hridya Valsaraju , Andrew Morton , Linux API References: <20210126225138.1823266-1-kaleshsingh@google.com> <20210128120130.50aa9a74@eldfell> <20210129161334.788b8fd0@eldfell> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: Linux phenom 5.7.0-1-amd64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 29, 2021 at 03:22:06PM +0100, Christian K?nig wrote: > Am 29.01.21 um 15:17 schrieb Simon Ser: > > On Friday, January 29th, 2021 at 3:13 PM, Pekka Paalanen wrote: > > > > > > Re-importing it adds quite a huge CPU overhead to both userspace as well > > > > as the kernel. > > > Perhaps, but so far it seems no-one has noticed the overhead, with Mesa > > > at least. > > > > > > I happily stand corrected. > > Note, all of this doesn't mean that compositors will stop keeping > > DMA-BUF FDs around. They may want to keep them open for other purposes > > like importing them into KMS or other EGL displays as needed. > > Correct and that's a perfectly valid use case. Just re-importing it on every > frame is something we should really try to avoid. > > At least with debugging enabled it's massive overhead and maybe even > performance penalty when we have to re-create device page tables all the > time. > > But thinking more about that it is possible that we short-cut this step as > long as the original import was still referenced. Otherwise we probably > would have noticed this much earlier. Yeah kernel keeps lots of caches around and just gives you back the previous buffer if it's still around. Still probably not the smartest idea. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch