mm/vdpa: correct misuse of non-direct-reclaim __GFP_NOFAIL and improve related doc and warn
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest3 patches 13 repliesIn review 2 of 3 applied
- v34 patches 96 repliesSuperseded
- v24 patches 23 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 5 patches | 41 replies | Superseded |
Patches in v4 2 of 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | vduse: avoid using __GFP_NOFAILdrivers/ drivers/ | +12 | 4 replies | Applied |
| 2/3 | mm: document __GFP_NOFAIL must be blockableinclude/ | +4 | 1 reply | Applied |
| 3/3 | mm: warn about illegal __GFP_NOFAIL usage in a more appropriate location and mannermm/ | +25 | 8 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Xie Yongji | Michal Hocko | Christoph Hellwig | Vlastimil Babka | Davidlohr Bueso | David Hildenbrand |
|---|---|---|---|---|---|---|
| 1/3 | R-b T-b | |||||
| 2/3 | A-b | R-b | A-b | A-b | A-b | |
| 3/3 | A-b | R-b | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.
Cover letter [PATCH v4 0/3] mm/vdpa: correct misuse of non-direct-reclaim __GFP_NOFAIL and improve related doc and warn
From: Barry Song <[email protected]>
-v4:
* drop all BUG_ON, Linus, David, Yafang;
* warn in a better place, Vlastimil;
* drop patch 3/4, the maximum supported size for __GFP_NOFAIL will be discussed separately, Michal;
-v3:
https://lore.kernel.org/linux-mm/[email protected]/
* collect reviewed-by, acked-by etc. Michal, Christoph, Vlastimil, Davidlohr, thanks!
* use Jason's patch[1] to fix vdpa and refine his changelog.
* refine changelogs
[1] https://lore.kernel.org/all/[email protected]/
-v2:
https://lore.kernel.org/linux-mm/[email protected]/
* adjust vpda fix according to Jason and Michal's feedback, I would expect Jason to test it, thanks!
* split BUG_ON of unavoidable failure and the case GFP_ATOMIC | __GFP_NOFAIL into two patches according to Vlastimil and Michal.
* collect Michal's acked-by for patch 2 - the doc;
* remove the new GFP_NOFAIL from this series, that one would be a separate enhancement patchset later on.
-v1:
https://lore.kernel.org/linux-mm/[email protected]/
__GFP_NOFAIL carries the semantics of never failing, so its callers do not check the return value:
%__GFP_NOFAIL: The VM implementation _must_ retry infinitely: the caller cannot handle allocation failures. The allocation could block indefinitely but will never return with failure. Testing for failure is pointless.
However, __GFP_NOFAIL can sometimes fail if it exceeds size limits or is used with GFP_ATOMIC/GFP_NOWAIT in a non-sleepable context. This patchset handles illegal using __GFP_NOFAIL together with GFP_ATOMIC lacking __GFP_DIRECT_RECLAIM(without this, we can't do anything to reclaim memory to satisfy the nofail requirement) and improve related document and warnings.
The proper size limits for __GFP_NOFAIL will be handled separately after more discussions.
* The discussion started from this topic:
[PATCH RFC] mm: warn potential return NULL for kmalloc_array and
kvmalloc_array with __GFP_NOFAIL
https://lore.kernel.org/linux-mm/[email protected]/
Barry Song (2):
mm: document __GFP_NOFAIL must be blockable
mm: warn about illegal __GFP_NOFAIL usage in a more appropriate
location and manner
Jason Wang (1):
vduse: avoid using __GFP_NOFAIL
drivers/vdpa/vdpa_user/iova_domain.c | 19 ++++++----- drivers/vdpa/vdpa_user/iova_domain.h | 1 + include/linux/gfp_types.h | 5 ++- mm/page_alloc.c | 50 ++++++++++++++-------------- 4 files changed, 41 insertions(+), 34 deletions(-)
Signature · 1 line
2.34.1