From: Gustavo Padovan <gustavo@padovan.org>
To: "Christian König" <christian.koenig@amd.com>
Cc: Gustavo Padovan <gustavo.padovan@collabora.com>,
Gustavo Padovan <gustavo.padovan@collabora.co.uk>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] dma-buf/fence-array: get signaled state when signaling is disabled
Date: Sun, 25 Sep 2016 22:43:37 +0200 [thread overview]
Message-ID: <20160925204337.GB2571@joana> (raw)
In-Reply-To: <f1d82b89-85f8-1a52-1633-7af78d87c4f8@amd.com>
2016-09-23 Christian König <christian.koenig@amd.com>:
> Am 23.09.2016 um 13:30 schrieb Gustavo Padovan:
> > 2016-09-22 Christian König <christian.koenig@amd.com>:
> >
> > > Am 22.09.2016 um 13:16 schrieb Gustavo Padovan:
> > > > 2016-09-22 Christian König <christian.koenig@amd.com>:
> > > >
> > > > > Dropping the rest of the patch, cause that really doesn't make sense any
> > > > > more.
> > > > >
> > > > > Am 22.09.2016 um 12:40 schrieb Gustavo Padovan:
> > > > > > > E.g. for example it is illegal to do something like
> > > > > > > > "while(!fence_is_signaled(f)) sleep();" without enabling signaling before
> > > > > > > > doing this.
> > > > > > > >
> > > > > > > > Could just be a misunderstanding, but the comments on your patch actually
> > > > > > > > sounds a bit like somebody is trying to do exactly that.
> > > > > > I think the usecase in mind here is poll(fd, timeout=0)
> > > > > Exactly as I feared. Even if userspace polls with timeout=0 you still need
> > > > > to call enable_signaling().
> > > > >
> > > > > Otherwise you can run into a situation where userspace only uses timeout=0
> > > > > and so never activates the signaling check in the driver.
> > > > >
> > > > > This would in turn result in an endless loop on implementations where the
> > > > > driver never signals fences on their own.
> > > > Polling is optional, userspace may never call it. And DRM/KMS or GPU
> > > > drivers will be doing fence_wait() themselves so signaling is enabled at
> > > > some point.
> > > No they won't. We have an use case where we clearly want to avoid that as
> > > much as possible because and so the driver never calls enable_signaling() on
> > > it's own.
> > >
> > > Exposing this poll function to userspace without enabling signaling is a
> > > clear NAK from my side.
> > Okay. So you are NAK'ing the does_not_pool_wait change. Should we revert
> > that one then? It is already broken.
>
> Yeah, that would probably a good idea. The AMD driver changes which really
> rely on this aren't upstream yet, so if you point me to the commit hash I
> could revert that as well when we send that out.
>
> On the other hand the idea behind fence_is_signaled() is really that you
> check the status multiple times after enabling signaling. So I would prefer
> if you would revert this change preliminary.
>
> Double checking this patch (and thinking about it a bit more) reveals that
> it is most likely correct. So feel free to commit this one if it is still
> needed for something.
It is this patch:
ecebca7 dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0)
But if we revert it as you are a proposing we don't need my patch here
anymore. However we would need to revert it now because it is broken.
Shall I send a revert part?
Gustavo
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-09-25 20:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 11:36 [PATCH] dma-buf/fence-array: get signaled state when signaling is disabled Gustavo Padovan
2016-09-21 18:47 ` Christian König
2016-09-22 7:44 ` Gustavo Padovan
2016-09-22 8:05 ` Christian König
2016-09-22 10:40 ` Gustavo Padovan
2016-09-22 11:00 ` Christian König
2016-09-22 11:16 ` Gustavo Padovan
2016-09-22 14:11 ` Christian König
2016-09-22 14:12 ` Christian König
2016-09-23 11:30 ` Gustavo Padovan
2016-09-23 13:47 ` Christian König
2016-09-25 20:43 ` Gustavo Padovan [this message]
2016-09-26 7:22 ` Chris Wilson
2016-09-22 1:59 ` zhoucm1
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=20160925204337.GB2571@joana \
--to=gustavo@padovan.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo.padovan@collabora.co.uk \
--cc=gustavo.padovan@collabora.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.