[LU-16609] top_trans_create() can oom due to the gfp flags Created: 01/Mar/23  Updated: 09/Nov/23  Resolved: 18/Apr/23

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.16.0

Type: Bug Priority: Major
Reporter: Andrew Perepechko Assignee: Andrew Perepechko
Resolution: Fixed Votes: 0
Labels: patch

Issue Links:
Related
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

top_trans_create() requests __GFP_IO memory allocation,
which does not allow direct reclaim. However, if the
memory shortage is temporary, direct reclaim is reasonable.

GFP_NOFS is __GFP_IO with some additional reclaim bits.



 Comments   
Comment by Gerrit Updater [ 01/Mar/23 ]

"Andrew Perepechko <andrew.perepechko@hpe.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50176
Subject: LU-16609 target: top_trans_create cannot alloc memory
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 909bf5257eb33fe45071cf52f7a00ccf3fb72e12

Comment by Andrew Perepechko [ 01/Mar/23 ]

__GFP_IO alone does not make sense because this bit is only used by the memory reclaimer, so we need explicitly to specify that we want memory reclaim (bound by __GFP_IO, of course):

 

#define GFP_NOFS        (__GFP_RECLAIM | __GFP_IO)

#define __GFP_RECLAIM ((force gfp_t)(_GFP_DIRECT_RECLAIM|_GFP_KSWAPD_RECLAIM))

Comment by Gerrit Updater [ 18/Apr/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/50176/
Subject: LU-16609 target: top_trans_create cannot alloc memory
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 9d1f8f1e3557ee3349c623f4f5596df44f60b082

Comment by Peter Jones [ 18/Apr/23 ]

Landed for 2.16

Generated at Sat Feb 10 03:28:29 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.