All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: "Daniel Vetter" <daniel@ffwll.ch>,
	"Christian König" <christian.koenig@amd.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"linaro-mm-sig@lists.linaro.org" <linaro-mm-sig@lists.linaro.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Gustavo Padovan <gustavo@padovan.org>,
	Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>Chris Wilson
	<chris@chris-wilson.co.uk>
Subject: Re: [PATCH] dma-fence: fix dma_fence_get_rcu_safe
Date: Fri, 29 Sep 2017 15:34:19 +0300	[thread overview]
Message-ID: <1506688459.4729.88.camel@linux.intel.com> (raw)
In-Reply-To: <CAKMK7uGkEFzbrhAS1qWs-g3dC20jubXitR5ALkTg4PhMwoQ-Rg@mail.gmail.com>

On Wed, 2017-09-20 at 20:20 +0200, Daniel Vetter wrote:
> On Mon, Sep 11, 2017 at 01:06:32PM +0200, Christian König wrote:
> > Am 11.09.2017 um 12:01 schrieb Chris Wilson:
> > > [SNIP]
> > > > Yeah, but that is illegal with a fence objects.
> > > > 
> > > > When anybody allocates fences this way it breaks at least
> > > > reservation_object_get_fences_rcu(),
> > > > reservation_object_wait_timeout_rcu() and
> > > > reservation_object_test_signaled_single().
> > > 
> > > Many, many months ago I sent patches to fix them all.
> > 
> > Found those after a bit a searching. Yeah, those patches where proposed more
> > than a year ago, but never pushed upstream.
> > 
> > Not sure if we really should go this way. dma_fence objects are shared
> > between drivers and since we can't judge if it's the correct fence based on
> > a criteria in the object (only the read counter which is outside) all
> > drivers need to be correct for this.
> > 
> > I would rather go the way and change dma_fence_release() to wrap
> > fence->ops->release into call_rcu() to keep the whole RCU handling outside
> > of the individual drivers.
> 
> Hm, I entirely dropped the ball on this, I kinda assumed that we managed
> to get some agreement on this between i915 and dma_fence. Adding a pile
> more people.
> 
> Joonas, Tvrtko, I guess we need to fix this one way or the other.

I definitely didn't get the memo or notice this before. Tvrtko/Chris?

Regars, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation

WARNING: multiple messages have this Message-ID (diff)
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: "Daniel Vetter" <daniel@ffwll.ch>,
	"Christian König" <christian.koenig@amd.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"linaro-mm-sig@lists.linaro.org" <linaro-mm-sig@lists.linaro.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Gustavo Padovan <gustavo@padovan.org>,
	Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [PATCH] dma-fence: fix dma_fence_get_rcu_safe
Date: Fri, 29 Sep 2017 15:34:19 +0300	[thread overview]
Message-ID: <1506688459.4729.88.camel@linux.intel.com> (raw)
In-Reply-To: <CAKMK7uGkEFzbrhAS1qWs-g3dC20jubXitR5ALkTg4PhMwoQ-Rg@mail.gmail.com>

On Wed, 2017-09-20 at 20:20 +0200, Daniel Vetter wrote:
> On Mon, Sep 11, 2017 at 01:06:32PM +0200, Christian König wrote:
> > Am 11.09.2017 um 12:01 schrieb Chris Wilson:
> > > [SNIP]
> > > > Yeah, but that is illegal with a fence objects.
> > > > 
> > > > When anybody allocates fences this way it breaks at least
> > > > reservation_object_get_fences_rcu(),
> > > > reservation_object_wait_timeout_rcu() and
> > > > reservation_object_test_signaled_single().
> > > 
> > > Many, many months ago I sent patches to fix them all.
> > 
> > Found those after a bit a searching. Yeah, those patches where proposed more
> > than a year ago, but never pushed upstream.
> > 
> > Not sure if we really should go this way. dma_fence objects are shared
> > between drivers and since we can't judge if it's the correct fence based on
> > a criteria in the object (only the read counter which is outside) all
> > drivers need to be correct for this.
> > 
> > I would rather go the way and change dma_fence_release() to wrap
> > fence->ops->release into call_rcu() to keep the whole RCU handling outside
> > of the individual drivers.
> 
> Hm, I entirely dropped the ball on this, I kinda assumed that we managed
> to get some agreement on this between i915 and dma_fence. Adding a pile
> more people.
> 
> Joonas, Tvrtko, I guess we need to fix this one way or the other.

I definitely didn't get the memo or notice this before. Tvrtko/Chris?

Regars, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation

  parent reply	other threads:[~2017-09-29 12:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-04 13:27 [PATCH] dma-fence: fix dma_fence_get_rcu_safe Christian König
2017-09-04 13:27 ` Christian König
2017-09-04 13:40 ` Chris Wilson
2017-09-04 13:40   ` Chris Wilson
2017-09-11  8:50   ` Christian König
2017-09-11  8:59     ` Chris Wilson
2017-09-11  8:59       ` Chris Wilson
2017-09-11  9:06       ` Christian König
2017-09-11  9:23         ` Chris Wilson
2017-09-11  9:23           ` Chris Wilson
2017-09-11  9:57           ` Christian König
2017-09-11 10:01             ` Chris Wilson
2017-09-11 11:06               ` Christian König
2017-09-20 18:20                 ` Daniel Vetter
2017-09-21  7:00                   ` Christian König
2017-09-21  7:29                     ` Maarten Lankhorst
2017-09-21  7:29                       ` Maarten Lankhorst
2017-09-29 12:34                   ` Joonas Lahtinen [this message]
2017-09-29 12:34                     ` Joonas Lahtinen
  -- strict thread matches above, loose matches on Subject: below --
2017-09-04 13:20 Christian König
2017-09-04 13:20 ` Christian König
2017-09-04 13:16 Christian König
2017-09-04 15:50 ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1506688459.4729.88.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=christian.koenig@amd.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo@padovan.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-media@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=sumit.semwal@linaro.org \
    --cc=tvrtko.ursulin@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.