From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11485C4332D for ; Thu, 19 Mar 2020 12:21:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E316720663 for ; Thu, 19 Mar 2020 12:21:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E316720663 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7152C6B0003; Thu, 19 Mar 2020 08:21:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6C5826B0005; Thu, 19 Mar 2020 08:21:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5B4566B0006; Thu, 19 Mar 2020 08:21:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0214.hostedemail.com [216.40.44.214]) by kanga.kvack.org (Postfix) with ESMTP id 3FEE26B0003 for ; Thu, 19 Mar 2020 08:21:28 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id EFC77181AC9C6 for ; Thu, 19 Mar 2020 12:21:27 +0000 (UTC) X-FDA: 76612022214.26.nerve53_46f35ea2ba54d X-HE-Tag: nerve53_46f35ea2ba54d X-Filterd-Recvd-Size: 2465 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Thu, 19 Mar 2020 12:21:27 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A06E6AFC8; Thu, 19 Mar 2020 12:21:21 +0000 (UTC) Subject: Re: [PATCH v2 1/2] mm/page_alloc: use ac->high_zoneidx for classzone_idx To: Joonsoo Kim , David Rientjes Cc: Andrew Morton , Linux Memory Management List , LKML , Johannes Weiner , Michal Hocko , Minchan Kim , Mel Gorman , kernel-team@lge.com, Ye Xiaolong , Joonsoo Kim References: <1584502378-12609-1-git-send-email-iamjoonsoo.kim@lge.com> <1584502378-12609-2-git-send-email-iamjoonsoo.kim@lge.com> From: Vlastimil Babka Message-ID: <9a7c94c0-c2b2-d533-316a-4fd42bdf55b1@suse.cz> Date: Thu, 19 Mar 2020 13:21:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 3/19/20 9:57 AM, Joonsoo Kim wrote: >> Curious: is this only an issue when vm.numa_zonelist_order is set to Node? > > Do you mean "/proc/sys/vm/numa_zonelist_order"? It looks like it's gone now. > > Thanks. Yes it's gone now, but indeed, AFAIU on older kernels with zone order instead of node order, this problem wouldn't manifest. This was in my reply to v1, 2 years ago :) So to summarize; - ac->high_zoneidx is computed via the arcane gfp_zone(gfp_mask) and represents the highest zone the allocation can use - classzone_idx was supposed to be the highest zone that the allocation can use, that is actually available in the system. Somehow that became the highest zone that is available on the preferred node (in the default node-order zonelist), which causes the watermark inconsistencies you mention.