[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAO_48GGtwDJPFqfsQvDPGwF-B+9GAVxEjS+jSWvmbeFHSkutiA@mail.gmail.com>
Date: Tue, 14 Sep 2021 20:26:42 +0530
From: Sumit Semwal <sumit.semwal@...aro.org>
To: John Stultz <john.stultz@...aro.org>,
lkml <linux-kernel@...r.kernel.org>,
Christian Koenig <christian.koenig@....com>,
Sumit Semwal <sumit.semwal@...aro.org>,
Liam Mark <lmark@...eaurora.org>,
Chris Goldsworthy <cgoldswo@...eaurora.org>,
Laura Abbott <labbott@...nel.org>,
Brian Starkey <Brian.Starkey@....com>,
Hridya Valsaraju <hridya@...gle.com>,
Suren Baghdasaryan <surenb@...gle.com>,
Sandeep Patil <sspatil@...gle.com>,
Daniel Mentz <danielmentz@...gle.com>,
Ørjan Eide <orjan.eide@....com>,
Robin Murphy <robin.murphy@....com>,
Simon Ser <contact@...rsion.fr>,
James Jones <jajones@...dia.com>, Leo Yan <leo.yan@...aro.org>,
"open list:DMA BUFFER SHARING FRAMEWORK"
<linux-media@...r.kernel.org>,
DRI mailing list <dri-devel@...ts.freedesktop.org>
Cc: Daniel Vetter <daniel@...ll.ch>
Subject: Re: [PATCH] dma-buf: system_heap: Avoid warning on mid-order allocations
Thanks John!
On Tue, 14 Sept 2021 at 19:26, Daniel Vetter <daniel@...ll.ch> wrote:
>
> On Thu, Sep 09, 2021 at 02:37:41AM +0000, John Stultz wrote:
> > When trying to do mid-order allocations, set __GFP_NOWARN to
> > avoid warning messages if the allocation fails, as we will
> > still fall back to single page allocatitions in that case.
> > This is the similar to what we already do for large order
> > allocations.
> >
> > Cc: Daniel Vetter <daniel@...ll.ch>
> > Cc: Christian Koenig <christian.koenig@....com>
> > Cc: Sumit Semwal <sumit.semwal@...aro.org>
> > Cc: Liam Mark <lmark@...eaurora.org>
> > Cc: Chris Goldsworthy <cgoldswo@...eaurora.org>
> > Cc: Laura Abbott <labbott@...nel.org>
> > Cc: Brian Starkey <Brian.Starkey@....com>
> > Cc: Hridya Valsaraju <hridya@...gle.com>
> > Cc: Suren Baghdasaryan <surenb@...gle.com>
> > Cc: Sandeep Patil <sspatil@...gle.com>
> > Cc: Daniel Mentz <danielmentz@...gle.com>
> > Cc: Ørjan Eide <orjan.eide@....com>
> > Cc: Robin Murphy <robin.murphy@....com>
> > Cc: Simon Ser <contact@...rsion.fr>
> > Cc: James Jones <jajones@...dia.com>
> > Cc: Leo Yan <leo.yan@...aro.org>
> > Cc: linux-media@...r.kernel.org
> > Cc: dri-devel@...ts.freedesktop.org
> > Signed-off-by: John Stultz <john.stultz@...aro.org>
>
> Acked-by: Daniel Vetter <daniel.vetter@...ll.ch>
>
Pushed to drm-misc-next.
> > ---
> > drivers/dma-buf/heaps/system_heap.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/dma-buf/heaps/system_heap.c b/drivers/dma-buf/heaps/system_heap.c
> > index 23a7e74ef966..f57a39ddd063 100644
> > --- a/drivers/dma-buf/heaps/system_heap.c
> > +++ b/drivers/dma-buf/heaps/system_heap.c
> > @@ -40,11 +40,12 @@ struct dma_heap_attachment {
> > bool mapped;
> > };
> >
> > +#define LOW_ORDER_GFP (GFP_HIGHUSER | __GFP_ZERO | __GFP_COMP)
> > +#define MID_ORDER_GFP (LOW_ORDER_GFP | __GFP_NOWARN)
> > #define HIGH_ORDER_GFP (((GFP_HIGHUSER | __GFP_ZERO | __GFP_NOWARN \
> > | __GFP_NORETRY) & ~__GFP_RECLAIM) \
> > | __GFP_COMP)
> > -#define LOW_ORDER_GFP (GFP_HIGHUSER | __GFP_ZERO | __GFP_COMP)
> > -static gfp_t order_flags[] = {HIGH_ORDER_GFP, LOW_ORDER_GFP, LOW_ORDER_GFP};
> > +static gfp_t order_flags[] = {HIGH_ORDER_GFP, MID_ORDER_GFP, LOW_ORDER_GFP};
> > /*
> > * The selection of the orders used for allocation (1MB, 64K, 4K) is designed
> > * to match with the sizes often found in IOMMUs. Using order 4 pages instead
> > --
> > 2.25.1
> >
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
Best,
Sumit.
Powered by blists - more mailing lists