lkml.org 
[lkml]   [2022]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv5 02/12] mm: Add support for unaccepted memory
On Tue, May 03, 2022 at 10:21:03PM +0200, David Hildenbrand wrote:
>
> >
> > +/*
> > + * Page acceptance can be very slow. Do not call under critical locks.
> > + */
> > +static void accept_page(struct page *page, unsigned int order)
> > +{
> > + phys_addr_t start = page_to_phys(page);
> > + int i;
> > +
> > + accept_memory(start, start + (PAGE_SIZE << order));
> > +
> > + for (i = 0; i < (1 << order); i++) {
> > + if (PageUnaccepted(page + i))
> > + __ClearPageUnaccepted(page + i);
> > + }
> > +}
>
> What was the rationale of leaving PageUnaccepted() set on sub-pages when
> merging pages?
>
> I'd just clear the flag when merging and avoid the loop here. You could
> even assert here that we don't have any PageUnaccepted() on tail pages.

Okay, fair enough. I will change the code.

--
Kirill A. Shutemov

\
 
 \ /
  Last update: 2022-05-06 02:54    [W:0.089 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site