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] [day] [month] [year] [list]
Message-ID: <f697ff2c-a6e8-71aa-b34b-bffc048b886c@suse.cz>
Date:   Fri, 1 Mar 2019 13:30:18 +0100
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Andrey Ryabinin <aryabinin@...tuozzo.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Mel Gorman <mgorman@...hsingularity.net>,
        Johannes Weiner <hannes@...xchg.org>,
        Michal Hocko <mhocko@...nel.org>,
        Rik van Riel <riel@...riel.com>,
        William Kucharski <william.kucharski@...cle.com>,
        John Hubbard <jhubbard@...dia.com>
Subject: Re: [PATCH]
 mm-remove-zone_lru_lock-function-access-lru_lock-directly-fix

On 3/1/19 1:16 PM, Andrey Ryabinin wrote:
> A slightly better version of __split_huge_page();
> 
> Signed-off-by: Andrey Ryabinin <aryabinin@...tuozzo.com>

Ack.

> Cc: Vlastimil Babka <vbabka@...e.cz>
> Cc: Mel Gorman <mgorman@...hsingularity.net>
> Cc: Johannes Weiner <hannes@...xchg.org>
> Cc: Michal Hocko <mhocko@...nel.org>
> Cc: Rik van Riel <riel@...riel.com>
> Cc: William Kucharski <william.kucharski@...cle.com>
> Cc: John Hubbard <jhubbard@...dia.com>
> ---
>  mm/huge_memory.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index 4ccac6b32d49..fcf657886b4b 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -2440,11 +2440,11 @@ static void __split_huge_page(struct page *page, struct list_head *list,
>  		pgoff_t end, unsigned long flags)
>  {
>  	struct page *head = compound_head(page);
> -	struct zone *zone = page_zone(head);
> +	pg_data_t *pgdat = page_pgdat(head);
>  	struct lruvec *lruvec;
>  	int i;
>  
> -	lruvec = mem_cgroup_page_lruvec(head, zone->zone_pgdat);
> +	lruvec = mem_cgroup_page_lruvec(head, pgdat);
>  
>  	/* complete memcg works before add pages to LRU */
>  	mem_cgroup_split_huge_fixup(head);
> @@ -2475,7 +2475,7 @@ static void __split_huge_page(struct page *page, struct list_head *list,
>  		xa_unlock(&head->mapping->i_pages);
>  	}
>  
> -	spin_unlock_irqrestore(&page_pgdat(head)->lru_lock, flags);
> +	spin_unlock_irqrestore(&pgdat->lru_lock, flags);
>  
>  	remap_page(head);
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ