* [PATCH] mm-remove-zone_lru_lock-function-access-lru_lock-directly-fix
@ 2019-03-01 12:16 Andrey Ryabinin
2019-03-01 12:30 ` Vlastimil Babka
0 siblings, 1 reply; 2+ messages in thread
From: Andrey Ryabinin @ 2019-03-01 12:16 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-mm, linux-kernel, Andrey Ryabinin, Vlastimil Babka,
Mel Gorman, Johannes Weiner, Michal Hocko, Rik van Riel,
William Kucharski, John Hubbard
A slightly better version of __split_huge_page();
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: William Kucharski <william.kucharski@oracle.com>
Cc: John Hubbard <jhubbard@nvidia.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);
--
2.19.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mm-remove-zone_lru_lock-function-access-lru_lock-directly-fix
2019-03-01 12:16 [PATCH] mm-remove-zone_lru_lock-function-access-lru_lock-directly-fix Andrey Ryabinin
@ 2019-03-01 12:30 ` Vlastimil Babka
0 siblings, 0 replies; 2+ messages in thread
From: Vlastimil Babka @ 2019-03-01 12:30 UTC (permalink / raw)
To: Andrey Ryabinin, Andrew Morton
Cc: linux-mm, linux-kernel, Mel Gorman, Johannes Weiner, Michal Hocko,
Rik van Riel, William Kucharski, John Hubbard
On 3/1/19 1:16 PM, Andrey Ryabinin wrote:
> A slightly better version of __split_huge_page();
>
> Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Ack.
> Cc: Vlastimil Babka <vbabka@suse.cz>
> Cc: Mel Gorman <mgorman@techsingularity.net>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Michal Hocko <mhocko@kernel.org>
> Cc: Rik van Riel <riel@surriel.com>
> Cc: William Kucharski <william.kucharski@oracle.com>
> Cc: John Hubbard <jhubbard@nvidia.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);
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-01 12:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-01 12:16 [PATCH] mm-remove-zone_lru_lock-function-access-lru_lock-directly-fix Andrey Ryabinin
2019-03-01 12:30 ` Vlastimil Babka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).