Re: [PATCH v3 1/3] mm: introduce fincore()

From: Naoya Horiguchi
Date: Tue Jul 08 2014 - 15:05:33 EST

On Mon, Jul 07, 2014 at 12:01:41PM -0700, Dave Hansen wrote:
> > +/*
> > + * You can control how the buffer in userspace is filled with this mode
> > + * parameters:
> I agree that we don't have any good mechanisms for looking at the page
> cache from userspace. I've hacked some things up using mincore() and
> they weren't pretty, so I welcome _something_ like this.
> But, is this trying to do too many things at once? Do we have solid use
> cases spelled out for each of these modes? Have we thought out how they
> will be used in practice?
> The biggest question for me, though, is whether we want to start
> designing these per-page interfaces to consider different page sizes, or
> whether we're going to just continue to pretend that the entire world is
> 4k pages. Using FINCORE_BMAP on 1GB hugetlbfs files would be a bit
> silly, for instance.

I didn't answer this question, sorry.

In my option, hugetlbfs pages should be handled as one hugepage (not as
many 4kB pages) to avoid lots of meaningless data transfer, as you pointed
out. And the current patch already works like that.

Naoya Horiguchi
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at