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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 73677C10F26 for ; Mon, 23 Mar 2020 04:18:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 241D120719 for ; Mon, 23 Mar 2020 04:18:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fJBVGaEy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 241D120719 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9C8BE6B0005; Mon, 23 Mar 2020 00:18:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9799C6B0006; Mon, 23 Mar 2020 00:18:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8B5FE6B0007; Mon, 23 Mar 2020 00:18:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0019.hostedemail.com [216.40.44.19]) by kanga.kvack.org (Postfix) with ESMTP id 7289C6B0005 for ; Mon, 23 Mar 2020 00:18:21 -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 AA000181AEF07 for ; Mon, 23 Mar 2020 04:18:21 +0000 (UTC) X-FDA: 76625320002.26.blow12_ebd74b99235f X-HE-Tag: blow12_ebd74b99235f X-Filterd-Recvd-Size: 6201 Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Mon, 23 Mar 2020 04:18:21 +0000 (UTC) Received: by mail-qt1-f194.google.com with SMTP id f20so10632013qtq.6 for ; Sun, 22 Mar 2020 21:18:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=XZ6ALnKcU8GcDCoOPSuVyF4QFHvhGeqgzFOKGeSC0Vg=; b=fJBVGaEy7KOWlF0tE1BYrzuhumGYB0dEhtuV8n7bDfbT27n4jyVdtkD+znxPp089pS lTFUyQv9lcSf9pFHucv52F5tnwfiodEjAjiCeFlHbrgkNeCn48OgJIr0gm3+wDhzQVIh BIlgCnzf9vW1RpPvr7puUFJFGXpfTN7HWeFvTfEroVXDq0JaiM8pZ7PS1Dw1/zXSEYjV lOn2YPmshDRKqt3BIZrVfLmMkDJU0tqiTJgE35rT6MD71B2VLzigd4We7TSuq3jxrKIB a6DRE20Ssyd9nez5022vOmcFy4MwmAbbONZNQWViCV6TBX9rG9q8RNNUeRS8zIfqgQyu rxtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=XZ6ALnKcU8GcDCoOPSuVyF4QFHvhGeqgzFOKGeSC0Vg=; b=pm6rS3NDYfq2SkTmy3cLzGEu123ew5RLloTCU9OdMhVmiAnxM1Y5JkwZ8RZoDMqQiP aTFkSynAvg7h6MGrpz/CC/NDeYPvCs6SgSNlCoy1poIkENK4OBtWa9RChzxYWy1rCFGa KoAClixD/RFx4CxIkNhPxipovCop4W2NWIct7CIkDtgz1rtzzHWn2bEYAvVmbNrdkaW3 g458tMDQ/n+J/n3HjbHsjFdnd5dzdmws8vP9GNFi9rgxpYAy3tGSYMZ+o7zdJCOUS0yz 7KUTYurbWWEz0c99JkbDVg9YNKYKpQSOlFoLaj+eUcIGIDQa+dMBa4FXeeu7MvOjifj0 Ba0A== X-Gm-Message-State: ANhLgQ3Uwdx5cA87parLgaibwYGEca4+1GPj/O3z+iaUOMPyZIebeYu7 I67wTa2MnLClC/yZoT92fmve620ayzFv3lUnwBI= X-Google-Smtp-Source: ADFU+vtHqEKk2glIG9BQrGBFX4mSf9fs7yV9yFaJvVEQg8IAer5BX6uDG+e8M4RocqLDedeoeAJQ22aciHzwFeqURK4= X-Received: by 2002:aed:3981:: with SMTP id m1mr1734059qte.35.1584937100110; Sun, 22 Mar 2020 21:18:20 -0700 (PDT) MIME-Version: 1.0 References: <1584693135-4396-1-git-send-email-iamjoonsoo.kim@lge.com> <1584693135-4396-2-git-send-email-iamjoonsoo.kim@lge.com> <20200320103000.GB3039@MiWiFi-R3L-srv> <20200323035843.GH2987@MiWiFi-R3L-srv> In-Reply-To: <20200323035843.GH2987@MiWiFi-R3L-srv> From: Joonsoo Kim Date: Mon, 23 Mar 2020 13:18:09 +0900 Message-ID: Subject: Re: [PATCH v3 1/2] mm/page_alloc: use ac->high_zoneidx for classzone_idx To: Baoquan He Cc: Andrew Morton , Linux Memory Management List , LKML , Johannes Weiner , Michal Hocko , Minchan Kim , Vlastimil Babka , Mel Gorman , kernel-team@lge.com, Ye Xiaolong , David Rientjes , Joonsoo Kim Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 2020=EB=85=84 3=EC=9B=94 23=EC=9D=BC (=EC=9B=94) =EC=98=A4=ED=9B=84 12:59, = Baoquan He =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > On 03/23/20 at 12:50pm, Joonsoo Kim wrote: > > Hello, Baoquan. > > > > 2020=EB=85=84 3=EC=9B=94 20=EC=9D=BC (=EA=B8=88) =EC=98=A4=ED=9B=84 7:3= 0, Baoquan He =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > > > > > > > > On 03/20/20 at 05:32pm, js1304@gmail.com wrote: > > > > From: Joonsoo Kim > > > > > > > > Currently, we use the zone index of preferred_zone which represents > > > > the best matching zone for allocation, as classzone_idx. It has > > > > a problem on NUMA systems when the lowmem reserve protection exists > > > > for some zones on a node that do not exist on other nodes. > > > > > > > > In NUMA system, it can be possible that each node has different pop= ulated > > > > zones. For example, node 0 could have DMA/DMA32/NORMAL/MOVABLE zone= and > > > > node 1 could have only NORMAL zone. In this setup, allocation reque= st > > > > initiated on node 0 and the one on node 1 would have different > > > > classzone_idx, 3 and 2, respectively, since their preferred_zones a= re > > > > different. If the allocation is local, there is no problem. However= , > > > > if it is handled by the remote node due to memory shortage, the pro= blem > > > > would happen. > > > > > > Hi Joonsoo, > > > > > > Not sure if adding one sentence into above paragraph would be make it > > > easier to understand. Assume you are only talking about the high_zone= idx > > > is MOVABLE_ZONE with calculation of gfp_zone(gfp_mask), since any oth= er > > > case doesn't have this problem. Please correct me if I am wrong. > > > > You're right. This example is for the allocation request with > > gfp_zone(gfp_mask), > > MOVABLE_ZONE. > > > > > In NUMA system, it can be possible that each node has different popul= ated > > > zones. For example, node 0 could have DMA/DMA32/NORMAL/MOVABLE zone a= nd > > > node 1 could have only NORMAL zone. In this setup, if we get high_zon= eidx > > > as 3 (namely MOVABLE zone), with gfp_zone(gfp_mask), allocation reque= st > > > initiated on node 0 and the one on node 1 would have different > > > classzone_idx, 3 and 2, respectively, since their preferred_zones are > > > different. If the allocation is local, there is no problem. However, > > > if it is handled by the remote node due to memory shortage, the probl= em > > > would happen. > > > > I'm okay with your change but I try again to be better. Please check th= e > > following rewritten commit message and please let me know if it is bett= er > > than before. > > Yeah, this new one looks very detailed, I believe anyone interested can > get what's going on. Thanks for doing this. Thanks for checking it. I will submit v4 with including this re-written commit message. Thanks.