Re: [Mesa-dev] [PATCH 2/2] panfrost: Add madvise support to BO cache

2019-08-16 Thread Tomeu Vizoso
Both patches look good to me. Reviewed-by: Tomeu Vizoso Thanks! Tomeu On Fri, 9 Aug 2019 at 21:53, Rob Herring wrote: > > The kernel now supports madvise ioctl to indicate which BOs can be freed > when there is memory pressure. Mark BOs purgeable when they are in the > BO cache. The BOs must

Re: [Mesa-dev] [PATCH 2/2] panfrost: Add madvise support to BO cache

2019-08-09 Thread Alyssa Rosenzweig
Alright. Let's wait for Tomeu's ack, but R-b :) On Fri, Aug 09, 2019 at 01:53:13PM -0600, Rob Herring wrote: > The kernel now supports madvise ioctl to indicate which BOs can be freed > when there is memory pressure. Mark BOs purgeable when they are in the > BO cache. The BOs must also be

Re: [Mesa-dev] [PATCH 2/2] panfrost: Add madvise support to BO cache

2019-08-09 Thread Rob Herring
On Fri, Aug 9, 2019 at 2:49 PM Alyssa Rosenzweig wrote: > > I'm not one to care, but fwiw, spacing is inconsistent..? Context? I guess you mean the 'madv.retained = 0;' line. > > > + if (!ret && !madv.retained) { > > What's the logic here? (What does a 0/!0 return code mean

Re: [Mesa-dev] [PATCH 2/2] panfrost: Add madvise support to BO cache

2019-08-09 Thread Alyssa Rosenzweig
I'm not one to care, but fwiw, spacing is inconsistent..? > + if (!ret && !madv.retained) { What's the logic here? (What does a 0/!0 return code mean here?) I'm wondering if this meant to be ||? Or is the idea that an older kernel will have ret!=0 (since it doesn't recognize

[Mesa-dev] [PATCH 2/2] panfrost: Add madvise support to BO cache

2019-08-09 Thread Rob Herring
The kernel now supports madvise ioctl to indicate which BOs can be freed when there is memory pressure. Mark BOs purgeable when they are in the BO cache. The BOs must also be munmapped when they are in the cache or they cannot be purged. We could optimize avoiding the madvise ioctl on older