lkml.org 
[lkml]   [2020]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [External] Re: [PATCH v3 05/21] mm/hugetlb: Introduce pgtable allocation/freeing helpers
    On Tue, Nov 10, 2020 at 02:08:46PM +0800, Muchun Song wrote:
    > The check should be added here.
    >
    > if (!pgtable)
    > return NULL;
    >
    > Just like my previous v2 patch does. In this case, we can drop those
    > checks. What do you think?

    It is too early for me, so bear with me.

    page_huge_pte will only return NULL in case we did not get to preallocate
    any pgtable right?

    What I was talimg about is that
    >
    > > page_huge_pte(page) = list_first_entry_or_null(&pgtable->lru,
    > > struct page, lru);

    here we will get the either a pgtable entry or NULL in case we already consumed
    all entries from the list.
    If that is the case, we can return NULL and let the caller known that we
    are done.

    Am I missing anything?


    --
    Oscar Salvador
    SUSE L3

    \
     
     \ /
      Last update: 2020-11-10 07:34    [W:4.857 / U:0.300 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site