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=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 CE1E8C1975A for ; Wed, 18 Mar 2020 03:42:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8E11620754 for ; Wed, 18 Mar 2020 03:42:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cdXdVxMp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8E11620754 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 13AB36B0003; Tue, 17 Mar 2020 23:42:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0EB496B0006; Tue, 17 Mar 2020 23:42:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F42236B0007; Tue, 17 Mar 2020 23:42:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0170.hostedemail.com [216.40.44.170]) by kanga.kvack.org (Postfix) with ESMTP id D984E6B0003 for ; Tue, 17 Mar 2020 23:42:25 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id F0B9F181AC9C6 for ; Wed, 18 Mar 2020 03:42:25 +0000 (UTC) X-FDA: 76607085492.11.hour44_899e8eff7e103 X-HE-Tag: hour44_899e8eff7e103 X-Filterd-Recvd-Size: 5352 Received: from mail-qk1-f196.google.com (mail-qk1-f196.google.com [209.85.222.196]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Wed, 18 Mar 2020 03:42:25 +0000 (UTC) Received: by mail-qk1-f196.google.com with SMTP id c145so36495924qke.12 for ; Tue, 17 Mar 2020 20:42:25 -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=8H/ZgaxOVCaLlv2GrR9cTt1R1atml+Y0nsu1LssXxwQ=; b=cdXdVxMpdS2avuxbJfe5fumPGhUiiHxepZsYIgnQmJ+ST2hWiySC7uwzwvcbw/bKx9 RXEM5VIVIAru40XWZQpzspOEwIp3MUzCppzTpU7jPznQhoURhTsw6B52AaQIfjkI5KTJ bhF+vwHC/N55J6hj6fCgNv8nAXCT67g/lLRJPFgQW5h7zLVFE6Ko4mA2h7d9/isR3q7n VZVERe+xiAmXd6MKdvXm3oE1YST0CPxbHmwyVUeZTOfiDklbhe2MNzEFg3F+dhVWedwu Db5qp/YgOZW5sHwJBQeHU45TLOu9gr5TFmaacd4bK0h1u6L9Uhe9+zan+sNhGrgGnOHF y2wA== 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=8H/ZgaxOVCaLlv2GrR9cTt1R1atml+Y0nsu1LssXxwQ=; b=XVjQfmQNO7UbJXs+wlt5oFFwElM52HhOYM9BvpjOlPcEeWWdlNAvr6e/ci+K2LA8i/ DABJOF2TifkQRXLZhowDRRPX2GamiERR7sxgbUN2+Rp4/Ovgh9Mkb2wTs+NtCFVFkQhg F1YlVDxcV3rG8n6xUXFJBG8cPXthfAEr2gppGgM2ACniMa8iSVXsXDA3bGtY1FloaALf PDxjuDfsbbbKlZWGRNNrRHy0KwIHPAQ6IajSMBIoTVwIm16zJnGfP1cquN5eW3ogvaNl 7trfv7GwRirDwUB/Mt9cNKCcfz43sWy7JXJ6vDw9s1ZhNQpn0mD0GnLqx8npDnUpxQAl Pp/Q== X-Gm-Message-State: ANhLgQ2sL6aB/LShuiiKgUoNLZimxcxOesy2QjHOIVvwHTew+vUxVj5R HDAEmjye3NN8IJEgbllTnjgTCpt/CBzt7cKmcos= X-Google-Smtp-Source: ADFU+vu97TB9JeGN3HvNfR3wj+MzyNnoz/TUsk3S8bY5GJTQm7/MZx0oHWZIiRxVjiy5CXi3P/kqHyb5A08K4Sm82/A= X-Received: by 2002:a37:546:: with SMTP id 67mr2041350qkf.272.1584502944545; Tue, 17 Mar 2020 20:42:24 -0700 (PDT) MIME-Version: 1.0 References: <1584502378-12609-1-git-send-email-iamjoonsoo.kim@lge.com> <1584502378-12609-3-git-send-email-iamjoonsoo.kim@lge.com> In-Reply-To: <1584502378-12609-3-git-send-email-iamjoonsoo.kim@lge.com> From: Joonsoo Kim Date: Wed, 18 Mar 2020 12:42:13 +0900 Message-ID: Subject: Re: [PATCH v2 2/2] mm/page_alloc: integrate classzone_idx and high_zoneidx To: Andrew Morton Cc: Linux Memory Management List , LKML , Johannes Weiner , Michal Hocko , Minchan Kim , Vlastimil Babka , Mel Gorman , kernel-team@lge.com, Ye Xiaolong , Joonsoo Kim Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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: 2020=EB=85=84 3=EC=9B=94 18=EC=9D=BC (=EC=88=98) =EC=98=A4=ED=9B=84 12:33, = =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > From: Joonsoo Kim > > classzone_idx is just different name for high_zoneidx now. > So, integrate them and add some comment to struct alloc_context > in order to reduce future confusion about the meaning of this variable. > > In addition to integration, this patch also renames high_zoneidx > to highest_zoneidx since it represents more precise meaning. > > Signed-off-by: Joonsoo Kim > --- > include/linux/compaction.h | 9 ++-- > include/linux/mmzone.h | 12 ++--- > include/trace/events/compaction.h | 22 ++++---- > include/trace/events/vmscan.h | 14 +++-- > mm/compaction.c | 64 +++++++++++------------ > mm/internal.h | 10 ++-- > mm/memory_hotplug.c | 6 +-- > mm/oom_kill.c | 4 +- > mm/page_alloc.c | 60 +++++++++++----------- > mm/slab.c | 4 +- > mm/slub.c | 4 +- > mm/vmscan.c | 105 ++++++++++++++++++++------------= ------ > 12 files changed, 165 insertions(+), 149 deletions(-) Oops... I miss the important part that documents highest_zoneidx. Please see below. Thanks. ------------------>8------------------ diff --git a/mm/internal.h b/mm/internal.h index 7921150..4bbd10fc 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -115,6 +115,17 @@ struct alloc_context { nodemask_t *nodemask; struct zoneref *preferred_zoneref; int migratetype; + + /* + * highest_zoneidx represents highest usable zone index of + * the allocation request. Due to the nature of the zone, + * memory on lower zone than the highest_zoneidx will be + * protected by lowmem_reserve[highest_zoneidx]. + * + * highest_zoneidx is also used by reclaim/compaction to limit + * the target zone since higher zone than this index cannot be + * usable for this allocation request. + */ enum zone_type highest_zoneidx; bool spread_dirty_pages; };