2019-07-08 11:52:18

by Wei Yang

[permalink] [raw]
Subject: [PATCH] mm: remove redundant assignment of entry

Since ptent will not be changed after previous assignment of entry, it
is not necessary to do the assignment again.

Signed-off-by: Wei Yang <[email protected]>
---
mm/memory.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/mm/memory.c b/mm/memory.c
index ddf20bd0c317..d108bb979a08 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1127,7 +1127,6 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,
if (unlikely(details))
continue;

- entry = pte_to_swp_entry(ptent);
if (!non_swap_entry(entry))
rss[MM_SWAPENTS]--;
else if (is_migration_entry(entry)) {
--
2.17.1


2019-07-08 19:27:40

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [PATCH] mm: remove redundant assignment of entry

On Mon, Jul 08, 2019 at 04:27:40PM +0800, Wei Yang wrote:
> Since ptent will not be changed after previous assignment of entry, it
> is not necessary to do the assignment again.
>
> Signed-off-by: Wei Yang <[email protected]>

Acked-by: Matthew Wilcox (Oracle) <[email protected]>

2019-09-14 14:24:08

by Wei Yang

[permalink] [raw]
Subject: Re: [PATCH] mm: remove redundant assignment of entry

On Mon, Jul 08, 2019 at 04:27:40PM +0800, Wei Yang wrote:
>Since ptent will not be changed after previous assignment of entry, it
>is not necessary to do the assignment again.
>

Sounds this one is lost in the time line :-)

>Signed-off-by: Wei Yang <[email protected]>
>---
> mm/memory.c | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/mm/memory.c b/mm/memory.c
>index ddf20bd0c317..d108bb979a08 100644
>--- a/mm/memory.c
>+++ b/mm/memory.c
>@@ -1127,7 +1127,6 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,
> if (unlikely(details))
> continue;
>
>- entry = pte_to_swp_entry(ptent);
> if (!non_swap_entry(entry))
> rss[MM_SWAPENTS]--;
> else if (is_migration_entry(entry)) {
>--
>2.17.1

--
Wei Yang
Help you, Help me

2019-09-17 07:35:15

by Will Deacon

[permalink] [raw]
Subject: Re: [PATCH] mm: remove redundant assignment of entry

On Sat, Sep 14, 2019 at 12:03:26AM +0000, Wei Yang wrote:
> On Mon, Jul 08, 2019 at 04:27:40PM +0800, Wei Yang wrote:
> >Since ptent will not be changed after previous assignment of entry, it
> >is not necessary to do the assignment again.
> >
>
> Sounds this one is lost in the time line :-)

Don't think so -- looks like it's in linux-next [1] via akpm to me.

Will

[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b47011719e5c05aa9dc78fe76a7e46075f422a45

2019-09-17 09:26:19

by Wei Yang

[permalink] [raw]
Subject: Re: [PATCH] mm: remove redundant assignment of entry

On Mon, Sep 16, 2019 at 10:15:16PM +0100, Will Deacon wrote:
>On Sat, Sep 14, 2019 at 12:03:26AM +0000, Wei Yang wrote:
>> On Mon, Jul 08, 2019 at 04:27:40PM +0800, Wei Yang wrote:
>> >Since ptent will not be changed after previous assignment of entry, it
>> >is not necessary to do the assignment again.
>> >
>>
>> Sounds this one is lost in the time line :-)
>
>Don't think so -- looks like it's in linux-next [1] via akpm to me.
>

Ah, thanks. I may miss some message.

>Will
>
>[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b47011719e5c05aa9dc78fe76a7e46075f422a45

--
Wei Yang
Help you, Help me