Messages in this thread | | | Date | Fri, 25 Sep 2020 16:13:23 -0700 | From | Chris Goldsworthy <> | Subject | Re: [PATCH v3] mm: cma: indefinitely retry allocations in cma_alloc |
| |
On 2020-09-25 05:18, David Hildenbrand wrote: > On 24.09.20 07:16, Chris Goldsworthy wrote: >> - GFP_KERNEL | (no_warn ? __GFP_NOWARN : 0)); >> + GFP_KERNEL | (gfp_mask & __GFP_NOWARN)); > > Right, we definetly don't want to pass the flag further down. > > Alternative would be cma_alloc_nofail(). That helps avoid people > passing > stuff like GFP_USER and wondering why it doesn't have an effect.
But since we're doing a logical AND with __GFP_NOWARN, we're not passing any other values down - this makes it equivalent to the previous version, in that only __GFP_NOWARN can be passed to alloc_contig_range().
-- The Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
| |