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: <CAHbLzkp4ggaFo_6Ot9Uu+2fF0md63HDY+m8U7m9ZAN-yS-N+yQ@mail.gmail.com>
Date:   Tue, 27 Apr 2021 13:46:23 -0700
From:   Yang Shi <shy828301@...il.com>
To:     Miaohe Lin <linmiaohe@...wei.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, Zi Yan <ziy@...dia.com>,
        william.kucharski@...cle.com, Matthew Wilcox <willy@...radead.org>,
        Yang Shi <yang.shi@...ux.alibaba.com>,
        aneesh.kumar@...ux.ibm.com, Ralph Campbell <rcampbell@...dia.com>,
        Song Liu <songliubraving@...com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Rik van Riel <riel@...riel.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Minchan Kim <minchan@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux MM <linux-mm@...ck.org>
Subject: Re: [PATCH 2/5] mm/huge_memory.c: use page->deferred_list

On Tue, Apr 27, 2021 at 6:32 AM Miaohe Lin <linmiaohe@...wei.com> wrote:
>
> Now that we can represent the location of ->deferred_list instead of
> ->mapping + ->index, make use of it to improve readability.

Reviewed-by: Yang Shi <shy828301@...il.com>

>
> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
> ---
>  mm/huge_memory.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index 63ed6b25deaa..76ca1eb2a223 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -2868,7 +2868,7 @@ static unsigned long deferred_split_scan(struct shrinker *shrink,
>         spin_lock_irqsave(&ds_queue->split_queue_lock, flags);
>         /* Take pin on all head pages to avoid freeing them under us */
>         list_for_each_safe(pos, next, &ds_queue->split_queue) {
> -               page = list_entry((void *)pos, struct page, mapping);
> +               page = list_entry((void *)pos, struct page, deferred_list);
>                 page = compound_head(page);
>                 if (get_page_unless_zero(page)) {
>                         list_move(page_deferred_list(page), &list);
> @@ -2883,7 +2883,7 @@ static unsigned long deferred_split_scan(struct shrinker *shrink,
>         spin_unlock_irqrestore(&ds_queue->split_queue_lock, flags);
>
>         list_for_each_safe(pos, next, &list) {
> -               page = list_entry((void *)pos, struct page, mapping);
> +               page = list_entry((void *)pos, struct page, deferred_list);
>                 if (!trylock_page(page))
>                         goto next;
>                 /* split_huge_page() removes page from list on success */
> --
> 2.23.0
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ