mbox series

[0/5] Cleanup and fixup for huge_memory

Message ID 20210427133214.2270207-1-linmiaohe@huawei.com (mailing list archive)
Headers show
Series Cleanup and fixup for huge_memory | expand

Message

Miaohe Lin April 27, 2021, 1:32 p.m. UTC
Hi all,
This series contains cleanups to remove dedicated macro and remove
unnecessary tlb_remove_page_size() for huge zero pmd. Also this adds
missing read-only THP checking for transparent_hugepage_enabled() and
avoids discarding hugepage if other processes are mapping it. More
details can be found in the respective changelogs. Thanks!

Miaohe Lin (5):
  mm/huge_memory.c: remove dedicated macro HPAGE_CACHE_INDEX_MASK
  mm/huge_memory.c: use page->deferred_list
  mm/huge_memory.c: add missing read-only THP checking in
    transparent_hugepage_enabled()
  mm/huge_memory.c: remove unnecessary tlb_remove_page_size() for huge
    zero pmd
  mm/huge_memory.c: don't discard hugepage if other processes are
    mapping it

 include/linux/huge_mm.h |  6 ++----
 mm/huge_memory.c        | 12 ++++++------
 2 files changed, 8 insertions(+), 10 deletions(-)

Comments

Anshuman Khandual April 28, 2021, 3:10 a.m. UTC | #1
On 4/27/21 7:02 PM, Miaohe Lin wrote:
> Hi all,
> This series contains cleanups to remove dedicated macro and remove
> unnecessary tlb_remove_page_size() for huge zero pmd. Also this adds
> missing read-only THP checking for transparent_hugepage_enabled() and
> avoids discarding hugepage if other processes are mapping it. More
> details can be found in the respective changelogs. Thanks!
> 
> Miaohe Lin (5):
>   mm/huge_memory.c: remove dedicated macro HPAGE_CACHE_INDEX_MASK
>   mm/huge_memory.c: use page->deferred_list
>   mm/huge_memory.c: add missing read-only THP checking in
>     transparent_hugepage_enabled()
>   mm/huge_memory.c: remove unnecessary tlb_remove_page_size() for huge
>     zero pmd
>   mm/huge_memory.c: don't discard hugepage if other processes are
>     mapping it

I guess it might be just better to split the series into cleans-ups
without functional change and then fixes separately.
Miaohe Lin April 28, 2021, 8:32 a.m. UTC | #2
On 2021/4/28 11:10, Anshuman Khandual wrote:
> 
> 
> On 4/27/21 7:02 PM, Miaohe Lin wrote:
>> Hi all,
>> This series contains cleanups to remove dedicated macro and remove
>> unnecessary tlb_remove_page_size() for huge zero pmd. Also this adds
>> missing read-only THP checking for transparent_hugepage_enabled() and
>> avoids discarding hugepage if other processes are mapping it. More
>> details can be found in the respective changelogs. Thanks!
>>
>> Miaohe Lin (5):
>>   mm/huge_memory.c: remove dedicated macro HPAGE_CACHE_INDEX_MASK
>>   mm/huge_memory.c: use page->deferred_list
>>   mm/huge_memory.c: add missing read-only THP checking in
>>     transparent_hugepage_enabled()
>>   mm/huge_memory.c: remove unnecessary tlb_remove_page_size() for huge
>>     zero pmd
>>   mm/huge_memory.c: don't discard hugepage if other processes are
>>     mapping it
> 
> I guess it might be just better to split the series into cleans-ups
> without functional change and then fixes separately.

Sounds reasonable. But IMO all of these changes are pretty simple and independent,
maybe it's ok to keep these together?

Many thanks for comment.

> .
>