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

From: Mike Kravetz
Date: Tue Apr 10 2018 - 19:55:38 EST


On 04/09/2018 08:03 PM, Mike Kravetz wrote:
> 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.

Cleanups were made in an updated patch 2. This update is simply based on
the new cleanups made in patch 2. No functional changes from previous
version.