[Mesa-dev] [PATCH] i965: Do not log a perf warning when mapping an idle bo

Kenneth Graunke kenneth at whitecape.org
Wed Oct 18 18:01:07 UTC 2017


On Wednesday, October 18, 2017 2:03:37 AM PDT Chris Wilson wrote:
> Quoting Chris Wilson (2017-10-18 09:53:27)
> > We only want to scare the user away from causing a GPU stall for mapping
> > a busy bo. The time taken to instantiate the set of pages for a buffer
> > and their mmapping is unavoidable and flagging idle bo as being busy is
> > "crying wolf".
> > 
> > Reported-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> > Cc: Kenneth Graunke <kenneth at whitecape.org>
> > ---
> >  src/mesa/drivers/dri/i965/brw_bufmgr.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c
> > index f12a3786eb..0db54fa3d1 100644
> > --- a/src/mesa/drivers/dri/i965/brw_bufmgr.c
> > +++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c
> > @@ -734,11 +734,12 @@ bo_wait_with_stall_warning(struct brw_context *brw,
> >                             struct brw_bo *bo,
> >                             const char *action)
> >  {
> > -   double elapsed = unlikely(brw && brw->perf_debug) ? -get_time() : 0.0;
> > +   bool busy = brw && brw->perf_debug && !bo->idle;
> 
> I was thinking cheap, but probably better if we used brw_bo_busy() for
> the external checks? Although taking external busyness into account may
> cause some hard to debug flip-flops.
> -Chris

Cheap makes sense to me, the worst case is you say something was busy
when it really just took a bit too much time.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171018/24e09a83/attachment-0001.sig>


More information about the mesa-dev mailing list