public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: remove redundant assignment of entry
@ 2019-07-08  8:27 Wei Yang
  2019-07-08 14:42 ` Matthew Wilcox
  2019-09-14  0:03 ` Wei Yang
  0 siblings, 2 replies; 5+ messages in thread
From: Wei Yang @ 2019-07-08  8:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, willy, will, peterz, Wei Yang

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 <richardw.yang@linux.intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] mm: remove redundant assignment of entry
  2019-07-08  8:27 [PATCH] mm: remove redundant assignment of entry Wei Yang
@ 2019-07-08 14:42 ` Matthew Wilcox
  2019-09-14  0:03 ` Wei Yang
  1 sibling, 0 replies; 5+ messages in thread
From: Matthew Wilcox @ 2019-07-08 14:42 UTC (permalink / raw)
  To: Wei Yang; +Cc: linux-kernel, akpm, will, peterz

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 <richardw.yang@linux.intel.com>

Acked-by: Matthew Wilcox (Oracle) <willy@infradead.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mm: remove redundant assignment of entry
  2019-07-08  8:27 [PATCH] mm: remove redundant assignment of entry Wei Yang
  2019-07-08 14:42 ` Matthew Wilcox
@ 2019-09-14  0:03 ` Wei Yang
  2019-09-16 21:15   ` Will Deacon
  1 sibling, 1 reply; 5+ messages in thread
From: Wei Yang @ 2019-09-14  0:03 UTC (permalink / raw)
  To: Wei Yang; +Cc: linux-kernel, akpm, willy, will, peterz

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 <richardw.yang@linux.intel.com>
>---
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mm: remove redundant assignment of entry
  2019-09-14  0:03 ` Wei Yang
@ 2019-09-16 21:15   ` Will Deacon
  2019-09-17  2:00     ` Wei Yang
  0 siblings, 1 reply; 5+ messages in thread
From: Will Deacon @ 2019-09-16 21:15 UTC (permalink / raw)
  To: Wei Yang; +Cc: Wei Yang, linux-kernel, akpm, willy, peterz

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mm: remove redundant assignment of entry
  2019-09-16 21:15   ` Will Deacon
@ 2019-09-17  2:00     ` Wei Yang
  0 siblings, 0 replies; 5+ messages in thread
From: Wei Yang @ 2019-09-17  2:00 UTC (permalink / raw)
  To: Will Deacon; +Cc: Wei Yang, Wei Yang, linux-kernel, akpm, willy, peterz

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-09-17  2:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-08  8:27 [PATCH] mm: remove redundant assignment of entry Wei Yang
2019-07-08 14:42 ` Matthew Wilcox
2019-09-14  0:03 ` Wei Yang
2019-09-16 21:15   ` Will Deacon
2019-09-17  2:00     ` Wei Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox