[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201117211001.GY29991@casper.infradead.org>
Date: Tue, 17 Nov 2020 21:10:01 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Zi Yan <ziy@...dia.com>
Cc: linux-mm@...ck.org,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Roman Gushchin <guro@...com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
Yang Shi <shy828301@...il.com>,
Michal Hocko <mhocko@...nel.org>,
John Hubbard <jhubbard@...dia.com>,
Ralph Campbell <rcampbell@...dia.com>,
David Nellans <dnellans@...dia.com>
Subject: Re: [RFC PATCH 3/6] mm: page_owner: add support for splitting to any
order in split page_owner.
On Wed, Nov 11, 2020 at 03:40:05PM -0500, Zi Yan wrote:
> - for (i = 0; i < nr; i++) {
> + for (i = 0; i < nr; i += (1 << new_order)) {
> page_owner = get_page_owner(page_ext);
> - page_owner->order = 0;
> + page_owner->order = new_order;
> page_ext = page_ext_next(page_ext);
> }
This doesn't do what you're hoping it will. It's going to set ->order to
new_order for the first N pages instead of every 1/N pages.
You'll need to do something like
page_ext = lookup_page_ext(page + i);
or add a new page_ext_add(page_ext, 1 << new_order);
Powered by blists - more mailing lists