On Mon, 12 Dec 2011 18:16:27 -0800 Ying Han <yinghan@xxxxxxxxxx> wrote: > In __mem_cgroup_try_charge() function, the parameter "oom" is passed from the > caller indicating whether or not the charge should enter memcg oom kill. In > fact, we should be able to eliminate that by using the existing gfp_mask and > __GFP_NORETRY flag. > > This patch removed the "oom" parameter, and add the __GFP_NORETRY flag into > gfp_mask for those doesn't want to enter memcg oom. There is no functional > change for those setting false to "oom" like mem_cgroup_move_parent(), but > __GFP_NORETRY now is checked for those even setting true to "oom". > > The __GFP_NORETRY is used in page allocator to bypass retry and oom kill. I > believe there is a reason for callers to use that flag, and in memcg charge > we need to respect it as well. > > Signed-off-by: Ying Han <yinghan@xxxxxxxxxx> I don't like this. _GFP_NORETRY is included in GFP_RECLAIM_MASK and may be affeced by future changes in vmscan.c Bye, -Kame -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>