Re: [patch 1/2] mm, shmem: add thp fault alloc and fallback stats

From: David Rientjes
Date: Fri Mar 06 2020 - 16:27:55 EST


On Fri, 6 Mar 2020, Yang Shi wrote:

> > > > I think we can choose to either include file allocations into both
> > > > thp_fault_alloc and thp_fault_fallback or we can exclude them from both of
> > > > them. I don't think we can account for only one of them.
> > >
> > > How's about the 3rd option, adding THP_FILE_FALLBACK.
> >
> > I like this option.
> >
> > Problem with THP_FAULT_* is that shmem_getpage_gfp() is called not only
> > from fault path, but also from syscalls.
>
> I found another usecase for THP_FILE_FALLBACK. I wanted to measure
> file THP allocation success rate in our uecase. It looks nr_file_alloc
> / (nr_file_alloc + nr_file_fallback) is the most simple way.
>
> David, are you still working on this patch?
>

Yes, I have a refresh to send out. I don't enable CONFIG_FS_DAX but the
THP_FAULT_FALLBACK there seems somewhat out of place. It's not
necessarily within the scope of my patchset but thought I'd mention it if
someone had strong feelings about whether the DAX cases should be
separated out as well.