linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Joonsoo Kim <js1304@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Linux Memory Management List <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	 Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@kernel.org>,
	Minchan Kim <minchan@kernel.org>,
	 Vlastimil Babka <vbabka@suse.cz>,
	Mel Gorman <mgorman@techsingularity.net>,
	kernel-team@lge.com,  Ye Xiaolong <xiaolong.ye@intel.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>
Subject: Re: [PATCH v2 2/2] mm/page_alloc: integrate classzone_idx and high_zoneidx
Date: Wed, 18 Mar 2020 12:42:13 +0900	[thread overview]
Message-ID: <CAAmzW4Nmo1EYkmHH5HHM=oTKjYqtqA_3TUr27yOJD4umh0suiA@mail.gmail.com> (raw)
In-Reply-To: <1584502378-12609-3-git-send-email-iamjoonsoo.kim@lge.com>

2020년 3월 18일 (수) 오후 12:33, <js1304@gmail.com>님이 작성:
>
> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
>
> 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 <iamjoonsoo.kim@lge.com>
> ---
>  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;
 };


  reply	other threads:[~2020-03-18  3:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-18  3:32 [PATCH v2 0/2] integrate classzone_idx and high_zoneidx js1304
2020-03-18  3:32 ` [PATCH v2 1/2] mm/page_alloc: use ac->high_zoneidx for classzone_idx js1304
2020-03-18 21:29   ` David Rientjes
2020-03-19  8:57     ` Joonsoo Kim
2020-03-19 12:21       ` Vlastimil Babka
2020-03-20  7:33         ` Joonsoo Kim
2020-03-19 12:29   ` Vlastimil Babka
2020-03-18  3:32 ` [PATCH v2 2/2] mm/page_alloc: integrate classzone_idx and high_zoneidx js1304
2020-03-18  3:42   ` Joonsoo Kim [this message]
2020-03-19 12:32   ` Vlastimil Babka
2020-03-20  7:40     ` Joonsoo Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAmzW4Nmo1EYkmHH5HHM=oTKjYqtqA_3TUr27yOJD4umh0suiA@mail.gmail.com' \
    --to=js1304@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=kernel-team@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@kernel.org \
    --cc=minchan@kernel.org \
    --cc=vbabka@suse.cz \
    --cc=xiaolong.ye@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).