On Wed, Dec 12, 2018 at 03:47:02PM +0100, Oscar Salvador wrote: >On Wed, Dec 12, 2018 at 10:25:50PM +0800, Wei Yang wrote: >> drain_all_pages is documented to drain per-cpu pages for a given zone (if >> non-NULL). The current implementation doesn't match the description though. >> It will drain all pcp pages for all zones that happen to have cached pages >> on the same cpu as the given zone. This will leave to premature pcp cache >> draining for zones that are not of an interest for the caller - e.g. >> compaction, hwpoison or memory offline. >> >> This would force the page allocator to take locks and potential lock >> contention as a result. >> >> There is no real reason for this sub-optimal implementnation. Replace >> per-cpu work item with a dedicated structure which contains a pointer to >> zone and pass it over to the worker. This will get the zone information all >> the way down to the worker function and do the right job. >> >> [mhocko@xxxxxxxx: refactor the whole changelog] >> >> Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx> >> Acked-by: Michal Hocko <mhocko@xxxxxxxx> > >Looks to me > >Reviewed-by: Oscar Salvador <osalvador@xxxxxxx> > >thanks Thanks :-) > >-- >Oscar Salvador >SUSE L3 -- Wei Yang Help you, Help me