get rid of superfluous __GFP_REPORT
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest19 patches 19 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/19 | tree wide: get rid of __GFP_REPEAT for order-0 allocations part Iarch/ arch/ arch/ +23 more | +46 | 2 replies | |
| 2/19 | x86: get rid of superfluous __GFP_REPEATarch/ arch/ | +2 | 0 replies | |
| 3/19 | x86/efi: get rid of superfluous __GFP_REPEATarch/ | +1 | 1 reply | |
| 4/19 | arm: get rid of superfluous __GFP_REPEATarch/ arch/ | +2 | 0 replies | |
| 5/19 | arm64: get rid of superfluous __GFP_REPEATarch/ | +1 | 1 reply | |
| 6/19 | arc: get rid of superfluous __GFP_REPEATarch/ | +2 | 1 reply | |
| 7/19 | mips: get rid of superfluous __GFP_REPEATarch/ | +3 | 0 replies | |
| 8/19 | nios2: get rid of superfluous __GFP_REPEATarch/ | +2 | 0 replies | |
| 9/19 | parisc: get rid of superfluous __GFP_REPEATarch/ | +1 | 0 replies | |
| 10/19 | score: get rid of superfluous __GFP_REPEATarch/ | +2 | 0 replies | |
| 11/19 | powerpc: get rid of superfluous __GFP_REPEATarch/ arch/ | +4 | 0 replies | |
| 12/19 | sparc: get rid of superfluous __GFP_REPEATarch/ | +2 | 0 replies | |
| 13/19 | s390: get rid of superfluous __GFP_REPEATarch/ arch/ | +2 | 2 replies | |
| 14/19 | sh: get rid of superfluous __GFP_REPEATarch/ | +1 | 0 replies | |
| 15/19 | tile: get rid of superfluous __GFP_REPEATarch/ | +1 | 0 replies | |
| 16/19 | unicore32: get rid of superfluous __GFP_REPEATarch/ | +1 | 0 replies | |
| 17/19 | dm: get rid of superfluous gfp flagsdrivers/ | +1 | 7 replies | |
| 18/19 | crypto: get rid of superfluous __GFP_REPEATcrypto/ | +1 | 5 replies | |
| 19/19 | jbd2: get rid of superfluous __GFP_REPEATfs/ | +7 | 0 replies |
Reviews trailers per patch
4 of 19 patches have a Reviewed-by or Acked-by.
| Patch | Heiko Carstens | Vineet Gupta | Will Deacon | Matt Fleming |
|---|---|---|---|---|
| 1/19 | ||||
| 2/19 | ||||
| 3/19 | R-b | |||
| 4/19 | ||||
| 5/19 | A-b | |||
| 6/19 | A-b | |||
| 7/19 | ||||
| 8/19 | ||||
| 9/19 | ||||
| 10/19 | ||||
| 11/19 | ||||
| 12/19 | ||||
| 13/19 | A-b | |||
| 14/19 | ||||
| 15/19 | ||||
| 16/19 | ||||
| 17/19 | ||||
| 18/19 | ||||
| 19/19 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH 0/19] get rid of superfluous __GFP_REPORT
Hi,
this is the second version of the patchset previously sent [1]
while working on something unrelated I've checked the current usage of __GFP_REPEAT in the tree. It seems that a majority of the usage is and always has been bogus because __GFP_REPEAT has always been about costly high order allocations while we are using it for order-0 or very small orders very often. It seems that a big pile of them is just a copy&paste when a code has been adopted from one arch to another.
I think it makes some sense to get rid of them because they are just making the semantic more unclear. Please note that GFP_REPEAT is documented as
* __GFP_REPEAT: Try hard to allocate the memory, but the allocation attempt
* _might_ fail. This depends upon the particular VM implementation.
while !costly requests have basically nofail semantic. So one could reasonably expect that order-0 request with __GFP_REPEAT will not loop for ever. This is not implemented right now though.
I would like to move on with __GFP_REPEAT and define a better semantic for it. One thought was to rename it to __GFP_BEST_EFFORT which would behave consistently for all orders and guarantee that the allocation would try as long as it seem feasible or fail eventually. !costly request would then finally get a request context which neiter fails too early (GFP_NORETRY) nor endlessly loops in the allocator for ever (default behavior). Costly high order requests would keep the current semantic.
$ git grep __GFP_REPEAT next/master | wc -l 111 $ git grep __GFP_REPEAT | wc -l 35
So we are down to the third after this patch series. The remaining places really seem to be relying on __GFP_REPEAT due to large allocation requests. This still needs some double checking which I will do later after all the simple ones are sorted out.
I am touching a lot of arch specific code here and I hope I got it right but as a matter of fact I even didn't compile test for some archs as I do not have cross compiler for them. Patches should be quite trivial to review for stupid compile mistakes though. The tricky parts are usually hidden by macro definitions and thats where I would appreciate help from arch maintainers.
I am also interested whether this makes sense in general.
[1] http://lkml.kernel.org/r/[email protected]
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>