Re: [Mesa-dev] [PATCH] i965: Reuse the same single-page bo for all zero sized allocations

2018-08-15 Thread Chris Wilson
Quoting Michal Srb (2018-08-15 09:22:19) > Hi, > > This is my first attempt to review patch for Mesa, so please take it with a > grain of salt. > > On úterý 14. srpna 2018 20:21:40 CEST Chris Wilson wrote: > > @@ -504,6 +506,24 @@ bo_alloc_internal(struct brw_bufmgr *bufmgr, > > bool busy =

Re: [Mesa-dev] [PATCH] i965: Reuse the same single-page bo for all zero sized allocations

2018-08-15 Thread Michal Srb
Hi, This is my first attempt to review patch for Mesa, so please take it with a grain of salt. On úterý 14. srpna 2018 20:21:40 CEST Chris Wilson wrote: > @@ -504,6 +506,24 @@ bo_alloc_internal(struct brw_bufmgr *bufmgr, > bool busy = false; > bool zeroed = false; > > + /* Reuse the

[Mesa-dev] [PATCH] i965: Reuse the same single-page bo for all zero sized allocations

2018-08-14 Thread Chris Wilson
Similar in principle to how malloc(0) can return the same constant address knowing that the client is not allowed to access any of its bytes (as they do not exist!), we can return the same bo for all zero sized allocation requests. Having a single identifier should help track down the redundant