On Sun, 18 Sep 2016, Michal Hocko wrote: > On Sun 18-09-16 12:04:47, zhong jiang wrote: > [...] > > index 5048083..72dc475 100644 > > --- a/mm/ksm.c > > +++ b/mm/ksm.c > > @@ -299,7 +299,7 @@ static inline void free_rmap_item(struct rmap_item *rmap_item) > > > > static inline struct stable_node *alloc_stable_node(void) > > { > > - return kmem_cache_alloc(stable_node_cache, GFP_KERNEL); > > + return kmem_cache_alloc(stable_node_cache, __GFP_HIGH); > > } > > I do not want to speak for Hugh but I believe he meant something > different. The above will grant access to memory reserves but it doesn't > wake kswapd nor the direct reclaim. I guess he meant GFP_KERNEL | __GFP_HIGH You speak for me correctly, Michal: sorry I wasn't clear, Zhongjiang, yes, I meant __GFP_HIGH as a modifier for GFP_KERNEL: GFP_KERNEL | __GFP_HIGH And after running it past Michal and thinking on it some more, I do still think that it's the right thing to do for alloc_stable_node(). But please only include that change in your patch if you yourself are comfortable with it: it is very definitely a much lower order issue than the alloc_rmap_item() issue, and can always be added later. (I have no view on whether and how this problem still occurs with OOM reaper: I leave the thinking on that to you and the experts.) Hugh -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>