lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 18 Mar 2020 12:42:13 +0900
From:   Joonsoo Kim <js1304@...il.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Linux Memory Management List <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Johannes Weiner <hannes@...xchg.org>,
        Michal Hocko <mhocko@...nel.org>,
        Minchan Kim <minchan@...nel.org>,
        Vlastimil Babka <vbabka@...e.cz>,
        Mel Gorman <mgorman@...hsingularity.net>, kernel-team@....com,
        Ye Xiaolong <xiaolong.ye@...el.com>,
        Joonsoo Kim <iamjoonsoo.kim@....com>
Subject: Re: [PATCH v2 2/2] mm/page_alloc: integrate classzone_idx and high_zoneidx

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ