Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754175AbdHYAPS (ORCPT ); Thu, 24 Aug 2017 20:15:18 -0400 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:40588 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754066AbdHYAPR (ORCPT ); Thu, 24 Aug 2017 20:15:17 -0400 X-Original-SENDERIP: 156.147.1.125 X-Original-MAILFROM: iamjoonsoo.kim@lge.com X-Original-SENDERIP: 10.177.222.138 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Fri, 25 Aug 2017 09:15:43 +0900 From: Joonsoo Kim To: Michal Hocko Cc: Andrew Morton , Vlastimil Babka , Mel Gorman , Johannes Weiner , "Aneesh Kumar K . V" , Minchan Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/page_alloc: don't reserve ZONE_HIGHMEM for ZONE_MOVABLE request Message-ID: <20170825001543.GC29701@js1304-P5Q-DELUXE> References: <1503553546-27450-1-git-send-email-iamjoonsoo.kim@lge.com> <20170824093050.GD5943@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170824093050.GD5943@dhcp22.suse.cz> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1384 Lines: 29 On Thu, Aug 24, 2017 at 11:30:50AM +0200, Michal Hocko wrote: > On Thu 24-08-17 14:45:46, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > Freepage on ZONE_HIGHMEM doesn't work for kernel memory so it's not that > > important to reserve. When ZONE_MOVABLE is used, this problem would > > theorectically cause to decrease usable memory for GFP_HIGHUSER_MOVABLE > > allocation request which is mainly used for page cache and anon page > > allocation. So, fix it. > > I do not really understand what is the problem you are trying to fix. > Yes the memory is reserved for a higher priority consumer and that is > deliberate AFAICT. Just consider that an OOM victim wants to make > further progress and rely on memory reserve while doing > GFP_HIGHUSER_MOVABLE request. > > So what is the real problem you are trying to address here? If the system has the both, ZONE_HIGHMEM and ZONE_MOVABLE, ZONE_HIGHMEM will reserve the memory for ZONE_MOVABLE request. However, they are consumed by nearly equivalent priority consumer who uses GFP_HIGHMEM + GFP_MOVABLE. In that case, reserved memory in ZONE_HIGHMEM would not be used and it means just waste of the memory. This patch try to fix it to nullify reserving memory in ZONE_HIGHMEM. And, I think that all this problem is caused by the complex code in lowmem reserve calculation. So, did some clean-up. Thanks.