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-next>] [day] [month] [year] [list]
Date:   Mon,  8 Feb 2021 11:38:10 +0100
From:   Oscar Salvador <osalvador@...e.de>
To:     Mike Kravetz <mike.kravetz@...cle.com>
Cc:     David Hildenbrand <david@...hat.com>,
        Muchun Song <songmuchun@...edance.com>,
        Michal Hocko <mhocko@...nel.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, Oscar Salvador <osalvador@...e.de>
Subject: [RFC PATCH 0/2] Make alloc_contig_range handle Hugetlb pages

Hi,

I promised to Mike to have a look into this a few weeks ago.
This is my first attempt.

I carried out some tests with a module that tries to allocate with
alloc_contig_range() from a range where we have free and in-use hugetlb
pages.
So far I did not spot any problem and it worked.

Please, note that it is not fully completed, as some things remain to be sorted
out (see list below), but I wanted to publish it to see whether the way I am
going makes sense to people, or I am doing something worrisome.

E.g:
 - What happens when we allocated a new hugetlb page, but we cannot dissolve
   the old one? (should not really happen (tm))
 - When allocating the new hugetlb page I try to do it in the same node
   the old one is. Should we be more flexible and allow to fallback to
   other nodes?
   Userspace can request hugetlb on specific nodes [1], but it can also
   request them through generic interfaces [2].
 - Problems I did not foresee yet

 [1] /sys/devices/system/node/nodeX/hugepages/*
 [2] /proc/sys/vm/nr_hugepages or /sys/kernel/mm/hugepages/*

Oscar Salvador (2):
  mm,page_alloc: Make alloc_contig_range handle in-use hugetlb pages
  mm,page_alloc: Make alloc_contig_range handle free hugetlb pages

 include/linux/hugetlb.h |  6 ++++++
 mm/compaction.c         | 28 ++++++++++++++++++++++++++++
 mm/hugetlb.c            | 35 +++++++++++++++++++++++++++++++++++
 mm/vmscan.c             |  5 +++--
 4 files changed, 72 insertions(+), 2 deletions(-)

-- 
2.16.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ