[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3d5a348a-1c99-9cb5-3279-31a9419da032@suse.cz>
Date: Thu, 20 Jan 2022 12:21:30 +0100
From: Vlastimil Babka <vbabka@...e.cz>
To: Liam Howlett <liam.howlett@...cle.com>,
"maple-tree@...ts.infradead.org" <maple-tree@...ts.infradead.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Song Liu <songliubraving@...com>,
Davidlohr Bueso <dave@...olabs.net>,
"Paul E . McKenney" <paulmck@...nel.org>,
Matthew Wilcox <willy@...radead.org>,
Laurent Dufour <ldufour@...ux.ibm.com>,
David Rientjes <rientjes@...gle.com>,
Axel Rasmussen <axelrasmussen@...gle.com>,
Suren Baghdasaryan <surenb@...gle.com>,
Rik van Riel <riel@...riel.com>,
Peter Zijlstra <peterz@...radead.org>,
Michel Lespinasse <walken.cr@...il.com>,
Jerome Glisse <jglisse@...hat.com>,
Minchan Kim <minchan@...gle.com>,
Joel Fernandes <joelaf@...gle.com>,
Rom Lemarchand <romlem@...gle.com>
Subject: Re: [PATCH v4 54/66] mm/memcontrol: Stop using mm->highest_vm_end
On 12/1/21 15:30, Liam Howlett wrote:
> From: "Liam R. Howlett" <Liam.Howlett@...cle.com>
>
> Signed-off-by: Liam R. Howlett <Liam.Howlett@...cle.com>
> ---
> mm/memcontrol.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 781605e92015..ac95b3eca557 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -5808,7 +5808,7 @@ static unsigned long mem_cgroup_count_precharge(struct mm_struct *mm)
> unsigned long precharge;
>
> mmap_read_lock(mm);
> - walk_page_range(mm, 0, mm->highest_vm_end, &precharge_walk_ops, NULL);
> + walk_page_range(mm, 0, -1, &precharge_walk_ops, NULL);
Wouldn't ULONG_MAX look better?
> mmap_read_unlock(mm);
>
> precharge = mc.precharge;
> @@ -6106,9 +6106,7 @@ static void mem_cgroup_move_charge(void)
> * When we have consumed all precharges and failed in doing
> * additional charge, the page walk just aborts.
> */
> - walk_page_range(mc.mm, 0, mc.mm->highest_vm_end, &charge_walk_ops,
> - NULL);
> -
> + walk_page_range(mc.mm, 0, -1, &charge_walk_ops, NULL);
> mmap_read_unlock(mc.mm);
> atomic_dec(&mc.from->moving_account);
> }
Powered by blists - more mailing lists