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: <20201109181104.GC17356@linux>
Date:   Mon, 9 Nov 2020 19:11:04 +0100
From:   Oscar Salvador <osalvador@...e.de>
To:     Muchun Song <songmuchun@...edance.com>
Cc:     corbet@....net, mike.kravetz@...cle.com, tglx@...utronix.de,
        mingo@...hat.com, bp@...en8.de, x86@...nel.org, hpa@...or.com,
        dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org,
        viro@...iv.linux.org.uk, akpm@...ux-foundation.org,
        paulmck@...nel.org, mchehab+huawei@...nel.org,
        pawan.kumar.gupta@...ux.intel.com, rdunlap@...radead.org,
        oneukum@...e.com, anshuman.khandual@....com, jroedel@...e.de,
        almasrymina@...gle.com, rientjes@...gle.com, willy@...radead.org,
        mhocko@...e.com, duanxiongchun@...edance.com,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v3 08/21] mm/vmemmap: Initialize page table lock for
 vmemmap

On Sun, Nov 08, 2020 at 10:11:00PM +0800, Muchun Song wrote:
> In the register_page_bootmem_memmap, the slab allocator is not ready
> yet. So when ALLOC_SPLIT_PTLOCKS, we use init_mm.page_table_lock.
> otherwise we use per page table lock(page->ptl). In the later patch,
> we will use the vmemmap page table lock to guard the splitting of
> the vmemmap huge PMD.

I am not sure about this one.
Grabbing init_mm's pagetable lock for specific hugetlb operations does not
seem like a good idea, and we do not know how contented is that one.

I think a better fit would be to find another hook to initialize
page_table_lock at a later stage.
Anyway, we do not need till we are going to perform an operation
on the range, right?

Unless I am missing something, this should be doable in hugetlb_init.

hugetlb_init is part from a init_call that gets called during do_initcalls.
At this time, slab is fully operative.

start_kernel
 kmem_cache_init_late
 kmem_cache_init_late
 ...
 arch_call_rest_init
  rest_init
   kernel_init_freeable
    do_basic_setup
     do_initcalls
      hugetlb_init

-- 
Oscar Salvador
SUSE L3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ