Re: [PATCH v3 18/25] mm: Allow large pages to be added to the page cache

2020-06-06 Thread Matthew Wilcox
On Sun, May 03, 2020 at 08:10:36PM -0700, Matthew Wilcox wrote: > On Wed, Apr 29, 2020 at 06:36:50AM -0700, Matthew Wilcox wrote: > > @@ -886,7 +906,7 @@ static int __add_to_page_cache_locked(struct page *page, > > /* Leave page->index set: truncation relies upon it */ > > if (!huge) > >

Re: [PATCH v3 18/25] mm: Allow large pages to be added to the page cache

2020-05-06 Thread Yang Shi
On Sun, May 3, 2020 at 8:10 PM Matthew Wilcox wrote: > > On Wed, Apr 29, 2020 at 06:36:50AM -0700, Matthew Wilcox wrote: > > @@ -886,7 +906,7 @@ static int __add_to_page_cache_locked(struct page *page, > > /* Leave page->index set: truncation relies upon it */ > > if (!huge) > >

Re: [PATCH v3 18/25] mm: Allow large pages to be added to the page cache

2020-05-03 Thread Matthew Wilcox
On Wed, Apr 29, 2020 at 06:36:50AM -0700, Matthew Wilcox wrote: > @@ -886,7 +906,7 @@ static int __add_to_page_cache_locked(struct page *page, > /* Leave page->index set: truncation relies upon it */ > if (!huge) > mem_cgroup_cancel_charge(page, memcg, false); > -

[PATCH v3 18/25] mm: Allow large pages to be added to the page cache

2020-04-29 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" We return -EEXIST if there are any non-shadow entries in the page cache in the range covered by the large page. If there are multiple shadow entries in the range, we set *shadowp to one of them (currently the one at the highest index). If that turns out to be