Re: [PATCH v3 3/3] mm: restructure memfd code

From: Mike Kravetz
Date: Mon Apr 09 2018 - 23:03:55 EST


On 04/09/2018 06:41 PM, Matthew Wilcox wrote:
> On Mon, Apr 09, 2018 at 04:05:05PM -0700, Mike Kravetz wrote:
>> +/*
>> + * We need a tag: a new tag would expand every radix_tree_node by 8 bytes,
>> + * so reuse a tag which we firmly believe is never set or cleared on shmem.
>> + */
>> +#define SHMEM_TAG_PINNED PAGECACHE_TAG_TOWRITE
>
> Do we also firmly believe it's never used on hugetlbfs?
>

Yes. hugetlbfs is memory resident only with no writeback.
This comment and name should have been updated when hugetlbfs support was
added.

Also, ideally all the memfd related function names of the form shmem_* should
have been changed to memfd_* when hugetlbfs support was added. Some of them
were changed, but not all.

I can clean all this up. But, I would want to do it in patch 2 of the series.
That is where other cleanup such as this was done before code movement.

Will wait a little while for any additional comments before sending series
again.
--
Mike Kravetz