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]
Message-ID: <87czj6321p.fsf@yhuang6-desk2.ccr.corp.intel.com>
Date:   Tue, 01 Mar 2022 09:16:18 +0800
From:   "Huang, Ying" <ying.huang@...el.com>
To:     Oscar Salvador <osalvador@...e.de>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Mel Gorman <mgorman@...hsingularity.net>,
        Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, Feng Tang <feng.tang@...el.com>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        Michal Hocko <mhocko@...e.com>,
        Rik van Riel <riel@...riel.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Yang Shi <shy828301@...il.com>, Zi Yan <ziy@...dia.com>,
        Wei Xu <weixugc@...gle.com>,
        Shakeel Butt <shakeelb@...gle.com>,
        zhongjiang-ali <zhongjiang-ali@...ux.alibaba.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        Johannes Weiner <hannes@...xchg.org>
Subject: Re: [PATCH -V13 2/3] NUMA balancing: optimize page placement for
 memory tiering system

Hi, Oscar,

Oscar Salvador <osalvador@...e.de> writes:

> On Mon, Feb 21, 2022 at 04:45:28PM +0800, Huang Ying wrote:
>> b. Make kswapd of the fast memory node to reclaim pages until the free
>>    pages are a little more than the high watermark (named as promo
>>    watermark).  Then, if the free pages of the fast memory node reaches
>>    high watermark, and some hot pages need to be promoted, kswapd of the
>>    fast memory node will be waken up to demote more cold pages in the
>>    fast memory node to the slow memory node.  This will free some extra
>>    space in the fast memory node, so the hot pages in the slow memory
>>    node can be promoted to the fast memory node.
>
> The patch looks good to me, but I think I might be confused by the wording
> here.
>
> IIUC, we define a new wmark (wmark_promo) which is higher than
> wmark_high.
> When we cannot migrate a page to another numa node because it has less
> than wmark_high free pages, we wake up kswapd, and we keep reclaiming
> until we either have mark_promo pages free when
> NUMA_BALANCING_MEMORY_TIERING, or mark_high pages free. Is that right?

Yes.  And we only wake up kswapd for promotion when
NUMA_BALANCING_MEMORY_TIERING.

> Because above you say "Then, if the free pages of the fast memory node reaches
> high watermark, and some hot pages need to be promoted..."

What I wanted to say is that

If the free pages of the fast memory will become lower than the high
watermark, and some hot pages need to be promoted...

That is, "reach high watermark" here is from "free pages more than high
watermark" to "free pages lower or equal high watermark".  This appears
confusing.

> but that should read promo watermark instead? Am I missing something?

Sorry for confusing.  How about the following?

 b. Make kswapd of the fast memory node to reclaim pages until the free
    pages are a little more than the high watermark (named as promo
    watermark).  If we want to promote some hot pages from the slow
    memory to the fast memory, but the free pages of the fast memory
    node will become lower than the high watermark after promotion, we
    will wake up kswapd of the fast memory node to demote more cold
    pages in the fast memory node to the slow memory node firstly.  This
    will free some extra space in the fast memory node, so the hot pages
    in the slow memory node can be promoted to the fast memory node.

Best Regards,
Huang, Ying

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ