mbox series

[0/4] A few cleanup and fixup patches for migration

Message ID 20220409073846.22286-1-linmiaohe@huawei.com (mailing list archive)
Headers show
Series A few cleanup and fixup patches for migration | expand

Message

Miaohe Lin April 9, 2022, 7:38 a.m. UTC
Hi everyone,
This series contains a few patches to remove unneeded lock page and
PageMovable check, reduce the rcu lock duration. Also we fix potential
pte_unmap on an not mapped pte. More details can be found in the
respective changelogs. Thanks!

---
v1:
  rebase [1] on mainline.

[1] https://lore.kernel.org/lkml/20220304093409.25829-2-linmiaohe@huawei.com/T/
---
Miaohe Lin (4):
  mm/migration: reduce the rcu lock duration
  mm/migration: remove unneeded lock page and PageMovable check
  mm/migration: return errno when isolate_huge_page failed
  mm/migration: fix potential pte_unmap on an not mapped pte

 include/linux/migrate.h |  2 +-
 include/linux/swapops.h |  4 ++--
 mm/filemap.c            | 10 +++++-----
 mm/hugetlb.c            |  2 +-
 mm/migrate.c            | 31 +++++++++++++------------------
 5 files changed, 22 insertions(+), 27 deletions(-)

Comments

Huang, Ying April 12, 2022, 2:25 a.m. UTC | #1
On Sat, 2022-04-09 at 15:38 +0800, Miaohe Lin wrote:
> Hi everyone,
> This series contains a few patches to remove unneeded lock page and
> PageMovable check, reduce the rcu lock duration. Also we fix potential
> pte_unmap on an not mapped pte. More details can be found in the
> respective changelogs. Thanks!

It appears that you ignored my comments for the previous version.  Can
you check it?

Best Regards,
Huang, Ying

> ---
> v1:
>   rebase [1] on mainline.
> 
> [1] https://lore.kernel.org/lkml/20220304093409.25829-2-linmiaohe@huawei.com/T/
> ---
> Miaohe Lin (4):
>   mm/migration: reduce the rcu lock duration
>   mm/migration: remove unneeded lock page and PageMovable check
>   mm/migration: return errno when isolate_huge_page failed
>   mm/migration: fix potential pte_unmap on an not mapped pte
> 
>  include/linux/migrate.h |  2 +-
>  include/linux/swapops.h |  4 ++--
>  mm/filemap.c            | 10 +++++-----
>  mm/hugetlb.c            |  2 +-
>  mm/migrate.c            | 31 +++++++++++++------------------
>  5 files changed, 22 insertions(+), 27 deletions(-)
>
Miaohe Lin April 12, 2022, 3:29 a.m. UTC | #2
On 2022/4/12 10:25, ying.huang@intel.com wrote:
> On Sat, 2022-04-09 at 15:38 +0800, Miaohe Lin wrote:
>> Hi everyone,
>> This series contains a few patches to remove unneeded lock page and
>> PageMovable check, reduce the rcu lock duration. Also we fix potential
>> pte_unmap on an not mapped pte. More details can be found in the
>> respective changelogs. Thanks!
> 
> It appears that you ignored my comments for the previous version.  Can
> you check it?

I do remember [1] and I tried to make isolate_huge_page consistent with isolate_lru_page.
But their return value conventions are different. isolate_huge_page return 0 when
success while isolate_huge_page returns true in this case. So make them consistent
would lead to many code change. I should have added this in my changelog.

Thanks.

[1] https://lore.kernel.org/linux-mm/8735jsgctq.fsf@yhuang6-desk2.ccr.corp.intel.com/


> 
> Best Regards,
> Huang, Ying
> 
>> ---
>> v1:
>>   rebase [1] on mainline.
>>
>> [1] https://lore.kernel.org/lkml/20220304093409.25829-2-linmiaohe@huawei.com/T/
>> ---
>> Miaohe Lin (4):
>>   mm/migration: reduce the rcu lock duration
>>   mm/migration: remove unneeded lock page and PageMovable check
>>   mm/migration: return errno when isolate_huge_page failed
>>   mm/migration: fix potential pte_unmap on an not mapped pte
>>
>>  include/linux/migrate.h |  2 +-
>>  include/linux/swapops.h |  4 ++--
>>  mm/filemap.c            | 10 +++++-----
>>  mm/hugetlb.c            |  2 +-
>>  mm/migrate.c            | 31 +++++++++++++------------------
>>  5 files changed, 22 insertions(+), 27 deletions(-)
>>
> 
> 
> 
> .
>
Huang, Ying April 12, 2022, 6:33 a.m. UTC | #3
On Tue, 2022-04-12 at 11:29 +0800, Miaohe Lin wrote:
> On 2022/4/12 10:25, ying.huang@intel.com wrote:
> > On Sat, 2022-04-09 at 15:38 +0800, Miaohe Lin wrote:
> > > Hi everyone,
> > > This series contains a few patches to remove unneeded lock page and
> > > PageMovable check, reduce the rcu lock duration. Also we fix potential
> > > pte_unmap on an not mapped pte. More details can be found in the
> > > respective changelogs. Thanks!
> > 
> > It appears that you ignored my comments for the previous version.  Can
> > you check it?
> 
> I do remember [1] and I tried to make isolate_huge_page consistent with isolate_lru_page.
> But their return value conventions are different. isolate_huge_page return 0 when
> success while isolate_huge_page returns true in this case. So make them consistent
> would lead to many code change. I should have added this in my changelog.

If you found new problem, you can reply to the original email.  Just
don't ignore the comments.

Best Regards,
Huang, Ying

> Thanks.
> 
> [1] https://lore.kernel.org/linux-mm/8735jsgctq.fsf@yhuang6-desk2.ccr.corp.intel.com/
> 
> 
> > 
> > Best Regards,
> > Huang, Ying
> > 
> > > ---
> > > v1:
> > >   rebase [1] on mainline.
> > > 
> > > [1] https://lore.kernel.org/lkml/20220304093409.25829-2-linmiaohe@huawei.com/T/
> > > ---
> > > Miaohe Lin (4):
> > >   mm/migration: reduce the rcu lock duration
> > >   mm/migration: remove unneeded lock page and PageMovable check
> > >   mm/migration: return errno when isolate_huge_page failed
> > >   mm/migration: fix potential pte_unmap on an not mapped pte
> > > 
> > >  include/linux/migrate.h |  2 +-
> > >  include/linux/swapops.h |  4 ++--
> > >  mm/filemap.c            | 10 +++++-----
> > >  mm/hugetlb.c            |  2 +-
> > >  mm/migrate.c            | 31 +++++++++++++------------------
> > >  5 files changed, 22 insertions(+), 27 deletions(-)
> > > 
> > 
> > 
> > 
> > .
> > 
>
Huang, Ying April 12, 2022, 7 a.m. UTC | #4
On Tue, 2022-04-12 at 11:29 +0800, Miaohe Lin wrote:
> On 2022/4/12 10:25, ying.huang@intel.com wrote:
> > On Sat, 2022-04-09 at 15:38 +0800, Miaohe Lin wrote:
> > > Hi everyone,
> > > This series contains a few patches to remove unneeded lock page and
> > > PageMovable check, reduce the rcu lock duration. Also we fix potential
> > > pte_unmap on an not mapped pte. More details can be found in the
> > > respective changelogs. Thanks!
> > 
> > It appears that you ignored my comments for the previous version.  Can
> > you check it?
> 
> I do remember [1] and I tried to make isolate_huge_page consistent with isolate_lru_page.
> But their return value conventions are different. isolate_huge_page return 0 when
> success while isolate_huge_page returns true in this case. So make them consistent
> would lead to many code change. I should have added this in my changelog.

I found that there are only 7 callers of isolate_huge_page().  It sounds
like something that is still doable.

Best Regards,
Huang, Ying

> Thanks.
> 
> [1] https://lore.kernel.org/linux-mm/8735jsgctq.fsf@yhuang6-desk2.ccr.corp.intel.com/
> 
> 
> > 
> > Best Regards,
> > Huang, Ying
> > 
> > > ---
> > > v1:
> > >   rebase [1] on mainline.
> > > 
> > > [1] https://lore.kernel.org/lkml/20220304093409.25829-2-linmiaohe@huawei.com/T/
> > > ---
> > > Miaohe Lin (4):
> > >   mm/migration: reduce the rcu lock duration
> > >   mm/migration: remove unneeded lock page and PageMovable check
> > >   mm/migration: return errno when isolate_huge_page failed
> > >   mm/migration: fix potential pte_unmap on an not mapped pte
> > > 
> > >  include/linux/migrate.h |  2 +-
> > >  include/linux/swapops.h |  4 ++--
> > >  mm/filemap.c            | 10 +++++-----
> > >  mm/hugetlb.c            |  2 +-
> > >  mm/migrate.c            | 31 +++++++++++++------------------
> > >  5 files changed, 22 insertions(+), 27 deletions(-)
> > > 
> > 
> > 
> > 
> > .
> > 
>
Miaohe Lin April 12, 2022, 8:59 a.m. UTC | #5
On 2022/4/12 14:33, ying.huang@intel.com wrote:
> On Tue, 2022-04-12 at 11:29 +0800, Miaohe Lin wrote:
>> On 2022/4/12 10:25, ying.huang@intel.com wrote:
>>> On Sat, 2022-04-09 at 15:38 +0800, Miaohe Lin wrote:
>>>> Hi everyone,
>>>> This series contains a few patches to remove unneeded lock page and
>>>> PageMovable check, reduce the rcu lock duration. Also we fix potential
>>>> pte_unmap on an not mapped pte. More details can be found in the
>>>> respective changelogs. Thanks!
>>>
>>> It appears that you ignored my comments for the previous version.  Can
>>> you check it?
>>
>> I do remember [1] and I tried to make isolate_huge_page consistent with isolate_lru_page.
>> But their return value conventions are different. isolate_huge_page return 0 when
>> success while isolate_huge_page returns true in this case. So make them consistent
>> would lead to many code change. I should have added this in my changelog.
> 
> If you found new problem, you can reply to the original email.  Just
> don't ignore the comments.

Sorry about it. I would take care of this next time. Thanks!

> 
> Best Regards,
> Huang, Ying
> 
>> Thanks.
>>
>> [1] https://lore.kernel.org/linux-mm/8735jsgctq.fsf@yhuang6-desk2.ccr.corp.intel.com/
>>
>>
>>>
>>> Best Regards,
>>> Huang, Ying
>>>
>>>> ---
>>>> v1:
>>>>   rebase [1] on mainline.
>>>>
>>>> [1] https://lore.kernel.org/lkml/20220304093409.25829-2-linmiaohe@huawei.com/T/
>>>> ---
>>>> Miaohe Lin (4):
>>>>   mm/migration: reduce the rcu lock duration
>>>>   mm/migration: remove unneeded lock page and PageMovable check
>>>>   mm/migration: return errno when isolate_huge_page failed
>>>>   mm/migration: fix potential pte_unmap on an not mapped pte
>>>>
>>>>  include/linux/migrate.h |  2 +-
>>>>  include/linux/swapops.h |  4 ++--
>>>>  mm/filemap.c            | 10 +++++-----
>>>>  mm/hugetlb.c            |  2 +-
>>>>  mm/migrate.c            | 31 +++++++++++++------------------
>>>>  5 files changed, 22 insertions(+), 27 deletions(-)
>>>>
>>>
>>>
>>>
>>> .
>>>
>>
> 
> 
> .
>
Miaohe Lin April 12, 2022, 9:06 a.m. UTC | #6
On 2022/4/12 15:00, ying.huang@intel.com wrote:
> On Tue, 2022-04-12 at 11:29 +0800, Miaohe Lin wrote:
>> On 2022/4/12 10:25, ying.huang@intel.com wrote:
>>> On Sat, 2022-04-09 at 15:38 +0800, Miaohe Lin wrote:
>>>> Hi everyone,
>>>> This series contains a few patches to remove unneeded lock page and
>>>> PageMovable check, reduce the rcu lock duration. Also we fix potential
>>>> pte_unmap on an not mapped pte. More details can be found in the
>>>> respective changelogs. Thanks!
>>>
>>> It appears that you ignored my comments for the previous version.  Can
>>> you check it?
>>
>> I do remember [1] and I tried to make isolate_huge_page consistent with isolate_lru_page.
>> But their return value conventions are different. isolate_huge_page return 0 when
>> success while isolate_huge_page returns true in this case. So make them consistent
>> would lead to many code change. I should have added this in my changelog.
> 
> I found that there are only 7 callers of isolate_huge_page().  It sounds
> like something that is still doable.

Fine, I will try to do this. :)

Thanks!

> 
> Best Regards,
> Huang, Ying
> 
>> Thanks.
>>
>> [1] https://lore.kernel.org/linux-mm/8735jsgctq.fsf@yhuang6-desk2.ccr.corp.intel.com/
>>
>>
>>>
>>> Best Regards,
>>> Huang, Ying
>>>
>>>> ---
>>>> v1:
>>>>   rebase [1] on mainline.
>>>>
>>>> [1] https://lore.kernel.org/lkml/20220304093409.25829-2-linmiaohe@huawei.com/T/
>>>> ---
>>>> Miaohe Lin (4):
>>>>   mm/migration: reduce the rcu lock duration
>>>>   mm/migration: remove unneeded lock page and PageMovable check
>>>>   mm/migration: return errno when isolate_huge_page failed
>>>>   mm/migration: fix potential pte_unmap on an not mapped pte
>>>>
>>>>  include/linux/migrate.h |  2 +-
>>>>  include/linux/swapops.h |  4 ++--
>>>>  mm/filemap.c            | 10 +++++-----
>>>>  mm/hugetlb.c            |  2 +-
>>>>  mm/migrate.c            | 31 +++++++++++++------------------
>>>>  5 files changed, 22 insertions(+), 27 deletions(-)
>>>>
>>>
>>>
>>>
>>> .
>>>
>>
> 
> 
> 
> .
>