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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8cdb105c-2b7b-1997-ed82-22f4bb25638c@linux.microsoft.com>
Date:   Wed, 30 Sep 2020 13:47:50 -0700
From:   Vijay Balakrishna <vijayb@...ux.microsoft.com>
To:     Mike Kravetz <mike.kravetz@...cle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Oleg Nesterov <oleg@...hat.com>,
        Song Liu <songliubraving@...com>,
        Andrea Arcangeli <aarcange@...hat.com>,
        Pavel Tatashin <pasha.tatashin@...een.com>,
        Michal Hocko <mhocko@...e.com>,
        Allen Pais <apais@...rosoft.com>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [v5] mm: khugepaged: recalculate min_free_kbytes after memory
 hotplug as expected by khugepaged



On 9/30/2020 11:20 AM, Mike Kravetz wrote:
> On 9/29/20 9:49 AM, Vijay Balakrishna wrote:
>> When memory is hotplug added or removed the min_free_kbytes should be
>> recalculated based on what is expected by khugepaged.  Currently
>> after hotplug, min_free_kbytes will be set to a lower default and higher
>> default set when THP enabled is lost.  This change restores min_free_kbytes
>> as expected for THP consumers.
>>
>> Fixes: f000565adb77 ("thp: set recommended min free kbytes")
>>
>> Signed-off-by: Vijay Balakrishna <vijayb@...ux.microsoft.com>
>> Cc: stable@...r.kernel.org
>> Reviewed-by: Pavel Tatashin <pasha.tatashin@...een.com>
>> Acked-by: Michal Hocko <mhocko@...e.com>
> 
> Sorry for jumping in so late.  Should we use this as an opportunity to
> also fix up the messages logged when (re)calculating mfk?  They are wrong
> and could be quite confusing.


Sure.  Please share your thoughts regarding appropriate message.  Here 
is what I'm thinking

pr_warn("min_free_kbytes is not updated to %d because current value %d 
is preferred\n", new_min_free_kbytes, min_free_kbytes);

If above message is reasonable I can post a new revision (v6).

Thanks,
Vijay

> For example consider the following sequence
> of operations and corresponding log messages produced.
> 
> Freshly booted VM with 2 nodes and 8GB memory:
> # cat /proc/sys/vm/min_free_kbytes
> 90112
> # echo 90000 > /proc/sys/vm/min_free_kbytes
> # cat /proc/sys/vm/min_free_kbytes
> 90000
> # echo 0 > /sys/devices/system/node/node1/memory56/online
> [  135.099947] Offlined Pages 32768
> [  135.102362] min_free_kbytes is not updated to 11241 because user defined value 90000 is preferred
> [  135.109070] khugepaged: raising min_free_kbytes from 90000 to 90112 to help t
> ransparent hugepage allocations
> # cat /proc/sys/vm/min_free_kbytes
> 90112
> # echo 1 > /sys/devices/system/node/node1/memory56/online
> [  231.656075] min_free_kbytes is not updated to 11334 because user defined value 90000 is preferred
> # cat /proc/sys/vm/min_free_kbytes
> 90112
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ