On Thu, Dec 5, 2024 at 1:07 AM Vlastimil Babka <vbabka@xxxxxxx> wrote: > > On 11/26/24 06:04, Hyeonggon Yoo wrote: > > On Tue, Nov 26, 2024 at 7:38 AM Matthew Wilcox (Oracle) > > <willy@xxxxxxxxxxxxx> wrote: > >> > >> Slab does not need to use the page refcount at all, and it can avoid > >> an atomic operation on page free. Hugetlb wants to delay setting the > >> refcount until it has assembled a complete gigantic page. We already > >> have the ability to freeze a page (safely reduce its reference count to > >> 0), so this patchset adds APIs to allocate and free pages which are in > >> a frozen state. > > > > [+Cc Vlastimil] > > > > I think with this patchset, we can finally remove the memory barriers used > > in isolate_movable_page(), alloc_slab_page(), and __free_slab(), > > because folio_get_nontail_page() should fail for frozen pages? > > Thanks for the heads-up! > > > for reference, the patch that introduced the memory barrier: > > https://lore.kernel.org/linux-mm/Y20BRJmRzRVMzoJw@hyeyoo > > Are you going to sent the necessary patch on top of this series then? :) I will send it after some testing. > We could route it via -mm to avoid waiting a cycle or needing extra > synchronization. It's not a pure slab change anyway... Agreed. Will route it via mm. Best, Hyeonggon > > Thanks, > Vlastimil > > > Best, > > Hyeonggon >