lkml.org 
[lkml]   [2020]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 00/25] Large pages in the page cache
On Wed, Apr 29, 2020 at 06:40:02PM +0300, Kirill A. Shutemov wrote:
> On Wed, Apr 29, 2020 at 06:36:32AM -0700, Matthew Wilcox wrote:
> > From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
> >
> > This patch set does not pass xfstests. Test at your own risk. It is
> > based on the readahead rewrite which is in Andrew's tree. The large
> > pages somehow manage to fall off the LRU, so the test VM quickly runs
> > out of memory and freezes. To reproduce:
> >
> > # mkfs.xfs /dev/sdb && mount /dev/sdb /mnt && dd if=/dev/zero bs=1M count=2048 of=/mnt/bigfile && sync && sleep 2 && sync && echo 1 >/proc/sys/vm/drop_caches
> > # /host/home/willy/kernel/xarray-2/tools/vm/page-types | grep thp
> > 0x0000000000401800 511 1 ___________Ma_________t____________________ mmap,anonymous,thp
> > 0x0000000000405868 1 0 ___U_lA____Ma_b_______t____________________ uptodate,lru,active,mmap,anonymous,swapbacked,thp
> > # dd if=/mnt/bigfile of=/dev/null bs=2M count=5
> > # /host/home/willy/kernel/xarray-2/tools/vm/page-types | grep thp
> > 0x0000000000400000 2516 9 ______________________t____________________ thp
> > 0x0000000000400028 1 0 ___U_l________________t____________________ uptodate,lru,thp
> > 0x000000000040006c 106 0 __RU_lA_______________t____________________ referenced,uptodate,lru,active,thp
>
> Note that you have 107 pages on LRU. It is only head pages. With order-5
> pages it is over 13MiB.
>
> Looks like everything is fine.

/proc/kpageflags reads page's flag bit directly instead of relying on
PageLRU:

u |= kpf_copy_bit(k, KPF_LRU, PG_lru);

Tail pages don't have this bit set. They rely on head page's flag for
PageLRU().

It would be nice to get it fixed, but I guess it is too late. Somebody may
rely on the current behaviour by now.

--
Kirill A. Shutemov

\
 
 \ /
  Last update: 2020-04-29 17:47    [W:1.754 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site