All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@redhat.com>, Michal Hocko <mhocko@suse.cz>,
	linux-mm@kvack.org
Subject: Re: [PATCH] mm/swapfile: fix swapoff vs. software dirty bits
Date: Fri, 18 Sep 2015 11:53:01 +0300	[thread overview]
Message-ID: <20150918085301.GC2035@uranus> (raw)
In-Reply-To: <20150918102001.0e0389c7@mschwide>

On Fri, Sep 18, 2015 at 10:20:01AM +0200, Martin Schwidefsky wrote:
> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> index e2d46ad..b029d42 100644
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -754,7 +754,7 @@ static inline void clear_soft_dirty(struct vm_area_struct *vma,
>  
>  	if (pte_present(ptent)) {
>  		ptent = pte_wrprotect(ptent);
> -		ptent = pte_clear_flags(ptent, _PAGE_SOFT_DIRTY);
> +		ptent = pte_clear_soft_dirty(ptent);
>  	} else if (is_swap_pte(ptent)) {
>  		ptent = pte_swp_clear_soft_dirty(ptent);
>  	}
> @@ -768,7 +768,7 @@ static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma,
>  	pmd_t pmd = *pmdp;
>  
>  	pmd = pmd_wrprotect(pmd);
> -	pmd = pmd_clear_flags(pmd, _PAGE_SOFT_DIRTY);
> +	pmd = pmd_clear_soft_dirty(pmd);
>  

You know, these are only two lines where we use _PAGE_SOFT_DIRTY
directly, so I don't see much point in adding 22 lines of code
for that. Maybe we can leave it as is?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2015-09-18  8:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17  8:58 [PATCH] hanging swapoff with HAVE_ARCH_SOFT_DIRTY=y Martin Schwidefsky
2015-09-17  8:58 ` [PATCH] mm/swapfile: fix swapoff vs. software dirty bits Martin Schwidefsky
2015-09-17  9:53   ` Cyrill Gorcunov
2015-09-17 19:31   ` Cyrill Gorcunov
2015-09-18  6:58     ` Martin Schwidefsky
2015-09-18  7:15       ` Cyrill Gorcunov
2015-09-18  8:20         ` Martin Schwidefsky
2015-09-18  8:53           ` Cyrill Gorcunov [this message]
2015-09-18  9:10             ` Martin Schwidefsky
2015-09-18  9:28               ` Cyrill Gorcunov
2015-09-18 10:11                 ` Martin Schwidefsky
2015-09-18 20:21               ` Cyrill Gorcunov
2015-09-21  7:10                 ` Martin Schwidefsky
2015-09-21  7:30                   ` Cyrill Gorcunov
2015-09-21  7:40                     ` Martin Schwidefsky
2015-09-21  7:54                       ` Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150918085301.GC2035@uranus \
    --to=gorcunov@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    --cc=mingo@redhat.com \
    --cc=schwidefsky@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.